Covert storage to sqlite backed, added ink history

This commit is contained in:
Don Harper 2026-06-14 00:24:13 -05:00
parent 1d16056f4f
commit c38a3cabc4
12 changed files with 397 additions and 150 deletions

View file

@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: pen-tracker
Version: 0.5.0
Version: 0.5.1
Summary: A fountain pen collection tracker.
Author-email: Don Harper <don@donharper.org>
Requires-Python: >=3.8
@ -20,9 +20,9 @@ pip install .
## Data Storage
Pen data is stored in `~/.local/share/pen-tracker/pens.csv` by default, following XDG Base Directory specification. The directory is created automatically if it doesn't exist.
Data is stored in a SQLite database by default at `~/.local/share/pen-tracker/pen_tracker.db`, following the XDG Base Directory specification. The directory is created automatically if it doesn't exist.
You can override the location by setting the `PEN_TRACKER_CSV` environment variable.
You can override the location by setting the `PEN_TRACKER_DB` environment variable or using `--db` when running the CLI.
## Usage
@ -35,11 +35,20 @@ pen-tracker
Command-line mode:
```bash
pen-tracker add --make "Pilot" --model "Metropolitan" --nib "F"
pen-tracker --db ~/.local/share/pen-tracker/pen_tracker.db add --make "Pilot" --model "Metropolitan" --nib "F"
pen-tracker list
pen-tracker export --output my_pens.json
```
### Import CSV data
If you are migrating from the old CSV storage format, run:
```bash
python import_csv_to_sqlite.py --db ~/.local/share/pen-tracker/pen_tracker.db
```
The import script will initialize the SQLite database if it does not already exist.
## Features
- Track fountain pens with details like make, model, nib, ink, etc.