Skip to content

Commit

Permalink
minor fixes & documentation (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly authored Dec 27, 2023
1 parent 483417a commit 05201fb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.pdm.toml
__pypackages__
.pdm-python
.envrc
.env
*.db
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You will need to specify additional flags when running the script to do this.
It is also highly recommended that the script run on as a cron job in this case.

```
$ venmo-auto-cashout --token=XXX --lunchmoney-token=XXX --lunchmoney-group=z-venmo
$ venmo-auto-cashout --token=XXX --lunchmoney-token=XXX --lunchmoney-category=z-venmo
Your balance is $0.00
Waiting 5 seconds before querying transactions...
There are 0 income transactions to cash-out
Expand Down Expand Up @@ -81,3 +81,14 @@ Successfully logged in. Note your token and device-id
access_token: xxxx
device-id: xxxx
```

### ENV Variables

You can also set the following ENV variables instead of passing them as flags:

```
export VENMO_API_TOKEN=
export TRANSACTION_DB=
export LUNCHMONEY_TOKEN=
export LUNCHMONEY_CATEGORY=
```
4 changes: 2 additions & 2 deletions venmo_auto_cashout/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def run_cli():
parser.error("--transaction-db must be specified to use the LM integration")

if len([x for x in (args.lunchmoney_token, args.lunchmoney_category) if x is not None]) == 1:
parser.error("--lunchmoney-{token,categry} are both required for LM integration")
parser.error("--lunchmoney-{token,category} are both required for LM integration")

db_path: Union[str, None] = args.transaction_db
db = None
Expand Down Expand Up @@ -235,4 +235,4 @@ def output(msg: str):
output,
)

output("\nAll money transfered out!")
output("\nAll money transferred out!")
3 changes: 3 additions & 0 deletions venmo_auto_cashout/lunchmoney.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def update_lunchmoney_transactions(
that have not already had a lunchmoney_transaction_id associated to them in
the database.
"""

output("Updating Lunch Money transactions")

lunch = LunchMoney(access_token=token)

try:
Expand Down

0 comments on commit 05201fb

Please sign in to comment.