From e634265620f2d57416a66f6409293fa267f7ebfb Mon Sep 17 00:00:00 2001 From: Gunwant Jain Date: Sun, 15 Oct 2023 21:22:15 +0530 Subject: [PATCH] readme: add guides for the write to db feature Signed-off-by: Gunwant Jain --- readme.md | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index b6da158..4b900ef 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ Unfold is an unofficial [Fold Money](https://fold.money) CLI client, which covers the bare minimum API routes to fetch your transactions for a given -period. +period and even write them to a sqlite database. Fold's API is not publically available, I had to MITM their app to write this tool, and so **there might be unforeseen consequences for your Fold account if @@ -24,14 +24,42 @@ automatically logged out on your Phone's app** $ unfold login ``` -2. Then you can fetch your transactions in plaintext using: - ```bash - $ unfold transactions -h - ``` +2. Then you can fetch your transactions: + + a. In plaintext: + ```bash + $ unfold transactions + ``` + + b. In plaintext and also write to a db: + ```bash + # Write to a local file called `db.sqlite` by default + $ unfold transactions -s 2023-09-20 --db + ``` + + c. For a complete glossary of available options: + ``` + $ unfold transactions -h + Prints the transactions from all of your accounts (default period: 1 month) + + Usage: + unfold transactions [flags] + + Flags: + -d, --db Save the results in a sqlite db + -D, --db-path string Sets path for the database (default "db.sqlite") + -h, --help help for transactions + -s, --since string fetch transactions since in this format: YYYY-MM-DD (default "2023-09-15") + -t, --till string fetch transactions till in this format: YYYY-MM-DD (default "2023-10-16") + + Global Flags: + --config string config file (default is $HOME/.config/unfold/config.yaml) + -v, --debug Enable debug mode + ``` There are a few more subcommands which Unfold provides and uses internally. You can get a list by: -```bash +``` $ unfold An unofficial cli client for fold.money