Changelog
[0.8.6] - 2026-02-10
Added
- New
Sick Leaveposition (--pos s) - Optional range support via
--to(start date is the commandDATE) - Automatic skipping of:
- Weekends (Saturday/Sunday)
- National holidays
- Dates already containing events
Changed
- Sick Leave is now stored as a non-working marker day (sentinel event at
00:00, similar to Holiday) listrendering updated:- IN/OUT/TGT displayed as
--:-- - Sick Leave days do not contribute to ΔWORK totals
- IN/OUT/TGT displayed as
- CLI validation improved:
--tois only allowed with--pos s- If
--tois omitted, Sick Leave applies only to the specifiedDATE
recalc_pairs_for_dateupdated to accept&Connection- Refactored
addflow to cleanly separate:- marker days
- working days
- range handling
Fixed
- Prevented
00:00IN time from being displayed for Sick Leave - Prevented incorrect surplus/deficit calculations for Sick Leave days
- Improved argument validation consistency in
add
v0.8.5 — 2026-01-13
Added
- Enhanced
addcommand to display the calculated target exit time (TGT)
immediately after adding an IN event.
Changed
- Unified IN and OUT event creation through a shared CLI helper.
- Removed duplicated upsert logic in edit and insert modes.
- Reused existing time formatting utilities for target time rendering.
Internal
- Refactored
addcommand logic to improve readability and maintainability
without changing existing behavior.
v0.8.4 — 2026-01-09
Changed
- Improved
listcommand output forNational Holidaydays:- time placeholders (
--:--) are no longer shown - the
metafield is displayed instead, providing a meaningful holiday description
- time placeholders (
- Made
National Holidayrow layout adaptive to table width:- meta column now expands dynamically based on the current table layout
- works consistently across weekday display modes and
--compact
- Unified and hardened
metarendering:- meta values are filtered, concatenated, and truncated in a single helper
- truncation is Unicode-safe (char-based, UTF-8 safe)
- optional ellipsis (
…) is applied when truncation occurs
- Added focused unit tests for
get_meta_stringto validate:- filtering of empty metadata
- correct concatenation
- Unicode-safe truncation behavior
Internal
- Refactored list rendering logic to reduce hardcoded column widths
- Improved robustness of table layout against future column size changes
[0.8.3] – 2026-01-08
✨ New features
-
Import data from JSON and CSV files
- New
importcommand to insert events into the database from external sources. - Supported formats:
JSON(flexible structures: root array,{ days: [...] },{ holidays: [...] })CSV(with header row).
- Supported options:
--file <path>: input file--format <json|csv>(default:json)--dry-run: simulate the import without modifying the database--replace: overwrite existing conflicting data--source: logical label describing the data origin
- New
-
National holidays support
- Added new position
NationalHoliday. - National holidays:
- do not affect the user vacation balance
- are compatible with automatic/preventive imports (e.g. yearly calendars).
- Added new position
-
Preventive holiday import
- Allows preparing JSON/CSV files with annual holidays and importing them in advance.
- Reduces manual errors and forgotten entries.
🔧 Improvements
-
Enhanced data source tracking
- The
sourcefield of imported events now automatically includes the input format
(e.g.import (from json),import (from csv)).
- The
-
metafield support for imported events- Descriptive data (e.g. holiday name) is stored in the
metafield as JSON. - Example:
{ "name": "New Year" }
- Descriptive data (e.g. holiday name) is stored in the
-
Refactor of
Event::new()constructor- The constructor now explicitly supports:
metasource
- Clear separation between CLI-created events and imported events.
- The constructor now explicitly supports:
-
Database query refactor
- Split
db::queriesinto topic-based submodules. - Fixed module conflict between
queries.rsandqueries/mod.rs.
- Split
-
Shared utilities
- Added helper functions in
utils::formattingto standardizesourcegeneration.
- Added helper functions in
🛠 Fixes
- Improved validation of imported records:
- invalid dates
- unsupported positions
- malformed rows
- Improved import reporting:
- total rows
- imported rows
- skipped rows
- conflicts
- invalid rows
🧪 Developer notes
- All import logic is isolated in the
src/importmodule. - Full
dry-runsupport for safe testing on real databases. - Solid foundation for future integrations (ICS calendars, APIs, external sync).
[0.8.2] — 2026-01-08
✨ Added
- Added a new day position National holiday (N) to represent public holidays that do not affect personal holiday
allowance. - Introduced support for
--pos n/--pos nationalin theaddcommand to mark national holidays. - Added idempotent database migration to extend the
events.positionCHECK constraint with the newNvalue.
🧠 Changed
- Updated daily and compact list views to properly display National holiday days with neutral time and ΔWORK values.
- Improved semantic distinction between Holiday (personal leave) and National holiday (public holiday) in
reports and summaries.
🐞 Fixes
- Ensured database migrations safely no-op when the schema is already aligned.
- Fixed SQL escaping issues in migration logging statements.
🧹 Internal
- Extended Location enum and related parsing/formatting utilities.
- Refined migration logging for better traceability and robustness.
[0.8.1] - 2026-01-07
✨ New
- Added list --compact output mode for a concise, single-line daily overview.
- Introduced unified date column format YYYY-MM-DD (WD) with configurable weekday length.
- Improved visual hierarchy for list --details with highlighted DETAILS section header.
- Added dynamic table width handling based on weekday display mode (None, Short, Medium, Long).
🔧 Improvements
- Refactored list command rendering logic for better layout consistency and maintainability.
- Harmonized table headers and footers across standard and compact list views.
- Improved footer alignment using dynamic table width calculation.
- Clarified labels:
- Expected → Target end
- Surplus → ΔWORK
- Enhanced compact delta formatting (e.g. +02h04m).
- Automatic re-print of table headers when switching month during period listing.
- Improved holiday visualization:
- All time fields shown as --:--
- Greyed output
- Neutral contribution to totals.
🐞 Fixes
- Fixed incorrect handling of --pos h (Holiday) requiring --in/--out.
- Fixed misleading error classification (InvalidTime → InvalidArgs) for invalid CLI combinations.
- Fixed surplus calculation edge cases when work gaps are present.
- Fixed weekday width/layout inconsistencies across different display modes.
- Removed unused variables and eliminated compiler warnings in list.rs.
🧹 Internal
- Introduced WeekdayMode enum for explicit weekday rendering control.
- Centralized table width logic via utils::table constants.
- Simplified footer formatting and alignment logic.
- Improved separation between presentation logic and data computation.
[v0.8.0] - 2025-12-18
🚀 Stable release — Timeline & Work Gap engine
This release marks the first stable 0.8.x version and concludes the alpha/beta cycle with a fully consolidated
timeline engine, correct multi-pair handling, and a refined CLI experience.
✨ Highlights
-
Stable multi-pair daily model
- Unlimited IN/OUT pairs per day
- Persistent pair numbering
- Fully deterministic timeline reconstruction
-
Working gap support (final)
- Explicit
--work-gap/--no-work-gapflags onOUTevents - Gaps can be added, removed, or edited retroactively
- Correct impact on worked time, expected exit, and surplus
- Clear visual indicators (🔗 / ✂️)
- Explicit
-
Accurate time calculations
- Worked time now correctly:
- sums all pairs
- subtracts non-working gaps
- includes working gaps only when explicitly marked
- Expected exit is consistently based on:
- first IN of the day
- configured minimum working time
- lunch rules and windows
- Surplus calculation is now fully reliable in all scenarios
- Worked time now correctly:
🧠 Changed
OUTevents without--posnow inherit the position of the corresponding IN- Day details view shows pair-level positions, not aggregated day position
- Timeline, pairing, and gap logic fully unified across:
listlist --eventslist --details- exports
🗄️ Database & Migration
- New stable column
events.work_gap - Safe, idempotent migrations with:
- automatic schema alignment
- backup before destructive changes
- Automatic recalculation of pairs and daily summaries after edits
🖥️ CLI & UX
- Unified message system across all commands:
- ℹ️ info ·
⚠️ warning · ❌ error · ✅ success
- ℹ️ info ·
- Clear, explicit confirmation messages for gap edits
- Cleaner event listings:
- no duplicated dates for multiple pairs
- improved visual alignment
📦 Export system (stable)
- Fully refactored export architecture
- Supported formats:
- CSV
- JSON
- XLSX
- PDF (multipage, styled, dynamic titles)
- Shared helpers and consistent overwrite handling
⚠️ Breaking changes
- Legacy
work_sessionstable is no longer used - Timeline-based model is now the single source of truth
- CLI behavior fully aligned with the new flag-based syntax introduced in 0.8.x
✅ Final notes
v0.8.0 represents a major architectural milestone.
The internal engine is now considered stable, correct, and extensible.
Future releases will focus on:
- automated tests
- performance refinements
- advanced reporting and statistics
[v0.8.0-beta3] - 2025-12-15
✨ Added
- 🔗 Working gap support between pairs via
--work-gapflag onOUTevents. - ✂️ Ability to remove a working gap using
--no-work-gapin edit mode. - New
work_gapboolean field stored in theeventstable. - Explicit confirmation messages when enabling or removing work gaps.
🧠 Changed
- Expected / surplus calculation now correctly accounts for non-working gaps between pairs.
OUTevents without--posnow inherit the position from the correspondingIN.- Day details view now shows the position of each pair, not the aggregated day position.
- Improved visual output in
list --events: repeated dates are no longer duplicated for multiple pairs.
🐞 Fixed
- Incorrect surplus calculation when non-working gaps were present between pairs.
- Wrong position assigned to
OUTevents when--poswas omitted. - Multiple inconsistencies in pair reconstruction and gap handling logic.
🗄️ Database
- Migration added to introduce the
work_gapcolumn to theeventstable. - Automatic recalculation of pairs, expected time, and surplus after gap updates.
[0.8.0-beta2] - 2025-12-12
✨ Added
-
Nuovo sistema PDF multipagina con gestione automatica:
- intestazione titolo per pagina
- numeri di pagina
- tabelle multilinea con header ripetuti
- zebra striping
- calcolo intelligente della larghezza colonne
-
Titolo PDF dinamico basato su
--range, con supporto a:- anno (
YYYY) - mese (
YYYY-MM) - giorno (
YYYY-MM-DD) - intervallo (
YYYY:YYYY,YYYY-MM:YYYY-MM, ecc.)
- anno (
-
Supporto ufficiale al nuovo enum
ExportFormat(CSV, JSON, XLSX, PDF) con validazione in Clap. -
Gestione uniforme dell’overwrite dei file con richiesta di conferma.
-
Helper condivisi in
export/utils.rs:build_pdf_titlepath_strto_io_app_error
🔧 Changed
- Riscrittura completa del sistema di messaggistica a video (UI):
- Tutti i messaggi CLI passano ora da
ui/messages.rs - Stile uniforme per info, successi, warning ed errori
- Emoji standardizzate:
- ℹ️ info
⚠️ warning- ❌ error
- ✅ success
- Prompt di conferma file riscritti usando la nuova UI
- Tutti i messaggi CLI passano ora da
- Refactor completo del modulo Export
- Suddivisione in:
logic.rscsv_export.rsjson_export.rsxlsx_export.rspdf_export.rsutils.rs
- Rimossi duplicati, ridotto il codice di oltre il 40%
- Migliorata la leggibilità e l’estendibilità del codice
- Suddivisione in:
- XLSX export migliorato
- gestione numeri, date e orari
- riduzione della duplicazione di codice
- stile coerente con il PDF
- Migrazioni Config riviste
- messaggi più chiari
- log più leggibili
- gestione errori unificata
🐛 Fixed
- Risolto crash PDF: “duplicate indirect reference id” grazie alla nuova gestione interna degli ID.
- Fix larghezza colonne in XLSX (ora corretto anche in caso di testi lunghi).
- Fix del sistema export che utilizzava ancora versioni duplicate di events_to_table.
- Fix comportamento --force in alcuni percorsi non assoluti.
🧹 Removed
- Codice legacy del vecchio export (ora sostituito da export/).
- Vecchio PdfManager monolitico (ora multipagina e completamente rifattorizzato).
🖥️ Unified console message system (dettaglio tecnico)
(Questa sezione compare solo nel CHANGELOG, non nel README)
La release introduce un nuovo sistema di messaggistica centralizzato, ora usato da tutti i comandi dell'app:
- Output coerente e stilisticamente uniforme
- Distinzione immediata delle tipologie di messaggi
- Addio ai
println!sparsi - Integrazione diretta nei flussi
init,export,config,db,migrate, ecc.
Esempi:
ℹ️ Exporting to PDF: report.pdf
⚠️ The file already exists. Overwrite? [y/N]:
❌ Error: invalid date format
✅ Export completed: report.pdf
[0.8.0-beta1] – 2025-12-10
🚀 Major changes
✔ Full rewrite of the list command
- The command is now fully based on the timeline model (
events → timeline → pairs). - The legacy table
work_sessionsis officially removed. - Consistent layout for:
listlist --todaylist --eventslist --details
- Automatic month separators when using
--periodspanning multiple months. - Intelligent ANSI-color output (green/red/gray) across all modes.
- Daily surplus formula rewritten as:
surplus = end_time – expected_exit.
✔ Correct handling of Expected Exit & Lunch
- Implemented lunch_window–aware expected exit calculation, fixing incorrect results when lunch was not explicitly
declared. - When the user records only
--in(no--outyet), expected exit now correctly includes:- required minimum lunch duration
- validation against lunch_window
- Lunch computation is now unified and extracted from the timeline model.
🗄 Database updates
✔ New command db
Introduced:
rtimelogger db --info→ show DB size, event count, date range, avg events/dayrtimelogger db --check→ PRAGMA integrity_checkrtimelogger db --vacuum→ compact and optimize DBrtimelogger db --migrate→ run schema migrations safely
✔ Safe migration to new schema ≥ 0.8.0-beta1
migrate.rsrewritten to support progressive migrations.- Removal of obsolete tables (
work_sessions) only when upgrading from pre-0.8.0 versions. - Automatic backup before performing destructive schema changes.
- Added and populated missing column
pairwhen required.
✔ Recalculation of all event pairs
- New utility:
db_utils::rebuild_all_pairs()
Ensures all IN/OUT events receive a correct, sequentialpairnumber.
🗂 Configuration system upgrades
✔ Auto-heal of missing config fields
When loading rtimelogger.conf, if any field is missing, the system now:
- Adds the missing key
- Assigns default value
- Saves updated config back to disk
✔ Added new setting lunch_window
Used to compute expected exit when lunch is not explicitly set by the user.
💾 Backup improvements
backup --file <path>now asks for confirmation before overwriting an existing file.- Improved clarity of success/error output.
- Compression logic unchanged, but now more robust.
🔧 Internal refactoring
- Consolidated ANSI color helpers (
gray,red,green,reset). - Unified naming/formatting in
formatting.rs. - Replaced scattered logic with consistent timeline-derived computations.
- Strong cleanup of unused or legacy code paths.
- Better error reporting in many critical code points.
🧹 Fixes
- Fixed wrong Expected Exit when lunch was defined only in one event of the pair.
- Fixed day surplus double-counting or off-by-lunch errors.
- Fixed visual misalignment in several output modes.
- Fixed pair generation inconsistencies in newly inserted events.
- Fixed config loading not saving newly introduced parameters.
[0.8.0-alpha2] - 2025-12-04
Changed
- The
addcommand has been fully redesigned to use a cleaner and more
explicit flag-based syntax. Positional parameters have been removed,
except for the requireddateargument. - The legacy positional fields (
pos_pos,start_pos,lunch_pos,
end_pos) have been removed from the CLI parser and internal API. - The new syntax is now:
rtimelogger add <date> --pos <code> --in HH:MM --out HH:MM --lunch <min>
Examples:
rtimelogger add 2025-12-03 --pos r --in 08:50rtimelogger add 2025-12-03 --in 09:00 --out 17:30 --lunch 45rtimelogger add 2025-12-03 --edit --pair 1 --out 15:30
Added
- The
addcommand now supports explicit, optional flags for: --pos(location)--in--out--lunch--pair--edit
This makes the command behavior clearer, more consistent, and easier to
extend in future releases.
Improved
- The
handle()function for theaddcommand has been simplified.
It now processes only the new flag-based syntax and no longer merges
legacy positional parameters. - The business logic
AddLogic::apply()has been refactored to remove
all references to positional parameter fallbacks. - Edit mode logic has been preserved and improved:
- Explicit flags override only the fields passed by the user
- IN-only, OUT-only, and lunch-only operations are now more predictable
- Invalid combinations generate clearer error messages
Notes
This release marks the beginning of the new 0.8.x CLI design, which will
gradually replace the legacy positional-parameter architecture with a
cleaner, more maintainable, and future-proof flag-only approach.
[0.8.0-alpha1] - 2025-11-30
🚀 Major Refactor & Architecture Overhaul
-
Fully reworked internal architecture of event handling, pairing, timeline construction, work sessions,
logging, and exporting. -
Unifying logic across
add,del,edit,backup,log, andexportcommands. -
Significantly improved code organization and separation of concerns across modules:
core/add.rs,core/del.rs,core/backup.rs,core/export.rsdb/queries.rsrewritten and consolidatedmodelsupdated for correctness and consistencyutilsupdated for date/time parsing and improved formatting
➕ Add Command Improvements
-
Complete rewrite of AddLogic with cleaner separation between parsing, validation, and DB operations.
-
All parameters (except date) are now optional, with automatic inference based on context.
-
Improved handling of positional arguments and flags.
-
Correct handling of editing existing pairs using
--editand--pair. -
Position (location) inference rules rewritten:
- If no position is provided, fallback to last event of the day.
- Default position remains
O(Office).
-
Fix for lunch-only updates without requiring an OUT event.
🗑️ Del Command Improvements
-
Introduced interactive confirmation prompts for destructive operations:
- Deleting a single pair now asks for confirmation.
- Deleting an entire date also asks for confirmation.
-
Logic moved fully into
core/del.rs. -
Proper timeline recalculation after deletions.
📝 Full Logging Redesign
-
Internal log now uses a clean and structured format.
-
Timestamp standardized to
%FT%T%:z. -
Added ANSI color output:
init→ orangeadd→ greendel→ rededit→ yellowmigration_applied→ purplemigrate_to_*→ purplebackup→ blue- fallback → white
-
Unified operation + target into one column with truncation to 60 chars.
-
Smart alignment of columns for a consistent table-like layout.
🗂️ Export System Rewrite
-
Entire export subsystem refactored into
core/export.rs. -
Added support for formats:
- CSV
- JSON
- XLSX (with professional Excel styling: freeze panes, custom formats, banded rows)
- PDF (via
PdfManager)
-
Added
--rangesupport matching--periodsyntax:YYYY,YYYY-MM,YYYY-MM-DDYYYY:YYYY,YYYY-MM:YYYY-MM,YYYY-MM-DD:YYYY-MM-DD
-
Smart parsing of Excel date/time formats.
-
Added
--forceto bypass overwrite confirmation. -
Enforced requirement for absolute file paths.
💾 Backup System Improvements
- Backup logic rewritten into
core/backup.rs. - Added ZIP compression using the
zipcrate. - Backup now logs its operation into the internal log.
- Automatic cleanup of uncompressed files after successful compression.
- Added error feedback for invalid paths and missing database file.
🧮 Pair Recalculation & Session Consistency
-
Pair recalculation fully rewritten.
-
Automatically updates
pairvalues after:- additions
- edits
- deletions
-
Fix for events being stored with incorrect pair values.
-
Timeline logic improved for IN/OUT matching.
🗃️ Database Query Layer
- Consolidated all DB read/write functions in
db/queries.rs. load_events_by_datenow works withNaiveDateinstead of string.map_rowimproved with safe parsing and better error reporting.- Removed deprecated
timestampfield usage.
🧱 Models & Utilities
- Updated
Event,EventType, andLocationto reflect the new structure. Locationnow has cleaner conversions:code,to_db_str,from_db_str,from_code.- Added time parsing helpers in
utils/time.rs. - Improved date parsing with better validation.
🧹 Cleanup and Misc Improvements
- Removed all deprecated functions and unused fields.
- Ensured consistent error handling using
AppErrorandAppResult. - Removed redundant arguments from handlers.
- Fixed warnings across multiple modules.
- Ensured database path resolution flows through config consistently.
⚙️ Migration Compatibility
- Added detection and logging for migrations (e.g.,
migrate_to_*). - ANSI color mapping extended for migration operations.
✔️ Final Notes
This release marks a major architectural milestone, with more than 80% of the application redesigned for
maintainability, correctness, and future expansion.
The next phase will introduce:
- unit tests
- integration tests
- timeline/export validation tests
rTimeLogger's internal engine is now finally stable and extensible.
[0.7.7] - 2025-12-01
Added
- Introduced the new
--periodfilter for thedb --rebuildcommand.
The rebuild process can now target a specific time interval instead of
processing the entire database. - Supported formats:
all→ rebuild all datesYYYY→ rebuild a full yearYYYY-MM→ rebuild a specific monthYYYY-MM-DD→ rebuild a single daystart:end→ rebuild a date range (inclusive)
Improved
- The rebuild function now parses the period string into a fully prepared
SQL query, simplifying the internal logic and improving maintainability. - Enhanced clarity and robustness of event selection logic.
- Reduced query duplication and unified result mapping via a single closure,
fixing a previous type mismatch (E0308) at compile time.
Behaviour
- The rebuild process still supports incomplete days (IN-only events), and
will generate validwork_sessionsentries with zero duration. - As in v0.7.6, a backup table is created before rebuilding and removed only
after a successful commit.
Notes
This feature enables selective reconstruction of the work_sessions table,
which is particularly useful when dealing with large databases or correcting
a specific time window without touching the rest of the data.
[0.7.6] - 2025-12-01
Added
- Introduced the new
db --rebuildcommand to fully regenerate thework_sessionstable from the raweventstable. - Added automatic backup of the existing
work_sessionstable before rebuilding. - Added support for incomplete days (days containing only
INevents), which now generate a validwork_sessionsentry
with an emptyend_timeand zero duration. - The rebuild function now returns the number of rows inserted, allowing for detailed logging and user feedback.
Improved
- Daily position is now correctly computed based on all events of the day:
- If all events share the same position → that position is used.
- If mixed positions are present → the position is set to
M.
- Daily work duration is computed by summing the durations of all IN/OUT pairs and subtracting the total lunch break.
- Improved safety of time parsing and error handling during event processing.
Fixed
- Addressed an issue where missing or inconsistent data in
work_sessionscould cause thelistcommand to falsely
report “No recorded sessions found”. - Ensures full database integrity for legacy 0.7.x installations.
Notes
This fix is essential for restoring consistency in production databases.
The feature will be ported to the 0.8.0-alpha2 architecture.
[0.7.5] - 2025-11-21
Changed
- Renamed the
--nowflag of thelistcommand to--todayfor improved clarity and consistency.
[0.7.1] - 2025-11-18
Added
- Official Debian (.deb) package generation using
cargo-deb.
A.debpackage is now automatically built, signed, and included in every release.
Changed
- Updated CI pipeline to integrate
.debproduction on Linux (ubuntu-latest). - Improved artifact handling and release asset organization across platforms.
Fixed
- Ensured consistent SHA256 and GPG signature generation for all package formats.
[0.7.0] - 2025-11-18
Added
-
Extended period filtering for
list
The--periodoption now supports advanced date formats and custom ranges:- Single values:
YYYY→ full yearYYYY-MM→ full monthYYYY-MM-DD→ specific day
- Ranges (
start:end) in matching formats:YYYY:YYYY→ year rangeYYYY-MM:YYYY-MM→ month rangeYYYY-MM-DD:YYYY-MM-DD→ day range
- Example usage:
rtimelogger list --period 2025-06rtimelogger list --period 2025-06-01:2025-06-10rtimelogger list --period 2024:2025
- Single values:
-
New --period all (full archive mode)
Added support for rtimelogger list --period all to display every stored session, with no date filtering applied. Works
with all sub-filters (--pos, --events, --summary, --pairs, etc.). -
New --range all for export
rtimelogger export --range all now exports all available data from the database (sessions or events), matching the new
list behaviour. -
Default period for
list
Runningrtimelogger listwithout any period or event filters now automatically shows the current month,
improving usability for daily workflows. -
Updated
export --rangeoption
--rangenow supports the exact same date formats and ranges as--period, ensuring consistency between listing and
exporting data.
Changed
-
Improved the help messages of
--periodandexport --rangewith explicit descriptions and examples. -
Refactored and extended internal filtering logic (
build_filtered_query) to support:- year / month / day
- ranges (
start:end) - the new
allkeyword across both sessions and events.
-
Improved test execution by migrating all tests to the new, non-deprecated
cargo_bin_cmd!macro fromassert_cmd,
replacing the deprecatedCommand::cargo_bin()API.
Fixed
- Improved error handling for malformed
addcommand input (Issue #22).
When invalid input is detected (e.g., bad date format or missing positional arguments), the CLI now prints:- a clear validation error
- a short usage guide
- positional argument descriptions
- concrete examples making the command easier to use without needing to run --help after every mistake.
Notes
v0.7.0 introduces a more powerful and unified date-range filtering system, a full-archive mode, improved help output,
and modernized test infrastructure. All previous CLI behaviours remain fully backwards-compatible.
[0.6.6] - 2025-10-13
Added
- Embedded Windows application icon (
res/rTimelogger.ico) directly into the executable.- Implemented using the
winresbuild dependency. - The icon is now visible in Windows Explorer and taskbar.
- Implemented using the
- New project resource directory
res/for graphical assets (SVG, PNG, ICO).
Changed
- cli: rename top-level subcommand
conf→config(and variantCommands::Conf→Commands::Config) to harmonize
CLI naming across projects.- Subcommands remain the same:
--print,--edit,--editor. - Handler function renamed from
handle_conftohandle_configand corresponding call sites updated. - Note: this is a breaking CLI name change (users must call
rtimelogger config ...). Consider adding a
backwards-compat shim in a follow-up if desired.
- Subcommands remain the same:
Changed
- Build process updated to automatically compile and embed Windows resources during
cargo build --release. - Improved project organization by moving graphical resources under
res/.
Fixed / Misc
- backup: when
--compressis provided, the original uncompressed backup file (e.g.my_db.sqlite.bck) is now removed
after successful compression (e.g.my_db.sqlite.zipormy_db.sqlite.tar.gz) to avoid leaving redundant files on
disk; a
non-fatal warning is emitted if removal fails.
Notes
- The
.resfile generated during build is temporary and no longer stored in the repository.
[0.6.5] - 2025-10-10
Added
- tests:
tests/position_recompute_tests.rswith:- functional coverage for single-position recompute (ensures
positionandend_timeare correct after deleting
pairs), - robustness loop (multiple independent runs) to catch potential flakiness related to test harness/FS state.
- functional coverage for single-position recompute (ensures
Changed
- perf(db): recompute
work_sessions.positionusing a single SQLite query (COUNT(DISTINCT position), MIN(position)) in
delete_events_by_ids_and_recompute_sessionsinstead of materializing positions in Rust.- Moves distinct/count work to SQLite, avoids extra allocations and sorting, and provides an early-exit cheap path
for mixed positions. - Preserves existing semantics: update
positiononly when exactly one distinct position remains; otherwise leave
unchanged.
- Moves distinct/count work to SQLite, avoids extra allocations and sorting, and provides an early-exit cheap path
Fixed / Misc
- chore(main): removed redundant closure in
src/main.rs(unwrap_or_else(Config::load)->
unwrap_or_else(Config::load)). - All tests pass locally (
cargo testran successfully after changes).
[0.6.0] - 2025-10-09
Release highlights: brand-new PDF export support and a reworked XLSX export with improved readability.
Added
- New PDF export feature:
- Introduced
PdfManagermodule usingpdf-writerfor report generation. - Supports tabular layout with bold headers and zebra stripes for readability.
- Integrated in
export.rsas an alternative export format alongside CSV and JSON.
- Introduced
- New XLSX export feature:
- Added
XlsxManagermodule usingrust_xlsxwriterfor Excel-compatible exports. - Introduced tabular/graphical layout for better readability.
- First row is now frozen as header.
- Added
Changed
- Refactored time formatting utilities:
- Updated
mins2hhmm()to support both combined ("HH:MM") and split ("HH","MM") output via an optional parameter. - Added new helper functions
mins2readable()for consistent human-readable duration formatting (e.g.,07h 45m). - Replaced duplicated inline conversion logic with unified helper calls.
- Updated
- Updated logic and unit tests to align with the new time formatting behavior.
Fixed
- Corrected formatting of negative durations to display a single minus sign (e.g.,
-01h 25minstead of-00h -25m). - Resolved minor inconsistencies in duration calculation and string conversion.
[0.5.1] - 2025-10-09
Added
- Comprehensive export test suite covering CSV/JSON outputs for
--eventsand--sessions.
Tests include range filtering (including brace day-range syntax), empty dataset behavior, overwrite/cancel flows,
CSV structure checks and a performance smoke test. - Shared test helpers in
tests/common.rs(setup_test_db,temp_out,init_db_with_data,populate_many_sessions)
to
reduce duplication across tests and simplify integration test setup.
Changed
- Implemented
--rangehandling forexport(supportsYYYY,YYYY-MM, andYYYY-MM-{dd..dd}brace syntax) and
applied it to botheventsandwork_sessionsexports. - Refactored
src/export.rs:- Extracted helper
build_query_with_rangeto build SQL + owned parameters. - Pass owned date parameters to
stmt.query_map(...)to ensure correct binding and lifetimes.
- Extracted helper
- Moved test helpers out of the library (
src/test_common.rs) intotests/common.rsand updated tests to use the
shared helpers.
Fixed
- Fixed an export bug where SQL range parameters were not passed to
query_map(caused incorrect/ignored ranges and
lifetime errors E0597). Exports now correctly filter by date when--rangeis provided. - Resolved Clippy warnings across the codebase; added a small allow for
dead_codein test helpers where appropriate.
Notes
- The
--rangeoption is now implemented and exercised by tests; removed the previous note stating it was a stub. - Consider adding CSV headers in a follow-up if explicit headings are desired for exported CSV files.
[0.5.0] - 2025-10-08
Added
- New configuration option
show_weekdayto control weekday display inlistcommand (None,Short,Medium,
Long). - Display weekday next to date in
listcommand output. - New
backupcommand with--fileoption to create a copy of the database. - Added
--compressflag for backup:- On Windows creates a
.ziparchive. - On Linux/macOS creates a
.tar.gzarchive.
- On Windows creates a
- Backup operations are logged in the database via
ttlog.
Changed
- Moved CLI definition (
CliandCommands) frommain.rsinto a dedicatedcli.rsmodule.
This improves project structure by keepingmain.rsfocused on the entrypoint logic. - Improved
delcommand output: now shows a clear warning when no events or sessions are found for a date. - Updated tests to reflect new
delcommand behavior.
Fixed
- Corrected calculation of expected end time considering
min_duration_lunch_breakandmax_duration_lunch_break. - Fixed insertion of lunch break duration in
eventstable. - Fixed test alignment for delete of non-existent sessions.
- Deduplicated migration code (removed repeated SQL blocks).
[0.4.5] - 2025-10-06
Changed
- Project renamed from
rtimelogtortimelogger. - No functional changes: this release only updates the crate name, repository links, badges, and documentation
references.
[0.4.2] - 2025-10-03
Added
delenhancements:del <date>removes all events and legacy work_session rows for the given date (with interactive confirmation).del --pair <pair> <date>removes only the events belonging to the specified pair for that date (with interactive
confirmation); if no events remain for the date the legacy work_sessions row(s) are removed as well.
- Database helper functions to delete events by date/ids and sessions by date.
delnow records concise audit entries into the internallogtable (visible withrtimelog log --print).
Changed
- Introduced position value
M(Mixed) to indicate days with multiple working positions; updateddescribe_positionto
display a friendly label forM. - Extracted
create_missing_eventintosrc/events.rsand added a unit test to improve testability and reduce
duplicate code incommands.rs. list --events --summarynow displays Dur in a human-friendly "XH YYM" format; JSON output remains in minutes (
duration_minutes).- Updated README to document the above behavior and examples.
Fixed
- Added a migration to extend position CHECKs to include
'M'and to update existing tables where necessary. - Fixed a Clippy warning in
db::delete_events_by_ids(removed an unnecessary map_identity) so
cargo clippy -D warningspasses. - Updated integration tests to verify deletion-by-date and deletion-by-pair behavior.
[0.4.1] - 2025-10-03
Added
- Unit test(s) targeting the creation of missing events (exposed for unit testing).
Changed
- Refactored event helper logic:
- Extracted
create_missing_eventhelper into a reusable function and moved it tosrc/events.rsfor better
testability and separation of concerns. - Removed duplicated code in
commands.rsand consolidated the helper usage.
- Extracted
- Presentation improvement: in
list --events --summarythe Duration field is now displayed in a human-friendly "Xh Ym"
format instead of raw minutes (display-only change).
Fixed
- Resolved compilation issues caused by duplicate definitions in
commands.rs.
[0.4.0] - 2025-10-02
Added
- Event pair aggregation features:
- Derived Pair column when listing events (sequential pairing of
inwith nextoutper date, FIFO). --pairs <id>filter to show only events (or summaries) for a specific pair id (per date).--summarymode (only with--events) to display one aggregated row per pair (start, end, lunch, net duration,
unmatched flag).- Enriched JSON output (
--events --jsonand--events --summary --json) including fields:pair,unmatched,
lunch_minutes,duration_minutes(summary mode).
- Derived Pair column when listing events (sequential pairing of
- Unmatched event handling: lone
inoroutevents are marked with an asterisk (*) after the pair id and
"unmatched": truein JSON. - Case‑insensitive normalization for
--posfilter when listing events/sessions (r/Rbehave the same). - Automatic dual-write:
add --in/--outnow (still) logs legacy session data and inserts punch events used by the new
reporting features. - New integration tests covering:
- Pair calculation and filtering
- Summary (basic, filtered, JSON, unmatched)
- Enriched JSON schema
- Case-insensitive position filter for events
Changed
- Refactored event printing logic into helper functions (
compute_event_pairs,compute_event_summaries,
summary/table
printers). - Improved output alignment for event and summary tables.
- Internal minor cleanups (pattern matching adjustments for 2024 edition, separator printing, warning removal).
Fixed
- Proper representation of unmatched events; they no longer appear merged with unrelated pairs.
- Prevented spurious formatting warnings in summary table output.
Notes
- No breaking schema changes: all new capabilities are additive and backward‑compatible with existing databases.
- Legacy session listing (
list) remains unchanged; new functionality is activated only with--events.
[0.3.6] - 2025-09-30
Added
- New
logsubcommand with the--printoption to display rows from the internallogtable (date, function,
message). Useful for diagnostics and auditing internal operations. - Application now records an entry into the internal
logtable on key user actions:init: logs when a database/config is initialized (message: "Database initialized at " or "Test DB
initialized at ").add: logs a concise summary of changes applied for the given date (message format:
date=YYYY-MM-DD | key=val, key=val, ..., e.g.date=2025-09-30 | start=09:00, lunch=30).del: logs deletions (message:Deleted session id <id>).
These log entries include a timestamp (ISO 8601) generated at insertion time and are intended for troubleshooting and
audit.
[0.3.5] - 2025-09-30
Added / Optimized
- Performance: use cached prepared statements (
Connection::prepare_cached) for repeated queries and upserts (
db::list_sessions,db::get_session,db::upsert_*,db::ttlog) to reduce SQL compilation overhead and speed up
repeated CLI invocations. - Migration to add new configuration parameter
separator_charto the config file if missing; allows customizing the
character used for month-end separators in list output. - Integration test
test_separator_after_month_endvalidating that a separator is printed after the month's last day.
Changed
- Internal refactor and performance optimizations; bumped version to
v0.3.5. - Documentation updated:
README.mdnow documents theseparator_charconfiguration option and how to override it.
Fixed
- Fixed a bug in the configuration migration (
migrate_to_033_rel) where a variable was referenced out of scope,
causing a compilation error in some environments; the migration now correctly serializes the updated configuration and
writes it back.
[0.3.4] - 2025-09-30
Added
- Print the record inserted or updated when invoking the
addcommand (the command now displays only the affected
record). - Configuration files for GitHub Copilot:
copilot-custom.json(machine-readable) andcopilot-custom.md(
human-readable documentation). - Bump project version to
v0.3.4and update dependencies as required.
Changed
- Updated dependencies and version metadata for the
v0.3.4release.
[0.3.3] - 2025-09-18
Added
- New internal DB versioning system to handle schema evolution.
- New table schema_migrations to record each migration applied.
- Automatic check and execution of pending migrations every time a command is run.
- Automatic configuration file migration:
- Adds missing parameters min_duration_lunch_break (default 30)
- and max_duration_lunch_break (default 90)
Changed
- The logic for expected exit time now uses configurable lunch break limits from the configuration file instead of
hardcoded values. - Improved conf --edit command:
- If the requested editor does not exist, the application now falls back to the default editor ($EDITOR/nano on
Linux/macOS, notepad on Windows) instead of panicking.
- If the requested editor does not exist, the application now falls back to the default editor ($EDITOR/nano on
[0.3.2] - 2025-09-17
Added
- New command del to delete a work session by id from the work_sessions table.
- New working position C = On-Site (Client).
- Utility function to map working positions (O, R, C, H) into descriptive, colorized labels.
- Unit test for the new utility function.
- Integration tests for:
- del command (successful and unsuccessful cases).
- describe_position function.
Changed
- Output of the list command updated:
- Supports the new working position C=On-Site (Client).
- Displays colorized working positions for better readability.
- Reformatted integration test outputs for consistency.
- Updated SQL in init command to support the new position C.
- Introduced migration function for release 0.3.2.
[0.3.1] - 2025-09-17
Added
- New global option
--posin thelistcommand to filter sessions by working position:O= OfficeR= RemoteH= Holiday
- A function
make_separatorandprint_separatorinutils.rsto generate aligned separators with custom character,
width, and alignment. - Unit tests for
make_separator. - Integration test for the new
--posoption oflistcommand. - Display of the total surplus (sum of daily surpluses) at the end of the
listoutput.
Changed
- Improved the output formatting of the
listcommand, including:- aligned
Lunchtime usingHH:MMor padded- - cleaner separator handling with the new utility functions.
- aligned
[0.3.0] - 2025-09-16
Added
- New parameter
working_timein application configuration file to define the daily working duration. - Support for new position
H(Holiday) in work sessions, with purple highlighted visualization inlistcommand. - Database migration mechanism to automatically upgrade schema when needed.
- Utility snippets in Rust to convert
NaiveDateandNaiveDateTimeto/from ISO 8601 text strings for SQLite
compatibility.
Changed
- Updated all calculation logic for expected exit time to use the configurable
working_timeparameter. - Changed the visualization of lunchtime from number of minutes to
HH:MMnotation. - Updated integration tests to validate:
- usage of the new
working_timeparameter - new position
H(Holiday) - DB migration functionality
- usage of the new
[0.2.5] - 2025-09-16
Added
- New
confcommand to handle the configuration file --printoption forconfto print the current configuration file--editoption forconfto edit the configuration file--editoroption forconf, to be used with--edit, to specify which editor to use (supportsvim,nano, or any
custom path)- Help messages for the new
confcommand and its options
Changed
- Separated command implementations from
main.rsinto a newcommands.rssource file
Fixed
- Removed a stray debug print line
[0.2.1] - 2025-09-15
Added
- Support in
initcommand for initializing a new database in:- an absolute path
- directories containing spaces in their names
Changed
- Updated
listcommand: now shows the expected end time even when only the start time is provided for a given date - Updated integration tests for the new version v0.2.1
Fixed
- Prevented production config (
rtimelog.conf) from being overwritten during integration tests by introducing--test
global flag - Ensured consistent DB path resolution when using
--dbtogether with--test
[0.2.0] - 2025-09-14
Added
- Creation of a configuration file in the user home (depending on platform) with:
- DB filename
- Default working position (
O)
- New column
positionin SQLite DB to identify the working position of the day:O= OfficeR= Remote
- New options for
addcommand:--posadd the working position of the day, O = Office, R = Remote--inadd the start hour of work--lunchadd the duration of lunch--outadd the end hour of work
- Added global option
--dbto specify:- a DB name (created under rTimelog config directory)
- or an absolute DB path
- Added a message when the DB is empty (
⚠️ No recorded sessions found)
Changed
- Reorganized the output of the
listcommand - Updated integration tests for new DB column
position - Updated the logic for opening the connection to the DB file
- Updated integration tests to use
--dboption
Notes
- Previous intermediate changes introduced
--nameand config file handling,
but they have been replaced by the new global--dbapproach for consistency.
[v0.1.2] - 2025-09-12
Added
- Added functionality to search records by year (
yyyy) or year-month (yyyy-mm) using option--period. - Added explicit
+sign for positive surplus minutes.
Changed
- Updated integration tests to cover new functionalities.
[0.1.1] - 2025-09-12
Added
- New workflow:
release.ymlfor automated releases - New workflow:
ci.ymlfor multi-platform build and test (Linux, Windows, macOS Intel & ARM) - Added Unit Test for Logic and Integration between DB and Logic
Changed
- Updated
README.mdwith badges and new documentation - Fixed formatting issues detected by
cargo fmt
Removed
- Deleted obsolete workflow
.github/workflows/rust.yml
[0.1.0] - 2025-09-12
Added
- Create CHANGELOG.md
- Create LICENSE
- Create rust.yml
- Create README.md
- Set origin language in English
- If the date parameter is empty, assume the current date
- Initial version of the project