Utilities enhancing hledger
Project description
🛠️ hledger Utilities
This Python package extends hledger the plaintextaccounting tool with some utilities.
✨ Features Added to hledger
hledger edit ...: 📝 Editing hledger Transactions in your $EDITOR
# Opens your EDITOR (or VISUAL) with only transactions in € that have a Berlin tag
# You can modify them as usual, if you save and quit the editor, the changes will be
# applied to the appropriate files
hledger edit cur:€ tag:location=Berlin
# Opens your EDITOR with all transactions
hledger edit
# If you don't have LEDGER_FILE set, you need to specify a journal file as usual:
hledger edit -f journal.hledger
# More examples and explanations:
hledger edit --help
This should work with pretty much any hledger query, just substitute hledger balance or hledger register etc. with 'hledger edit'. This is a neat way of quickly editing transactions you were just inspecting.
🎥 Check this screencast below to see hledger edit in action:
hledger plot ...: 📈 Plotting charts of hledger queries
# Open an interactive line chart of your assets with forecast (if available) and also save it as PNG
hledger plot -- balance ^Assets --daily --exchange=USD --historical --forecast -o assets.png
# Help, examples and configuration options (renaming, inverting, summing, styling, etc..)
hledger plot --help
📈 Example plot:
Note: Currently, only the balance command output can be plotted. hledger-plot has many options, check them out with hledger-plot --help, most notably:
--summing and--meaning columns by regex--multiplying a column with a factor- Filtering columns with
--dropand--onlyregexes --resampleing to a different interval, e.g. 10 days with--resample 10d- adding
--trends to (specific time periods of) columns and show slope in legend at configurable interval - grouping e.g. by quarter with
--groupby quarterto compare quarters --styleing depending on the account name
Consider converting your amounts to one currency (e.g. -X€) and using --historical. --stacked --barplots are also available.
See the doc/ folder for examples of hledger-plot.
📦 Installation
# Install this package from PyPI:
pipx install hledger-utils
# Install the latest development version:
pipx install git+https://gitlab.com/nobodyinperson/hledger-utils
# Install from the repository root
git clone https://gitlab.com/nobodyinperson/hledger-utils
cd hledger-utils
pipx install .
The previous commands will install hledger-edit and hledger-plot to ~/.local/bin/ by default. Make sure that directory is in your PATH.
This package is also available in the AUR as hledger-utils (latest release) and hledger-utils-git (development version).
📝 Changelog
Version tags (v*) are annotated with a summary of changes. You can view them for example on GitLab or from the repository with this command:
git tag -l 'v*' -n99 --sort=-version:refname --format='%(color:green)%(refname:strip=2)%(color:yellow) (%(color:cyan)%(creatordate:format:%a %b %d %Y)%(color:yellow))%0a%(color:magenta)==========================%0a%0a%(color:yellow)%(contents:subject)%(color:normal)%0a%0a%(contents:body)'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hledger-utils-1.14.0.tar.gz.
File metadata
- Download URL: hledger-utils-1.14.0.tar.gz
- Upload date:
- Size: 197.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4fcd345ccae05ef62d3d21337cd6173af9ef3d919ffd9e7650a10ba31392486
|
|
| MD5 |
e2eac5147b36d0ab6354ae6084cbb67d
|
|
| BLAKE2b-256 |
9898f33477595ad817096f043bcd5ba4e19e300e6ea1cd8f51f0369dd72af8f6
|
File details
Details for the file hledger_utils-1.14.0-py3-none-any.whl.
File metadata
- Download URL: hledger_utils-1.14.0-py3-none-any.whl
- Upload date:
- Size: 48.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80f60617ea5f8ae6ca8031555ce01fc90e7ec90d0050e9a1c2d6ec70323e5d11
|
|
| MD5 |
8ddf28975ab3032c44f94e593cd68f3c
|
|
| BLAKE2b-256 |
c9c069f1ed350d88b38e5bb478273cb8673595222dfa5f2d905fa4a9e8e13ce4
|