#ledger-cli #ledger #plain-text-accounting #cli

bin+lib pricedb

Commodity price retrieval, storage, and export in format compatible with Plain-Text Accounting applications

41 releases (stable)

2.8.1 Mar 6, 2024
2.8.0 Oct 10, 2023
2.7.0 Sep 5, 2023
2.6.0 May 21, 2023
0.9.9 Dec 9, 2022

#27 in Finance

Download history 655/week @ 2024-02-21 226/week @ 2024-02-28 150/week @ 2024-03-06 89/week @ 2024-03-13 11/week @ 2024-03-20 18/week @ 2024-03-27 21/week @ 2024-04-03

57 downloads per month

GPL-3.0-or-later

65KB
1.5K SLoC

pricedb-rust

Retrieving, storing, and exporting commodity prices in Ledger format

Introduction

This utility downloads and stores commodity prices used by Ledger-cli.

It stores the prices in an Sqlite database.

This is a continuation of the Price Database project. The previous version was implemented in Python. It has been migrated to Rust.

Usage

Configuration

Before usage, you need to add the paths to the configuration file. Run pricedb config show to see the location of the file.

It is located in the user's config directory, i.e. ~/.config/pricedb/pricedb.toml or C:\Users\<user>\AppData\Roaming\pricedb\config\pricedb.toml.

Populate the price_database_path with the full path to the db file, i.e. /my_files/prices.db. export_destination is the path to the file into which the prices will be exported.

Data Store

A template database file is available at the data directory in the Python repository. This can be used temporarily, until the database initialization scripts are consolidated.

This manual method currently used to bootstrap the database file. The functionality to automatically generate the database file will be implemented as a command. It is currently only used in tests.

Commands

The application is a Command-Line Interface (CLI) and displays the available options when run. The most-common commands:

pricedb dl
pricedb prune
pricedb export

Change Log

See here.

Dependencies

~16–32MB
~500K SLoC