Skip to content

Small collection of utility scripts to help managing ledger-cli data.

License

Notifications You must be signed in to change notification settings

glennhartmann/ledger-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ledger-tools

This is a small collection of utility scripts to help managing ledger-cli data.

Building

transactionsorter, pricedbfetcher, and questrademain are written in Go. Download a copy of the Go compiler, and run ./build.sh.

transactionsorter

Usage: ./transactionsorter <file>.

This sorts a file full of Ledger transactions by date, in-place. A compelling use-case is for importing multiple CSV files (using icsv2ledger, for example) into the same transactions file.

Although ledger does somewhat support having per-account transaction files, which would somewhat lessen the value of this use-case, but this is widely acknowledged to break balance assertions.

Note that this tool is currently quite limited - it only understands basic transaction syntax and comments, and could fail if other ledger directives are in the file.

pricedbfetcher

See pricedbfetcher README.

pricedbtocsv

Usage: ./pricedbtocsv [-close-time=<time in '22:45:00' format>] [-price-db-file=<path>]

As the name suggests, this tool converts a ledger-cli price-db file (see here for more details) into CSV data. The CSV data is printed to stdout, so you may want to redirect it to a file.

questrademain

Mostly just for testing the Questrade API.

networthbyday

networthbyday.py computes a one-row-per-day CSV file of total Assets minus total Liabilities.

Usage: misc/networthbyday.py --start_date=YYYY-MM-DD --end_date=YYYY-MM-DD. The output is printed to stdout, so you may want to redirect it to a file.

regcsv

This one probably should just be an alias.

About

Small collection of utility scripts to help managing ledger-cli data.

Topics

Resources

License

Stars

Watchers

Forks