Skip to content

Suite of CLI tools to automate transaction operations on the MoneyLover App

Notifications You must be signed in to change notification settings

elatoskinas/moneylover-automation-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoneyLover Trnasaction automation

A CLI script suite to automate MoneyLover transaction submission flows. Provides tools to parse Excel inputs, transform them and submit them to the MoneyLover app.

Setup

  1. npm install to install all dependencies
  2. Retrieve the ACCESS_TOKEN by checking the network request Authorization header in the MoneyLover web app
  3. Create an .env file with the ACCESS_TOKEN field. Paste in the access token from the previous step without the AuthJWT prefix.
ACCESS_TOKEN=<access tokekn>
  1. See Usage guide to prepare & submit data using the tool

Usage

Data preparation

The expected data to be passed in to the submission flow is expected to be a JSON file on format:

[{
  "amount": 123,
  "description": "Transaction",
  "date": "2023-06-24",
  "category": "Category"
}, {
  "amount": 124,
  "description": "Transaction2",
  "date": "2023-01-04",
  "category": "Category2"
}, ...]

The below scripts assist in data preparation:

npm start parse-excel <input-path> <output-path>

Parses an Excel file from the input path to the output path. The output is a transaction format supported for the submission flow. Currently, only one type of parsing format is supported (see parsing.ts for details)

npm start label-categories <input-path>

Takes in a transactions file (generated by parse-excel) and prompts the user to fill in all UNKNOWN categories. The transactions file is re-saved on each input.

npm start rollup-transactions <input-path>

Takes in a transactions file and rolls up all transactions of the same category on the same day to one aggregate transaction.

npm start dump-categories <output-path>

Dumps the defined MoneyLover categories for the first user wallet to the target text file. Useful to get the file handy locally.

Submission

npm start post-transactions <input-path>

Takes in a transactions file (as expected from the previous section) and submits them to the MoneyLover user's first wallet.

Pending enhancements

  • Integrate zod parsing
  • Continue processing transactions on errors
  • Allow wallet input

About

Suite of CLI tools to automate transaction operations on the MoneyLover App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published