Skip to main content

Naive sorting for Beancount files

Project description

bean-sort

bean-sort is a naive sorting utility for Beancount files. It is naive in that it makes no attempt to parse the file, simply splitting on date fields.

Specifically, bean-sort splits on any date at the beginning of a line. All text between this and the next date are regarded as part of that record. This is particularly important for any pragmas which follow any actual directive.

Any test before the first date in the file is regarded as header.

The sortng is stable, that is, records already in date order are left undisturbed.

Output is written to standard output.

Installation

Either from PyPI or from the Nix flake in this repo.

Usage

> bean-sort --help
usage: bean-sort [-h] file [file ...]

Sort one or more Beancount files to standard output.

positional arguments:
  file        Beancount file(s) to sort

options:
  -h, --help  show this help message and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bean_sort-0.1.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bean_sort-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file bean_sort-0.1.1.tar.gz.

File metadata

  • Download URL: bean_sort-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for bean_sort-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a1341744b26402aaaa980eab7129f116284aa7295bf89e0bf0cd89367a0bf2a5
MD5 746f5486f240ceda6b618fe0c29b3639
BLAKE2b-256 d5161b9be9cc5a6ed18526d18f4ec3135b22b2d2c05d37f8786d0a711a751fed

See more details on using hashes here.

File details

Details for the file bean_sort-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bean_sort-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for bean_sort-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47c0c4545d89999e6d2e347d2e411e7c57fb29cb525ffb2eb4e64e9bc7bfab48
MD5 68e0cfb957df446c8faae2610a5209ff
BLAKE2b-256 8ee166fe6fd345342f9ba3a925f4863b4302121af6757d62e1eca1cda76dfdff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page