Skip to content

doriath/beanru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beanru - beancount read-modity-write

Crates.io docs.rs

WARNING: This crate is still in early stages and APIs will change.

The goal of this crate (binary) is to make read-modify-write scripts for beancount files easy.

Limitations:

  • imports are not supported (only single file beancounts are supported)
  • the formatting is changed and comments are dropped

Install

cargo install beanru

Examples

First, normalize your beancount file (reformat and drop comments):

beanru normalize -i ledge.beancount

WARNING: I strongly recommend looking at the changes that the script made, to ensure that no important syntax was dropped. I like to use git diff -w to ignore whitespaces. This crate uses different parser than official one, so ensure no postings or directives were dropped. If you notice any bug, please file an issue.

Now, the modification scripts can be run.

TODO: provide examples.

TODO

APIs:

  • Figure out if we should make all fields in types public, or if instead we should provide getters and setters for all.
  • Unify some type names (like currency and commodity).

Features:

  • Provide examples of using rust-script to make it very simple to write small scripts that perform some modification on a beancount file.
  • Wasm support and examples.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published