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.0.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.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bean_sort-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 676cc3be07cdb518eb19a6596c6ebdf8caf6789de29abb580c31bea14b65a404
MD5 df450e6c19d2f0562d6fed3077e91eda
BLAKE2b-256 67a1b3e8c9ca77aefaed44f26f53d2839807229519c87fc24981b2c5d205e766

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bean_sort-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1deca7cfef55c4585af7e783761faf8a0c96e6b6989778f159d71a7f989d9cb0
MD5 69787393fda234ae11bf53277b985c67
BLAKE2b-256 a47e5331df91e930c29a0ad7dd802552f7f3940f11a17edf1dc35ef83289174f

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