{"id":16568118,"url":"https://github.com/wogong/beancount-bot","last_synced_at":"2026-03-05T21:31:26.088Z","repository":{"id":173648877,"uuid":"651065784","full_name":"wogong/beancount-bot","owner":"wogong","description":"Another Telegram bot for quickly adding transactions to your Beancount file.","archived":false,"fork":false,"pushed_at":"2026-01-11T03:01:00.000Z","size":117,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T03:34:15.003Z","etag":null,"topics":["beancount","beancount-bot","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wogong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-06-08T12:18:33.000Z","updated_at":"2026-01-11T03:01:04.000Z","dependencies_parsed_at":"2024-10-28T17:17:33.117Z","dependency_job_id":null,"html_url":"https://github.com/wogong/beancount-bot","commit_stats":null,"previous_names":["wogong/beancount-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wogong/beancount-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wogong%2Fbeancount-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wogong%2Fbeancount-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wogong%2Fbeancount-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wogong%2Fbeancount-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wogong","download_url":"https://codeload.github.com/wogong/beancount-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wogong%2Fbeancount-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30150403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T21:15:50.531Z","status":"ssl_error","status_checked_at":"2026-03-05T21:15:11.173Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beancount","beancount-bot","telegram","telegram-bot"],"created_at":"2024-10-11T21:08:24.816Z","updated_at":"2026-03-05T21:31:26.047Z","avatar_url":"https://github.com/wogong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beancount Bot\n\nThis is a Telegram bot that allows you to add transactions to your Beancount file.\n\n## Steps\n\n### Download repo and use Python\n\n1. Create a new bot with @BotFather and obtain its token.\n2. Obtain your UserID with @userinfobot.\n3. Download this repo and copy the `src/env.example` file to `src/.env` and update the config file with your own values.\n4. Copy the example Makefile from `beancount_root/Makefile`, maybe you need to update `bean-query` path.\n5. Install the required packages with `python3 -m pip install -r requirements.txt`, then run the bot with `python3 src/bot.py`.\n5. Or, if you use `uv`, just run `uv run src/bot.py`.\n\n### Docker-Compose\nStep 1-4 are same as above, make sure you have docker and docker-compose installed.\n\n5. Just run `docker-compose up`\n\n## Usage\n\nMessage the bot and it will reply with the generated transactions or error information.\n\n### Message format\n\nThe message format that the bot accepts is as follows:\n\n`{account_from1 amount1} {account_from2 amount2} ... account_to note`\n\n- The `account_from` and `account_to` variables will be used as a query to your accounts. Match algo is basically the same as account completion you use in vim or vscode.\n- The first `2n+1`` variables must be separated by a space, and the remaining strings will be treated as the note(can be left empty).\n- Transactions that the bot is unsure about will be marked with `!`. (like multiple accounts matched)\n\nexample:\n\n1. `1234 20 Restau 中饭` generates\n\n    ```\n    2023-07-13 * \"\" \"中饭\"\n        Assets:Savings:BOC1234 -20.00 CNY\n        Expenses:Food:Restaurent\n    ```\n\n2. `1234 48.12 in:alibaba 1.88 fruit 水果：西瓜 菠萝蜜` generates\n\n    ```\n    2023-07-13 * \"\" \"水果：西瓜 菠萝蜜\"\n        Assets:Savings:BOC1234 -48.12 CNY\n        Income:Bonus:Alibaba -1.88 CNY\n        Expenses:Food:Fruit 50.00 CNY\n    ```\n\n### Commands\n\n- You can use `/bal 1234` to query the balance of account~'1234'.\n- You can use `/pay 2345` to query the monthly payment of account~'2345' in curent year.\n- Add any other commands you like, remember to add corresponding commands in your Makefile and `src/bot.py`.\n\n## TODO\n\n- [x] fuzzy match\n- [x] docker deployment\n- [x] support multiple legs\n- [x] unit test\n- [x] add commands to run `bean-query`\n- [ ] reload beancount file\n\n## Credits\n- [beancount](https://github.com/beancount/beancount)\n- [vim-beancount](https://github.com/nathangrigg/vim-beancount)\n- [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwogong%2Fbeancount-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwogong%2Fbeancount-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwogong%2Fbeancount-bot/lists"}