rTimelog
[
](https://codecov.io/gh/umpire274/rTimelogger
)
rTimelog is a simple, cross-platform command-line tool written in Rust to track daily working sessions, including
working position, start and end times, and lunch breaks.
The tool calculates the expected exit time and the surplus of worked minutes.
What's new in 0.4.5
- The project has been renamed from
rtimelogtortimelogger. - No new features or bug fixes have been introduced in this release.
- All references in the crate name, repository links, documentation, and badges have been updated accordingly.
β¨ Features
- Add, update, delete and list work sessions.
- Track start time, lunch duration, and end time.
- Calculate expected exit time and surplus automatically.
- Manage multiple working positions:
O= OfficeR= RemoteC= On-Site (Client)H= HolidayM= Mixed (multiple working positions on the same day)
- Colorized output for better readability:
- Blue = Office
- Cyan = Remote
- Yellow = On-Site (Client)
- Purple background + white bold = Holiday
- Configurable default DB path via configuration file or
--dbparameter. - Automatic DB migrations with version tracking (
schema_migrationstable). - Configurable daily working time (
min_work_duration, default8h). - Automatic expected exit calculation based on:
- Start time
- Lunch break duration
- Configured working time
- Automatic handling of lunch break rules:
- Minimum 30 minutes
- Maximum 1h 30m
- Required only for
Officeposition (O)
- View surplus/deficit of worked time compared to expected
- Display of the total surplus at the bottom of
listoutput. - Event mode with: Pair grouping, per-pair summary, JSON enrichment, unmatched detection, filtering by position & pair id.
- Automatic database migration for schema changes
- Cross-platform configuration file management:
- Linux/macOS:
$HOME/.rtimelog/rtimelog.conf - Windows:
%APPDATA%\rtimelog\rtimelog.conf
- Linux/macOS:
π¦ Installation
π§ AUR (Arch Linux)
# or
πΊ Homebrew (macOS/Linux)
βοΈ Configuration
When you run:
a configuration file is created in the userβs config directory (rtimelog.conf).
It includes for current releases (β₯ 0.4.0):
database: /home/user/.rtimelog/rtimelog.sqlite
default_position: O
min_work_duration: 8h
min_duration_lunch_break: 30
max_duration_lunch_break: 90
separator_char: "-"
Key fields:
- database β path to the SQLite DB file
- default_position β default working position (
O,R,C,H,M) - min_work_duration β daily expected working time (e.g.
7h 36m,8h) - min_duration_lunch_break / max_duration_lunch_break β lunch constraints (minutes)
- separator_char β character used for month-end separator lines
NOTE: Older docs referenced
working_time; it has been unified asmin_work_duration.
Override DB path at runtime:
π₯οΈ Usage
Initialize DB and config
Custom DB file relative to config dir:
Absolute path:
Add a full work session
Creates or updates the legacy session AND adds two events (in/out) for reporting.
Partial updates (each creates/updates events when relevant)
Add holiday
List sessions (legacy view)
List raw events
Summarize events per pair
Sample output of summary mode
π Event pairs summary:
Date Pair Pos Start End Lunch Dur
---------- ---- --- ----- ----- ----- --------
2025-12-01 1 O 09:00 12:00 30 2H 30M
2025-12-01 2 O 13:00 17:00 0 4H 00M
Note: JSON output still contains duration_minutes expressed as integer minutes.
Delete a session by date
# Delete all records for a date (confirmation required)
Example (interactive):
)
) ) for
Delete a specific pair for a specific date
# Delete only pair 1 for a specific date (confirmation required)
Example (interactive):
)
) for
Internal log
Example output of rtimelog log --print:
| |
| |
| | )
Event mode β behavior details
- Pair numbering restarts each date.
- Unmatched rows (only
inor onlyout) show*andduration_minutes = 0in summary. - Lunch minutes shown on the
outevent (and propagated to summary) if provided or auto-deduced. - Filtering precedence:
--pairsapplies after computing pairs; combining with--summaryreduces summary rows. - JSON schemas:
- Raw events: fields from DB +
pair,unmatched. - Summary:
date, pair, position, start, end, lunch_minutes, duration_minutes, unmatched.
- Raw events: fields from DB +
βοΈ Configuration (duplicate quick ref)
(See above primary configuration section.)
ποΈ Database migrations
(unchanged β see CHANGELOG for past versions)
β οΈ Notes
- Lunch validation: min 30, max 90 (Office only mandatory). Remote can specify 0.
- Holidays ignore start/end/lunch; still appear in sessions listing.
--dballows isolated datasets (useful for testing).
π Legacy session output example
π
Saved sessions for September 2025:
1: 2025-09-01 | Remote | Start 09:08 | Lunch 00:30 | End 17:30 | Expected 17:14 | Surplus +16 min
2: 2025-09-04 | Office | Start 09:35 | Lunch 00:30 | End 17:44 | Expected 17:41 | Surplus +3 min
3: 2025-09-05 | Remote | Start 09:11 | Lunch 00:30 | End 17:01 | Expected 17:17 | Surplus -16 min
4: 2025-09-11 | Remote | Start 08:08 | Lunch - | End 12:16 | Worked 4 h 08 min
5: 2025-09-17 | Office | Start 09:42 | Lunch 00:30 | End 17:28 | Expected 17:48 | Surplus -20 min
6: 2025-09-18 | Remote | Start 10:50 | Lunch - | End - | Expected 18:56 | Surplus -
7: 2025-09-19 | Holiday | Start - | Lunch - | End - | Expected - | Surplus - min
8: 2025-09-22 | Holiday | Start - | Lunch - | End - | Expected - | Surplus - min
Output formatting: month-end separator
(See separator_char in configuration.)
π§ͺ Tests
Run all tests:
Include coverage for: sessions CRUD, events pairing, summary, JSON, holidays, migrations.
π¦ Installation
Binaries in target/release/ or use releases page.
π License
MIT License β see LICENSE.
Internal Log Recap
Records concise audit lines for init, add, del and auto-lunch adjustments.