Skip to content

Export sessions to CSV and back up the database - #42

Merged
Fazorath merged 3 commits into
mainfrom
worktree-issue-25-csv-export-backup
Oct 25, 2026
Merged

Fazorath merged 3 commits into
mainfrom
worktree-issue-25-csv-export-backup

Conversation

@Fazorath

Copy link
Copy Markdown
Owner

Closes #25

What

  • Export CSV on the History page: one row per run with its session's details, following the current All/Abyss/Incursion filter. A session with no runs yet still gets a row.
  • Back up and Restore for tracker.db, using SQLite's backup API so the copy is consistent while the app is open.
  • Restore checks the file first (integrity, has sessions and runs), so a bad file leaves current data alone. Backups from older schemas are migrated on restore, and the session pages re-sync afterwards.
  • Core logic is Tracker.export_csv, backup and restore, with 10 new tests in test_export.py.

Testing

  • The 67 non-GUI tests pass on Python 3.13.
  • The GUI tests segfault on my machine in a headless session, and they do so on untouched main too. So the new History buttons are untested by running them. Worth a click-through before merging.

Known gaps

  • Restoring while a timer is running does not reset the timer or the pocket overlay.
  • The CSV has no BOM, so Excel on Windows may mis-render non-ASCII text. Current values are all ASCII.

@Fazorath
Fazorath merged commit 2d8c714 into main Oct 25, 2026
7 checks passed
@Fazorath
Fazorath deleted the worktree-issue-25-csv-export-backup branch October 25, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export sessions to CSV and back up the database

1 participant