Hey everyone,

I wanted to sort my transactions, and at the same time I really wanted to 
be able to access my Journal from the JVM.

Within the past 2? week(s?) I created JBeancount (
https://github.com/jord1e/jbeancount). The README has a lot of information.

It contains a parser implementation based on ANTLRv4 that is 99% compatible 
with normal Beancount (working on full support). Currently it errors on 
pushtag/poptag and emacs mode sections.

It has the ability to stably sort all transactions in a file based on the 
date (I don't think this existed in the ecosystem at all? - it generally 
works with comments, still improving on that front in coming iterations)

It also contains a formatter kind of similar to bean-format. Both will be 
expanded in the future to offer opinionated formatting.

The library architecture is based on the battle-tested GraphQL Java 
<https://github.com/graphql-java/graphql-java> library way of transforming 
the AST into an immutable data structure. With Java 17 sealed classes it is 
fully typesafe.

It also contains a feature to merge multiple journals together into one (or 
your root journal with include pragmas into one!).

It also uses GraalVM, this makes startup time a non-issue.
       Measure-Command {.\jbeancount.exe merge -r -o merged.beancount 
all.beancount; .\jbeancount.exe format --experimental-sort-transactions 
merged.beancount -o merged.beancount}
Merges my ~15 files into a 14.000 line file and sorts+formats the 
transactions in ~270 milliseconds (it currently sorts a bit jangly when 
transaction directives are intermixed with other directives or pragmas - 
this will be fixed)

I'll accept feature requests for the sorting and formatting, or general 
library requests in the GitHub issue tracker. Test coverage will also 
improve (currently only manual testing on my big transaction-only-by-year 
files)

Thank you Martin for the amazing work on Beancount.

Regards,
Jordie

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/72ee8adb-a376-4e30-b6d4-ea8749f5f666n%40googlegroups.com.

Reply via email to