8个不稳定版本 (3个破坏性更改)
0.3.0 | 2020年8月27日 |
---|---|
0.2.1 | 2020年8月19日 |
0.1.1 | 2020年8月1日 |
0.0.2 | 2020年7月25日 |
0.0.0 | 2020年6月28日 |
#175 in 财务
每月下载 27次
45KB
1K SLoC
Bankroll

Rust中的账本实现。它借鉴了ledger-cli的概念,但使用TOML文件类型。
安装
从Cargo
cargo安装bankroll
从源代码构建
或者,克隆此仓库并执行以下操作
- 如果您的机器上未安装Rust,请按照以下说明进行操作: https://rust-lang.net.cn/tools/install
- 运行
cargo build --release
编译二进制文件 - 转到
/target/release
并将bankroll
二进制文件复制到您的路径:/usr/bin
用法
环境变量
LEDGER_FILE - toml账本文件的相对路径
LEDGER_FILE=~/ledger.toml bankroll balance
LEDGER_FILE
可以设置为系统或用户环境变量。
export LEDGER_FILE="$HOME/ledger.toml"
示例
$ ./bankroll --help
bankroll 0.2.0
USAGE:
bankroll <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-r, --real Only shows real transactions
-V, --version Prints version information
SUBCOMMANDS:
balance
help Prints this message or the help of the given subcommand(s)
import
register
$ ./bankroll balance
$ 11,940.00 Assets
$ 2,970.00 Checking
$ 7,990.00 Savings
$ 980.00 Fund:Auto
$ -13,000.00 Equity
$ -13,000.00 Opening Balance
$ 1,075.00 Expenses
$ 15.00 Entertainment
$ 1,060.00 General
$ -15.00 Liabilities
$ -15.00 Credit
───────────────
0
$ ./bankroll balance
2020-01-01 income Assets:Checking $ 3,000.00 $ 3,000.00
Assets:Savings $ 10,000.00 $ 13,000.00
Equi:Opening Balance $ -13,000.00 0
2020-01-01 Sample really long that… Expenses:General $ 10.00 $ 10.00
Expenses:General $ 10.00 $ 20.00
Assets:Savings $ -10.00 $ 10.00
Assets:Checking $ -10.00 0
2020-01-01 Sample transaction Expenses:General $ 10.00 $ 10.00
Expenses:General $ 10.00 $ 20.00
Assets:Checking $ -20.00 0
2020-01-01 Movie night Expens:Entertainment $ 15.00 $ 15.00
Liabilities:Credit $ -15.00 0
2020-01-01 Really big purchase Expenses:General $ 1,000.00 $ 1,000.00
Assets:Savings $ -1,000.00 0
2020-08-01 Car Repair Expenses:General $ 20.00 $ 20.00
Assets:Savings $ -20.00 0
(Fund:Auto) $ -20.00
$ ./bankroll import example/sample.csv
"example/sample.csv" imported Successfully
许可证
根据GNU通用公共许可证版本3,2007年6月29日(《LICENSE-GNU》或https://gnu.ac.cn/licenses/gpl.html》)授权
贡献
依赖关系
~6MB
~95K SLoC