hledger-args
Description
In basic usage, this package is a replacement for hledger command file using custom directives inside the journal file, instead of referencing to a command args file.
In interactive mode, the user can create menus using placeholders. Each placeholders will become a prompt and be replaced by the value entered. So the user will be able to create a multi prompt report composed by fixed options already defined and leave some to the user each time this package is executed.
Interactive Mode
Instead of giving the the desired command thru a command-line argument, choose it by selecting from a menu using the flag --interactive
Special placeholders
| Placeholders | Description |
|---|---|
| {account} | fuzzy search existing accounts |
| {payee} | fuzzy search existing payee |
| {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 |
| {cur} | fuzzy search existing commodities |
Installation
Dependencies
- python 3.8
- hledger
Installation command
pip install --upgrade hledger-args
Sub directive
Add lines according to the format below:
#+args [command name]:[hledger options]
#+args [other command_name]:[other hledger options]
Examples/Data
#+args buy_aapl:bal desc:\"Buy AAPL\"
#+args aapl_cur:bal desc:\"Buy AAPL\" cur:{commodity}
Usage
After adding the commands using sub directives, run hledger-args -f [journal file]. Without any option or argument, it output the existing ones divided between interactive and non interactive. Those with placeholders can only be on interactive-mode, so an error if be raised without the --interactive flag.
If not running on interactive mode, arguments after
Usage: hledger-args [OPTIONS] [NAME] [EXTRA_HLEDGER_OPTIONS]...
NAME: Command name to run saved in the journal sub directives. Not available
in Interactive mode
EXTRA_HLEDGER_OPTIONS: Extra options to send to hledger command. Not available
in Interactive mode.
* --file -f Inform the journal file path
(TEXT) ```
[required]
--interactive -i Run in interactive mode by answering the
prompts. [NAME] and
[EXTRA_HLEDGER_OPTIONS] are not used in
this mode.
NAME (TEXT)
EXTRA_HLEDGER_OPTIONS (TEXT)
--help -h Show this message and exit.
Metadata
Release files for hledger-args 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hledger_args-0.0.6.tar.gz | 11.4 kB | Without provenance | Details for hledger_args-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hledger_args-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for hledger_args-0.0.6-py3-none-any.whl |
Total release size: 30.4 kB
Release files / hledger_args-0.0.6.tar.gz
| Download URL | hledger_args-0.0.6.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7460244e95b9d3f1d30f2e33fb4c67492142d09b587c2d02370178e88ffc465
|
|
BLAKE2b-256 checksum How to use checksums |
bd7d77907bd1c0f30dbfe103d4647bfc3945e0024b8db91c43775a5e8ce35baf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / hledger_args-0.0.6-py3-none-any.whl
| Download URL | hledger_args-0.0.6-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f750b8573b2bcda62716f20b55d8cb4ae8e4eedbc6cd03fe60e000e1767a234
|
|
BLAKE2b-256 checksum How to use checksums |
f314f05f8dea7053ddbf0da863399d728fe5ebb3181629741e541820af2c73f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for hledger-args 0.0.6
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.