Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juftin/lunchable-primelunch
LunchMoney Amazon Transaction Updater
https://github.com/juftin/lunchable-primelunch
amazon lunchable lunchmoney lunchmoney-api python
Last synced: about 1 month ago
JSON representation
LunchMoney Amazon Transaction Updater
- Host: GitHub
- URL: https://github.com/juftin/lunchable-primelunch
- Owner: juftin
- License: mit
- Created: 2024-01-25T07:32:12.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T16:41:37.000Z (9 months ago)
- Last Synced: 2024-05-01T16:21:07.230Z (8 months ago)
- Topics: amazon, lunchable, lunchmoney, lunchmoney-api, python
- Language: Python
- Homepage: http://juftin.com/lunchable-primelunch/
- Size: 120 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
lunchable-primelunch
LunchMoney Amazon Transaction Updater---
`PrimeLunch` is a command line tool that supports updating Amazon transaction notes with the items from
Amazon itself. This tool uses CSVs generated by the
[Amazon Order History Reporter](https://chrome.google.com/webstore/detail/amazon-order-history-repo/mgkilgclilajckgnedgjgnfdokkgnibi)
plugin on Chrome. Once you've gathered your transactions, export them as a CSV and scan them with the tool.
You'll be asked which transactions you'd like to update.
---
The plugin uses the dollar amounts on the CSV export to match Amazon transactions in LunchMoney.
When a matching dollar amount is found, `PrimeLunch` compares the date window between the transactions
to determine if they're really a match.We're using
the [Amazon Order History Reporter](https://chrome.google.com/webstore/detail/amazon-order-history-repo/mgkilgclilajckgnedgjgnfdokkgnibi)
plugin because it gives us some functionality that Amazon doesn't: exporting Amazon transactions as they're
grouped on actual credit card transactions.## Run via the Lunchable CLI
You can install lunchable with [pip](https://pypi.org/project/lunchable/) or
[pipx](https://pypa.github.io/pipx/). Make sure to use the
`lunchable[primelunch]` extra to install the `PrimeLunch` plugin.
You can also use the `lunchable[plugins]` extra to install all the
known plugins.```shell
pipx install "lunchable[primelunch]"
``````shell
pip install "lunchable[primelunch]"
```The below command runs the `PrimeLunch` update tool:
```shell
lunchable plugins primelunch -f ~/Downloads/amazon_order_history.csv
```The below command runs the `PrimeLunch` update tool using a date window of fourteen days
instead of the default seven days (these larger windows are especially useful for finding refunds and recurring
purchases):```shell
lunchable plugins primelunch \
--file ~/Downloads/amazon_order_history.csv \
--window 14
```Update all transactions without going through the confirmation prompt for each one:
```shell
lunchable plugins primelunch \
--file ~/Downloads/amazon_order_history.csv \
--all
```Provide a LunchMoney API access token manually (`PrimeLunch` defaults to inheriting from the `LUNCHMONEY_ACCESS_TOKEN`
environment variable):```shell
lunchable plugins primelunch \
--file ~/Downloads/amazon_order_history.csv \
--token ABCDEFGHIJKLMNOP
```## References
This lunchable plugin was inspired by the original Lunchable Amazon importer
at [samwelnella/amazon-transactions-to-lunchmoney](https://github.com/samwelnella/amazon-transactions-to-lunchmoney).