Skip to main content

No project description provided

Project description

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

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

hledger_args-0.1.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

hledger_args-0.1.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hledger_args-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for hledger_args-0.1.1.tar.gz
Algorithm Hash digest
SHA256 578b81f3eb6ac5ed85a84a739e5b8105ef400aab9193958719f63ff89c6ece9a
MD5 e69ce92dc20a125bcd4d30dc79ef6b40
BLAKE2b-256 d73d8dbffe5fb06be486a4c768726edf88edd6f7cb91c3e9165d086c7a82872c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hledger_args-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for hledger_args-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be4a0a9953b3bb8779b9c890752873c8751897438ec07fd3f61e84f70701c008
MD5 3db3f04d8e844adb2c94cb8b771cd1b3
BLAKE2b-256 8a70a076d9560aa36ac1980b7a0479a4f79c712183185c0bc11eb40e1c87d7d2

See more details on using hashes here.

Supported by

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