[![coverage report](https://gitlab.com/nobodyinperson/hledger-utils/badges/main/coverage.svg)](https://gitlab.com/nobodyinperson/hledger-utils/-/commits/main)
[![pipeline status](https://gitlab.com/nobodyinperson/hledger-utils/badges/main/pipeline.svg)](https://gitlab.com/nobodyinperson/hledger-utils/-/commits/main)
[![REUSE status](https://api.reuse.software/badge/gitlab.com/nobodyinperson/hledger-utils)](https://api.reuse.software/info/gitlab.com/nobodyinperson/hledger-utils)
[![PyPI version](https://badge.fury.io/py/hledger-utils.svg)](https://badge.fury.io/py/hledger-utils)
[![Downloads](https://static.pepy.tech/badge/hledger-utils)](https://pepy.tech/project/hledger-utils)
# 🛠️ `hledger` Utilities
This Python package extends [`hledger`](https://hledger.org) the [plaintextaccounting](https://plaintextaccounting.org) tool with some utilities.
## ✨ Features Added to `hledger`
### `hledger edit ...`: 📝 Editing `hledger` Transactions in your `$EDITOR`
```bash
# 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:
[![asciicast](https://asciinema.org/a/549559.svg)](https://asciinema.org/a/549559)
### `hledger plot ...`: 📈 Plotting charts of hledger queries
```bash
# 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:
![hledger plot](https://gitlab.com/nobodyinperson/hledger-utils/-/raw/main/doc/hledger-plot.png)
Note: Currently, only the `balance` command output can be plotted. `hledger-plot` has many options, check them out with `hledger-plot --help`, most notably:
- `--sum`ming and `--mean`ing columns by regex
- `--multiply`ing a column with a factor
- Filtering columns with `--drop` and `--only` regexes
- `--resample`ing to a different interval, e.g. 10 days with `--resample 10d`
- adding `--trend`s to (specific time periods of) columns and show slope in legend at configurable interval
- grouping e.g. by quarter with `--groupby quarter` to compare quarters
- `--style`ing depending on the account name
Consider converting your amounts to one currency (e.g. `-X€`) and using `--historical`. `--stacked --barplot`s are also available.
See [the `doc/` folder](https://gitlab.com/nobodyinperson/hledger-utils/-/tree/main/doc) for examples of `hledger-plot`.
## 📦 Installation
```bash
# 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`](https://aur.archlinux.org/packages/hledger-utils) (latest release) and [`hledger-utils-git`](https://aur.archlinux.org/packages/hledger-utils-git) (development version).
## 📝 Changelog
Version tags (`v*`) are annotated with a summary of changes. You can view them for example [on GitLab](https://gitlab.com/nobodyinperson/hledger-utils/-/tags) or from the repository with this command:
```bash
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)'
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/nobodyinperson/hledger-utils",
"name": "hledger-utils",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "hledger,extension,plugin,plaintextaccounting",
"author": "Yann Buechau",
"author_email": "nobodyinperson@posteo.de",
"download_url": "https://files.pythonhosted.org/packages/98/98/f33477595ad817096f043bcd5ba4e19e300e6ea1cd8f51f0369dd72af8f6/hledger-utils-1.14.0.tar.gz",
"platform": null,
"description": "[![coverage report](https://gitlab.com/nobodyinperson/hledger-utils/badges/main/coverage.svg)](https://gitlab.com/nobodyinperson/hledger-utils/-/commits/main)\n[![pipeline status](https://gitlab.com/nobodyinperson/hledger-utils/badges/main/pipeline.svg)](https://gitlab.com/nobodyinperson/hledger-utils/-/commits/main)\n[![REUSE status](https://api.reuse.software/badge/gitlab.com/nobodyinperson/hledger-utils)](https://api.reuse.software/info/gitlab.com/nobodyinperson/hledger-utils)\n[![PyPI version](https://badge.fury.io/py/hledger-utils.svg)](https://badge.fury.io/py/hledger-utils)\n[![Downloads](https://static.pepy.tech/badge/hledger-utils)](https://pepy.tech/project/hledger-utils)\n\n# \ud83d\udee0\ufe0f `hledger` Utilities\n\nThis Python package extends [`hledger`](https://hledger.org) the [plaintextaccounting](https://plaintextaccounting.org) tool with some utilities.\n \n## \u2728 Features Added to `hledger`\n\n### `hledger edit ...`: \ud83d\udcdd Editing `hledger` Transactions in your `$EDITOR`\n\n```bash\n# Opens your EDITOR (or VISUAL) with only transactions in \u20ac that have a Berlin tag\n# You can modify them as usual, if you save and quit the editor, the changes will be\n# applied to the appropriate files\nhledger edit cur:\u20ac tag:location=Berlin\n\n# Opens your EDITOR with all transactions\nhledger edit\n\n# If you don't have LEDGER_FILE set, you need to specify a journal file as usual:\nhledger edit -f journal.hledger\n\n# More examples and explanations:\nhledger edit --help\n```\n\nThis 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.\n\n\ud83c\udfa5 Check this screencast below to see `hledger edit` in action:\n\n[![asciicast](https://asciinema.org/a/549559.svg)](https://asciinema.org/a/549559)\n\n### `hledger plot ...`: \ud83d\udcc8 Plotting charts of hledger queries\n\n```bash\n# Open an interactive line chart of your assets with forecast (if available) and also save it as PNG\nhledger plot -- balance ^Assets --daily --exchange=USD --historical --forecast -o assets.png\n\n# Help, examples and configuration options (renaming, inverting, summing, styling, etc..)\nhledger plot --help\n```\n\n\ud83d\udcc8 Example plot:\n\n![hledger plot](https://gitlab.com/nobodyinperson/hledger-utils/-/raw/main/doc/hledger-plot.png)\n\nNote: Currently, only the `balance` command output can be plotted. `hledger-plot` has many options, check them out with `hledger-plot --help`, most notably:\n\n- `--sum`ming and `--mean`ing columns by regex\n- `--multiply`ing a column with a factor\n- Filtering columns with `--drop` and `--only` regexes\n- `--resample`ing to a different interval, e.g. 10 days with `--resample 10d`\n- adding `--trend`s to (specific time periods of) columns and show slope in legend at configurable interval\n- grouping e.g. by quarter with `--groupby quarter` to compare quarters\n- `--style`ing depending on the account name\n\nConsider converting your amounts to one currency (e.g. `-X\u20ac`) and using `--historical`. `--stacked --barplot`s are also available.\n\nSee [the `doc/` folder](https://gitlab.com/nobodyinperson/hledger-utils/-/tree/main/doc) for examples of `hledger-plot`.\n\n## \ud83d\udce6 Installation\n\n```bash\n# Install this package from PyPI:\npipx install hledger-utils\n\n# Install the latest development version:\npipx install git+https://gitlab.com/nobodyinperson/hledger-utils\n\n# Install from the repository root\ngit clone https://gitlab.com/nobodyinperson/hledger-utils\ncd hledger-utils\npipx install .\n```\n\nThe previous commands will install `hledger-edit` and `hledger-plot` to `~/.local/bin/` by default. Make sure that directory is in your `PATH`.\n\n\nThis package is also available in the AUR as [`hledger-utils`](https://aur.archlinux.org/packages/hledger-utils) (latest release) and [`hledger-utils-git`](https://aur.archlinux.org/packages/hledger-utils-git) (development version).\n\n## \ud83d\udcdd Changelog\n\nVersion tags (`v*`) are annotated with a summary of changes. You can view them for example [on GitLab](https://gitlab.com/nobodyinperson/hledger-utils/-/tags) or from the repository with this command:\n\n```bash\ngit 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)'\n```\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Utilities enhancing hledger",
"version": "1.14.0",
"project_urls": {
"Homepage": "https://gitlab.com/nobodyinperson/hledger-utils"
},
"split_keywords": [
"hledger",
"extension",
"plugin",
"plaintextaccounting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c9c069f1ed350d88b38e5bb478273cb8673595222dfa5f2d905fa4a9e8e13ce4",
"md5": "8ddf28975ab3032c44f94e593cd68f3c",
"sha256": "80f60617ea5f8ae6ca8031555ce01fc90e7ec90d0050e9a1c2d6ec70323e5d11"
},
"downloads": -1,
"filename": "hledger_utils-1.14.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8ddf28975ab3032c44f94e593cd68f3c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 48356,
"upload_time": "2023-11-17T09:21:12",
"upload_time_iso_8601": "2023-11-17T09:21:12.888960Z",
"url": "https://files.pythonhosted.org/packages/c9/c0/69f1ed350d88b38e5bb478273cb8673595222dfa5f2d905fa4a9e8e13ce4/hledger_utils-1.14.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9898f33477595ad817096f043bcd5ba4e19e300e6ea1cd8f51f0369dd72af8f6",
"md5": "e2eac5147b36d0ab6354ae6084cbb67d",
"sha256": "d4fcd345ccae05ef62d3d21337cd6173af9ef3d919ffd9e7650a10ba31392486"
},
"downloads": -1,
"filename": "hledger-utils-1.14.0.tar.gz",
"has_sig": false,
"md5_digest": "e2eac5147b36d0ab6354ae6084cbb67d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 197690,
"upload_time": "2023-11-17T09:21:52",
"upload_time_iso_8601": "2023-11-17T09:21:52.067164Z",
"url": "https://files.pythonhosted.org/packages/98/98/f33477595ad817096f043bcd5ba4e19e300e6ea1cd8f51f0369dd72af8f6/hledger-utils-1.14.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-17 09:21:52",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "nobodyinperson",
"gitlab_project": "hledger-utils",
"lcname": "hledger-utils"
}