Send summaries of eBons (Rewe, Netto, ..) to cospend.
Project description
Mail2Cospend
A workflow for publishing eBons from mail to Cospend (App in Nextcloud). Uses uv for Python project management.
Install requirements
uv sync
uv lock
Run with Python >= 3.12
uv run mail2cospend run
Use dry-run
to perform a "dry run": only request and parse bon from the mail inbox without publishing them to cospend.
If you want infos about your project (e.g., the available ids), run:
uv run mail2cospend project-infos
If you want infos about your current config, run:
uv run mail2cospend show-config
Run with Docker
./build.sh
./run.sh
Implemented adapters
- Rewe
- Netto
- Picnic
Configuration with environment variables
Change them in the .env file.
Variable | Description | Type |
---|---|---|
COSPEND_PROJECT_URL | The url of the cospend project (shared link in the project) | string |
COSPEND_PROJECT_PASSWORD | The (optional) password of the cospend project (if set) | string |
COSPEND_PAYED_FOR_DEFAULT | The ids of the payed for users, seperated by a "," | string |
COSPEND_PAYED_FOR_{adapter} | The ids of the payed for users, seperated by a "," for a specified adapter (^1) | string |
COSPEND_PAYER_DEFAULT | The id of the payer | string |
COSPEND_PAYER_{adapter} | The id of the payer for a specified adapter (^1) | string |
COSPEND_CATEGORYID_DEFAULT | The id of the category | string |
COSPEND_CATEGORYID_{adapter} | The id of the category for a specified adapter (^1) | string |
COSPEND_PAYMENTMODEID_DEFAULT | The id of the payment mode | string |
COSPEND_PAYMENTMODEID_{adapter} | The id of the payment mode for a specified adapter (^1) | string |
IMAP_HOST | The IMAP host | string |
IMAP_USER | The IMAP user | string |
IMAP_PASSWORD | The IMAP password | string |
IMAP_PORT | The IMAP port | int (default: 993) |
IMAP_INBOX | 'Inbox' of of the IMAP server | string |
SINCE | 'today' or a ISO date, if 'today', then the script will use always the current day | str or ISO date |
INTERVAL | The request interval in seconds | int (default: 60) |
LOGLEVEL | The loglevel (DEBUG,INFO,WARING,ERROR) | string |
^1) Use the values of the adapter names: REWE, NETTO, PICNIC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mail2cospend-0.2.0.tar.gz
(42.0 kB
view details)
Built Distribution
File details
Details for the file mail2cospend-0.2.0.tar.gz
.
File metadata
- Download URL: mail2cospend-0.2.0.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e2e61a36ced2ad4082b949fbbb28573ee7a1bc957d7d2bc87333691af9d64a |
|
MD5 | 16947a56de754a1c3213414c93e7eaf9 |
|
BLAKE2b-256 | af44bd904c51c1179c62eb3b5fcd6f51771d562b09a673e13b1b0c4fc22a8ff1 |
File details
Details for the file mail2cospend-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mail2cospend-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b02d007992cd3f76d40a0fd0ed240a9b43ddea02c9b842b9da42d493d648b2a |
|
MD5 | f3534efe0c99197ee0725ed0f7ad0db7 |
|
BLAKE2b-256 | 70fb0a81a1e681a20358dcb81dc08458226073cd3ccfef2f5f7d6e672cd952e3 |