基于规则的复式记账导入器,支持将各种账单格式智能转换为 Beancount 或 Ledger 格式。
📖 完整文档: 访问 在线文档站点 获取详细的使用指南和配置说明。
go install github.com/deb-sig/double-entry-generator/v2@latest
brew install deb-sig/tap/double-entry-generator
在 GitHub Release 页面下载对应架构的二进制文件。
TIP
通过 Go 安装后,可使用 go version -m $(which double-entry-generator) 查看版本。
# 转换支付宝账单为 Beancount 格式
double-entry-generator translate -p alipay -t beancount alipay_records.csv
# 转换微信账单为 Ledger 格式
double-entry-generator translate -p wechat -t ledger wechat_records.xlsx
# 转换建设银行账单
double-entry-generator translate -p ccb -t beancount ccb_records.xls
更多使用说明请参考 快速开始文档。
完整列表请查看 Providers 文档。
Double Entry Generator 使用 YAML 格式的配置文件来定义转换规则和账户映射。
defaultMinusAccount: Assets:FIXME
defaultPlusAccount: Expenses:FIXME
defaultCurrency: CNY
title: 我的账本配置
# Provider 特定配置
alipay:
rules:
- category: 餐饮美食
time: 11:00-14:00
targetAccount: Expenses:Food:Lunch
- peer: 滴滴
targetAccount: Expenses:Transport:Taxi
项目提供了丰富的示例配置和账单文件,位于 example/ 目录下。
double-entry-generator translate \ --config ./example/alipay/config.yaml \ --output ./example/alipay/example-alipay-output.beancount \ ./example/alipay/example-alipay-records.csv
double-entry-generator translate \ --config ./example/wechat/config.yaml \ --provider wechat \ --output ./example/wechat/example-wechat-output.beancount \ ./example/wechat/example-wechat-records.csv
更多示例请查看 示例文档。
┌───────────┐ ┌──────────┐ ┌────┐ ┌──────────┐ ┌──────────┐ │ translate │->│ provider │->│ IR │->│ compiler │->│ analyser │ └───────────┘ └──────────┘ └────┘ └──────────┘ └──────────┘ alipay beancount alipay wechat ledger wechat huobi huobi htsec htsec icbc icbc ccb ccb td td bmo bmo hsbchk hsbchk
架构支持扩展:
完整的文档请访问:
如果遇到 "Failed to get the tx type" 错误:
v2.10.0,可使用 --ignore-invalid-tx-types 参数忽略该错误各 Provider 的账单下载方式请参考:
更多问题请查看 GitHub Issues。
欢迎贡献代码和文档!请查看 贡献指南。
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)本项目采用 Apache 2.0 许可证。