← Back to all sparks
R

r-ledger

ANALYTICS
Velocity0.0

Utilities for Importing Data from Plain Text Accounting Files

ledger adds a Rust toolchain fallback, so beancount imports work whether or not the Python tooling is installed.

plain-text-accountingr-packagebeancounthledgertoolchain-integration
Current state
An R package that imports plain-text accounting files — ledger, hledger and beancount — into data frames. Releases are sparse and driven almost entirely by changes in the external command-line tools it shells out to: date format shifts, decimal mark handling, binaries being removed from upstream projects. The last two releases show more activity than the several years preceding them.
Where it's heading
The package's job is absorbing churn in an ecosystem it does not control, and the recent releases show that ecosystem fragmenting and then being backfilled. bean-report disappeared from beancount in 2020 and its toolchains were finally deprecated in v2.0.13; v2.1.1 responds to the arrival of rustledger by adding rledger and bean-query as explicit toolchain choices and making the beancount path fall back to rledger when bean-query is absent. The other steady thread is column parity — code, id and comment columns arriving one at a time across the three register functions, so that whichever toolchain a user has produces comparable output.
Prediction
Expect the remaining deprecated toolchains to be removed outright, and further column-parity work so the rledger path returns the same fields as the established ones.

Recent moves

  1. 2mo ago

    rustledger supported as a beancount toolchain, with automatic fallback

    Adds rledger and bean-query as explicit toolchain options for net_worth() and register(), with register_beancount() now falling back to rledger when bean-query is not installed. The practical effect is that beancount files can be read with either the Python tooling or the Rust reimplementation, removing a hard dependency on a single upstream project.

    View source ↗
  2. 4mo ago

    bean-report toolchains deprecated; transaction code column imported

    Deprecates the two bean-report toolchains, six years after bean-report was removed from beancount, and adds a transaction code column to register_ledger() along with extraction of marks that ledger's CSV output embeds in descriptions when codes and marks coexist. Catching up with upstream reality on both ends.

    View source ↗
  3. 2y ago

    Transaction id column for beancount and hledger; date coercion aligned

    Adds a transaction id column to register_beancount() and register_hledger(), coerces beancount dates to Date objects as the other two already did, and trims the ledger comment column. Column-parity work, so output shape stops depending on which toolchain produced it.

    View source ↗
  4. 4y ago

    rio moved from Imports to Suggests

    Downgrades the rio dependency to Suggests, so users wanting rio::import() or rio::convert() install it themselves. Dependency-weight housekeeping.

    View source ↗
  5. 6y ago

    hledger date import fixed for newer hledger versions

    Fixes date importing against newer hledger releases, from an external bug report and patch. A representative instance of the upstream-churn maintenance that drives most of this package's releases.

    View source ↗
  6. 6y ago

    Comma decimal marks and commodity prefixes parse correctly

    Fixes hledger imports failing on amounts using comma decimal marks or commodity prefixes, and relaxes the minimum hledger version from 1.4 to 1.2. The decimal mark fix matters beyond its size — it was silently blocking non-US locale users entirely.

    View source ↗