Giter Site home page Giter Site logo

cli-csv-tool's Introduction

CLI Application

Idea

  • Write command application base on commander package
  • Parse and store data in a sufficient data-structure (pre-calculate final balance, by day volatile)
  • Use stream API to handle data row one by one (cause data file is large)
  • Use lokijs (embed database) to deal with heap size exceed issue

Feature

  • Node.js
  • Typescript
  • commander
  • axios
  • lokijs
  • husky, prettier, lint-staged

Install && set up

yarn install
cp .env.example .env
export NODE_OPTIONS="--max-old-space-size=8192"

Set up environment variable LOG_FILE_PATH and CRYPTO_EXCHANGE_API_KEY

Example

LOG_FILE_PATH=/Users/Downloads/transactions.csv
CRYPTO_EXCHANGE_API_KEY=e4ce426fb741a048d492c1b49274ece10cf51cb8c11ebe33f9f8396bab312a34

Test (built version)

yarn build

npm install -g .

crypto-cli --date 2022-04-22 --token ETH

Uninstall

npm uninstall -g crypto-cli

Test (dev version)

npm run dev -- --token ETH --date 2022-04-22

cli-csv-tool's People

Contributors

hulk-pham avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.