Skip to main content

hledger-args

This package is a replacement for hledger command file with additional features.

Basic Usage

  • Save commands directly in the journal file using the custom directive format below.
  • List available commands with --file option without additional name argument
  • Pass multiple command names to output the reports
  • Use option --pdf-file to save the reports as pdf

Interactive Mode

Select the report from a menu using the flag --interactive.

Using placeholders as below, the user can create a report asking multiple additional information on runtime that read the journal files to provide fuzzy search autocompletion, validation and other conveniences.

Placeholder Command Substitution

In Interactive Mode only, a command can use placeholders by putting them between curly braces and additional prompts wil ask for the value and do the proper substitution.

For example, {example_placeholder} will ask for this value and substitute where it is located in the command saved in the journal file.

Some placehoder's name offers additional features

Special Placeholders

  • {account} : Fuzzy search existing accounts
  • {payee} : Fuzzy search existing payees
  • {cur} : Fuzzy search existing commodities
  • {tag} : Fuzzy search existing tags and values
  • {tag_name}: Search tag name after "_" and fuzzy search existing values for this tag
  • {months} : Prompt initial and end dates both inclusive. Diferent from default hledger
  • {type} : Select between accounts type

Shell Commands

Commands name using {shell_name} doesn't run hledger by default. It can accept any shell command and receive aditional data from TUI programs with dialog, menus, etc.

Placeholder [file] subtitute for the path of the first file informed with --file option.

Can not save to pdf file. Only output to stdout.

Sub directive format

#+args [command name]:[hledger options]
#+args [other command_name]:[other hledger options]

Example:

#+args buy_aapl:bal desc:\"Buy AAPL\"
#+args aapl_cur:bal desc:\"Buy AAPL\" cur:{commodity}

[NAME]: Command names to run saved in the journal sub directives. Not available in Interactive mode


Options

                                                                               
╭─ Options ────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  *   --file          -f   Pass the journal file path. Can be multiple files  │
│                           (TEXT)                                             │
│                           [required]                                         │
│                                                                              │
│      --interactive   -i   Run in interactive mode by answering prompts.      │
│                           [NAME] is not used in this mode.                   │
│                                                                              │
│      --pdf-file      -o   output the report to the specified file in pdf     │
│                           (FILE)                                             │
│                                                                              │
│      NAME                 (TEXT)                                             │
│                                                                              │
│      --help          -h   Show this message and exit.                        │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Installation

Dependencies

  • python 3.8
  • hledger

Installation command

pip install --upgrade hledger-args

Metadata

Release files for hledger-args 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hledger-args 0.1.1
File Size Uploaded Provenance
hledger_args-0.1.1.tar.gz 10.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hledger-args 0.1.1
File Interpreter ABI Platform
hledger_args-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / hledger_args-0.1.1.tar.gz

Download URL hledger_args-0.1.1.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
578b81f3eb6ac5ed85a84a739e5b8105ef400aab9193958719f63ff89c6ece9a
BLAKE2b-256 checksum
How to use checksums
d73d8dbffe5fb06be486a4c768726edf88edd6f7cb91c3e9165d086c7a82872c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / hledger_args-0.1.1-py3-none-any.whl

Download URL hledger_args-0.1.1-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be4a0a9953b3bb8779b9c890752873c8751897438ec07fd3f61e84f70701c008
BLAKE2b-256 checksum
How to use checksums
8a70a076d9560aa36ac1980b7a0479a4f79c712183185c0bc11eb40e1c87d7d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for hledger-args 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page