Skip to main content

Beancount CMB Importer

Build and Publish - action Lint - action Coverage Status Code scanning - action PyPI version

Beancount CMB Importer 是一个用于将招商银行 PDF 交易流水导入 Beancount 的 Python 库。

安装

使用 pip 安装 Beancount CMB Importer:

pip install beancount-cmb-importer

使用方法

  1. 登陆招商银行手机银行 App,把交易流水发送到您的邮箱中。然后下载邮箱中的附件,并把附件解压之后的 pdf 放在 documents 目录下。
  2. 在您的 Beancount 文件夹中,创建一个新的 Python 脚本(例如:config.py),并将以下代码复制到脚本中:
from beancmb.pdf_importer import CmbPdfImporter

CONFIG = [
    CmbPdfImporter('Assets:Current:CMB', './main.bean'),
]
  1. 使用 bean-extract 来提取交易记录: bean-extract config.py documents/。这将从 PDF 文件中提取交易并将其转换为 Beancount 格式。您可以将其复制并粘贴到您的 Beancount 主文件中。

注意事项

  • 在导入时,会识别主账本中对应账户的最后一次 balance 记录的日期,只有晚于这个日期的交易才会被导入
  • 导入的交易,会默认添加一个去向账户 Equity:UFO。如果想自定义这个账户,可以通过 CmbPdfImporter 的参数来指定: CmbPdfImporter('Assets:Current:CMB', './main.bean', 'Expenses:Others')

License

MIT.

Metadata

Release files for beancount-cmb-importer 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beancount-cmb-importer 0.1.4
File Size Uploaded Provenance Actions
beancount-cmb-importer-0.1.4.tar.gz 7.0 kB Without provenance Details for beancount-cmb-importer-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beancount-cmb-importer 0.1.4
File Interpreter ABI Platform Actions
beancount_cmb_importer-0.1.4-py3-none-any.whl Python 3 none any Details for beancount_cmb_importer-0.1.4-py3-none-any.whl

Total release size: 15.5 kB

Release files / beancount-cmb-importer-0.1.4.tar.gz

Download URL beancount-cmb-importer-0.1.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0472637c517efde855a8f18632af82d8fbe89f7a5a79db634c2f325107453cdf
BLAKE2b-256 checksum
How to use checksums
721ad50eba7b1e1f1bb6098591536b3ef73ab3e6665e13422778022f0b997a50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / beancount_cmb_importer-0.1.4-py3-none-any.whl

Download URL beancount_cmb_importer-0.1.4-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3814bf0bf2501992188d18198573df702e1ff24d19b43c86dcd68be70d10d06e
BLAKE2b-256 checksum
How to use checksums
f5791c2ddd1e96f0844476e9fef4c03d8563af4a1df5aa7eac11bd76e6ebf688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Security for beancount-cmb-importer 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page