Skip to main content

No project description provided

Project description

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 or new
{payee} fuzzy search existing payee or new
{tag} fuzzy search existing tags or values or new
{months} prompt initial and end dates both inclusive. **Diferent from default hledger-args

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.                
                                                                             

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.0.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

hledger_args-0.0.3-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hledger_args-0.0.3.tar.gz
Algorithm Hash digest
SHA256 449ed587e9c56ccd03d2449e6c3c10bd1e07b8ccf01909dc742122035c1c67c3
MD5 597e051492ccc62d8dae617fc34695ae
BLAKE2b-256 0918d0a2bb4ad5ded74672a0e08c02c3a7741c3f9fb5c74e83a17f31a0245f3a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hledger_args-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d0c099662dcdbfe8896955650db9f9387ef8d6f116e894c6b36088a28a1e07f
MD5 120b07673a81e185dbd322a87be87bb6
BLAKE2b-256 ecba741821030a8c1b0132d78cd431fce04ea2132cc6267903f2aeedae17c581

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