Repository navigation
Releases
0.2.1
Version 0.2.1 is a smaller update bringing few quality-of-life improvements, a fully rewritten autocomplete system, two new commands, and a solid round of bug fixes.
Changes made:
New commands
country- changes the country used as the source of public holidays. Days that have already been manually edited by the user are left untouched where unmodified days are updated to reflect the new country's holiday calendar.files- displays the path to the directory where the application stores its data files, config, and other files.
Command changes
- Modified
calendarcommand - accepts a new optional argument that, when provided, displays a legend explaining the meaning of each color used in the calendar. - Modified
helpcommand - now alongside other information displays the shortest valid invocation string for the queried command.
Improvements
- Rewritten autocomplete system - the prediction and autocomplete mechanism has been fully redesigned from scratch. The system now suggests command names, macros, aliases, keywords, command abbreviations, command and macro arguments, and example values for individual arguments.
- Pressing the down arrow lists all suggestions - pressing the down arrow key when the input is empty now immediately shows all available completions without requiring any characters to be typed first.
- More detailed
infooutput for months - wheninfois called in a month context, it now separately reports the number of office days while present and the number of office days while absent, providing a more precise breakdown of attendance.
Bug fixes
- Command initialization was non-deterministic - the command initialization code relied on a set, which caused the
keycommand to sometimes fail to load entirely and not appear in suggestions or in thehelpcommand list. Fixed. - Crash when creating an alias with a quoted value - calling
alias name "value"caused a crash because quoted strings were being stripped of their delimiters during argument parsing, producing invalid input. Fixed. - Alias names with spaces were accepted - it is now enforced that alias names cannot contain spaces.
- Very long words broke frame borders - words that were too long to fit in one line would not break and caused display frames to overflow. That is no longer a case.
checkpointwas slow when listing known checkpoints - listing checkpoints was slow because file metadata (modification date, directory listing) was fetched from the filesystem multiple times. The number of calls was greatly reduced, making it significantly faster.configdid not display null fields - when a config field held anullvalue, attempting to display it caused the command to treat it as non-existent and return an error. It is now correctly shown with its null value.configcould not set a field to null - it is now possible to explicitly assignnullto a config field through theconfigcommand.- Incorrect error message when calling
exitwith dates - providing dates before theexitcommand produced an error claiming 0 arguments were received while 0 were expected, rather than correctly reporting that the command does not accept dates. Fixed. - Macros could silently overwrite other macros - a missing safeguard allowed saving a macro under a name 'macro' or 'deletemacro' without any warning. The necessary protection is now enforced.
Internal
- Rewrote
main.pyusingargparse- command-line argument handling has been migrated from manual parsing to the standardargparsemodule. - Added
__main__.py- the package can now be launched directly viapython -m <package_name>. - Rewritten config migration tests - the config migration test suite has been corrected and updated.
- Added E2E tests - a set of basic end-to-end tests has been added, covering the most fundamental application flows.
0.2.0
Version 0.2.0 is a major update introducing a significant number of new features, commands, configuration options, and bug fixes. The most notable additions are the alias and keyword systems, several new commands, expanded macro support, and a comprehensive test suite. The data format and config format have both been bumped to version 2, with automatic migration handled on first launch.
Changes made:
New commands
alias- lists all defined aliases, shows the replacement text for a specific alias, or creates/updates one. Aliases are user-defined text substitutions applied at parse time, allowing shorthand for any command or sequence of commands.deletealias- removes a previously defined alias by name.absence- marks a day or all workdays in a month as an absence. Replaces the previous behavior ofdayofffor this purpose.present- removes the absence or day off status from a day or all workdays in a month, marking them as present.info- displays detailed information about a day or month, including attendance type, day type, work location, time at work, target time, and optionally work start and end times.keyword- lists all available keywords, their supported modes, current values, and descriptions.
Command changes
- Modified
dayoffcommand - now exclusively marks a day or month as a day off (vacation), no longer serves double duty as an absence marker. - Modified
checkpointcommand - accepts an optionalpermanentargument to create a permanent checkpoint that is not automatically removed when closing the app
New features
- Alias system - user-defined aliases are stored in
aliases.txtand are substituted at parse time. Aliases can represent any text, including full command chains. - Keywords - dynamic placeholders substituted at parse time with values derived from the current application state. Available keywords:
$today,$tomorrow,$yesterday,$nextday,$prevday,$month,$nextmonth,$prevmonth. The keyword prefix is configurable. - Nullable macro arguments - macro parameters can now be declared as optional with no default value, by providing 'null' as default argument value. This will result in an empty string during argument replacement.
Improvements
- Optional repeat count for
undoandredo- both commands now accept an optional numeric argument specifying how many steps to undo or redo at once. - Configurable input history size - the number of entries retained in the up/down arrow input history is now controlled by
input.history_sizein the config. - Multi-date delimiters moved to config - the symbols used to open and close multi-date ranges (
(and)by default) are now configurable viainput.date.multi_start_symbolandinput.date.multi_end_symbol. - Configurable date normalization - date normalization (merging overlapping date ranges into a single range) is now disabled by default and can be toggled via
input.date.normalizein the config. - Configurable error color - the color used to display error messages can now be set via
output.error_colorin the config. - Configurable default values for
fteandrwr- default values for both commands are now exposed ascommand.fte.default_valueandcommand.rwr.default_valuein the config. - Improved
keycommand output - the warning displayed to the user now more precisely states the number of expected lines. - Improved macro date documentation - the help text for macros now explicitly explains that dates provided before a macro call are forwarded to the commands inside the macro as if they were multi-dates.
- Data and config version bumped to 2 - both the saved data format and the config format have been updated to version 2, with migration applied automatically on first launch after updating.
Bug fixes
- Macros ignored dates provided before invocation - dates specified before a macro call are now correctly forwarded to the commands inside the macro.
- Macros accepted too many arguments - the argument count check now enforces both the minimum and maximum expected count.
- Macro default argument values were mutated - missing copy of the
default_argument_valueslist caused defaults to be overwritten across calls; fixed. - Crash in
fte full- resolved a crash caused by attempting to read the.nameattribute of aUnionType, which does not have one. dayscommand used wrong argument type - the command expected anintinternally while its definition declared aTimeArgument; both are now consistent.holidaychanges did not update monthly target hours - adding or removing a holiday now correctly recalculates the required hours for the month, unless the target was manually set by the user.- Autocomplete did not detect backspace - added a global backspace keybind so that completion suggestions update correctly when characters are deleted.
- Date parsing ambiguity with decimal-looking input - input such as
2. 3hwas incorrectly parsed as2.3hinstead of3h on the 2nd. Removed the ambiguous fallback that attempted time parsing before date parsing. - Multi-date range did not require a closing symbol - the parser now requires the closing symbol when a multi-date range is opened.
- Incorrect history entry for multi-date commands - when a command was prefixed with multiple dates (e.g.,
(24. 25.) office && target), only the first command in a chain received the dates in the history record. Fixed. - Incorrect undo history when using macros - macro execution now correctly records state history so that undo behaves as expected.
- Background color config had no effect - fixed incorrect enum value formatting when resolving background color from the config.
cleardid not resetwork_startandwork_end- thereset()method was missing those fields; they are now cleared correctly.- Passing
%alone as a prefix caused a crash - a bare%token is now correctly treated as a string rather than triggering a failed numeric cast. - Month names in uppercase were not recognized as dates - date parsing is now case-insensitive for month names.
- Invalid input changed the active date - fixed an incorrectly structured conditional that was accepting partially invalid input and updating the active date anyway.
zero,rwr,minutes, anddayscommands failed with day-mode dates - all four commands now handle day-specific dates correctly, consistent with their documented behavior.configsub-field output was broken - callingconfig output.max_width(or any dotted sub-field path) now correctly displays the requested field instead of failing silently.
Internal
- Unit tests for every command - each command now has a dedicated test file under
tests/commands/. The parser has foundational coverage as well. - Python 3.14 support - updated minimum required versions of dependencies where possible and changed the version constraint ruleset from
~=to>=, including apydanticbump to a version that supports Python 3.14. - Migrated to
uv- dependency management and packaging have been moved from plainrequirements.txt, topyproject.toml+uv. - Improved publish pipeline -
publish.yamlis now exclusively triggered manually and supports choosing between the test PyPI index and the official PyPI index.
And many other smaller bug fixes and changes that I lost track of. :)
0.1.3
Version 0.1.3 marks the first proper update, bringing first fixes and improvements to the project. This release enhances target, start and end command behavior - improves validation, resolves multiple issues in error handling and help descriptions. Additionally, I hope that the automatic package build workflow should now be finally fixed. 😅
Changes made:
Improvements
- Enhanced
checkpointcommand - now displays a proper message when no checkpoints exist instead of an empty list. - Improved
startandendcommands - implemented missing functionality for handling given dates. - Added validation for
startandendtimes - prevents setting an end time before the start time, avoiding negative work time. If an invalid order is detected, both dates are set to the same value.
Bug fixes
- Fixed automatic package build workflow - updated
MANIFEST.into correctly include thedatadirectory. - Resolved error logic in
targetcommand - errors now correctly reflect the command's execution context. - Fixed
frame_wrapmethod layout issue - now ensures a minimum frame width based on the title and padding, preventing odd-looking frames. - Corrected
targetcommand undoability - no longer is incorrectly marked as undoable when called without any arguments. - Fixed incorrect status display -
statuscommand now properly handles target times under 1 hour. - Updated
targetcommand help descriptions - fixed incorrect full-use-case template and supported modes list. - Corrected
dayscommand help template - resolved an issue with one of its use-case examples.
0.1.2
This update fixes the incorrect package build in version 0.1.1, which made the app unusable in the latest release.
Changes made:
- Fixed incorrect package build
Resolved an issue where crucial files were missing from the package due to the new automatic upload process in thepublish.yamlworkflow. UpdatedMANIFEST.inandpyproject.tomlto ensure all necessary files are included in the package.
0.1.1
This release addresses a critical issue preventing the app from running on Python 3.13. 😅
Changes made:
-
Fixed crash on Python 3.13
Resolved an issue where launching the app would immediately cause a crash. This was due to using theclassmethodandpropertydecorators together. Introduced a customclasspropertydecorator to address this issue. -
Added simple end-to-end test
Implemented a basic test usingpexpectto verify that the app launches successfully after installation, ensuring future compatibility with Python 3.13. -
Introduced
publish.yamlworkflow
Added an experimental GitHub workflow (publish.yaml) to automatically publish new versions to PyPI.
0.1.0
Initial Release! 🎉
This is the first stable version of WorkTracker.
For a full description of the app and detailed usage instructions, check out the README file.
Installation:
For installation instructions, refer to the README file.
Ensure you have Python version 3.10 or higher, and install with pip install work-tracker.