Skip to main content

Helper Functions for hledger plain text accounting

Project description

hledger Helper (hhelper) - A Command-Line Tool for Managing hledger Files

Github

Welcome to hledger Helper (hhelper), a command-line tool for simplifying and enhancing your experience with hledger, the plain-text accounting tool. Whether you're managing transactions, cleaning up your journal, fetching commodity prices, or generating recurring transactions, hhelper is here to make your life easier.

🌟 Features

hledger Helper comes packed with powerful features to streamline your accounting workflow:

  1. Mark Transactions as Cleared Easily mark transactions as cleared directly from the command line. No more manual editing of your ledger files!

  2. Clean Up Journal Automatically clean and format your hledger journal file. This includes aligning amounts, removing unnecessary spaces, and ensuring your journal is valid.

  3. Fetch Prices Fetch historical commodity prices using Yahoo Finance and append them to your price file. Perfect for keeping your commodity valuations up to date.

  4. Generate Recurring Transactions Automatically generate recurring transactions based on your predefined rules. Save time by automating repetitive entries.

🚀 Getting Started

Prerequisites

  • Python 3.11 or higher
  • hledger 1.25 or higher
  • A valid config.toml file in ~/.config/hhelper/ (see example config)

Installation

# install uv (package manager):
curl -LsSf https://astral.sh/uv/install.sh | sh

# restart your terminal, or run the following command:
source $HOME/.local/bin/env # or follow instructions

# install hhelper through uv
uv tool install hhelper

# Run the tool
hh

Screenshots

Main menu Clean up journal Clearing transaction Fetching prices Generating recurring transaction

🛠️ Usage

Once you've launched hhelper, you'll be greeted with a user-friendly menu where you can select from the available options:

  1. Mark Transactions as Cleared Navigate through your uncleared transactions and mark them as cleared with a single keypress.

  2. Clean Up Journal Automatically clean and format your journal file. The tool will ensure your journal is valid before making any changes.

  3. Fetch Prices Fetch historical prices for your commodities and append them to your price file. You can review the fetched prices before saving.

  4. Generate Recurring Transactions Generate recurring transactions based on a period expression. Preview the transactions before appending them to your journal.

⚙️ Configuration

hhelper requires a config.toml file located at ~/.config/hhelper/config.toml. This file should define the paths to your ledger, price, header, and recurring transaction files. Here's an example configuration:

[paths]
directory = "~/finance"
ledger_file = "journal.ledger"
price_file = "prices.ledger"
header_file = "header.ledger"
recurring_tx_file = "recurring.ledger"

[commodities]
commodity_pairs = [
    { symbol = "AAPL", base_currency = "USD", quote_currency = "AAPL", is_append_space = true },
    { symbol = "BTC-USD", base_currency = "USD", quote_currency = "BTC", is_append_space = false },
]

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙌 Contributing

Contributions are welcomed! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request. Let's make hhelper even better together!

💬 Feedback

If you have any questions, suggestions, or just want to say hello, feel free to open an issue or reach out to us. We'd love to hear from you!


Happy accounting with hledger Helper! 🎉

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

hhelper-0.1.4.tar.gz (736.2 kB view details)

Uploaded Source

Built Distribution

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

hhelper-0.1.4-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file hhelper-0.1.4.tar.gz.

File metadata

  • Download URL: hhelper-0.1.4.tar.gz
  • Upload date:
  • Size: 736.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for hhelper-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2451441e58858d901fc77e65bf9e9eabd50f8fe071be4c1680eb50d56062573a
MD5 d8dc26bf61ced46f1dd3ff92b81b6528
BLAKE2b-256 871ab5cafc36f3156f6deb658ed2f4f93b46dcb27ae60327dc8418ee3a76a542

See more details on using hashes here.

File details

Details for the file hhelper-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: hhelper-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for hhelper-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce2d7dc3646388c0c7201433a74ba54d1ad50d17e72235b1575be57495e359b
MD5 896107ecfcbf1d7c5ce5b5bd33b2e312
BLAKE2b-256 2c528d5ec7303a39e60a21233b38c899a4b08849a4ea90072a0affd33ff5c72c

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