deb-sig / double-entry-generator

Rule-based double-entry bookkeeping importer (from Alipay/WeChat/Huobi etc. to Beancount/Ledger).
https://github.com/deb-sig/double-entry-generator
Apache License 2.0
537 stars 79 forks source link

[feat] add ledger compiler support for huobi provider #95

Closed ramsayleung closed 1 year ago

ramsayleung commented 1 year ago

Description

目前 double-entry-generator 只支持 beancount 后端,增加对 ledger 后端的支持. 针对不同的 provider, 后端需要有对应的输出模板,已有的输出模板包括:

本次PR 增加 火币模板1, 火币模板2, 火币卖出模板的支持

Modification

概括:

  1. compiler/ledger package 增加huobi的支持
  2. test 目录增加 huobi-ledger 相关test script
  3. example 目录增加 huobi-ledger 相关的生成文件.
  4. Makefile 增加新的 test target

Motivation and Context

92

Dependencies

None

Type of change

Please delete options that are not relevant.

How has this been tested?

新增一个 end-to-end 测试脚本, 测试 huobi-ledger 后端生成功能:

对生成的 ledger 文件进行语法与格式校验:

make test: all tests pass