Skip to content

0.2.0

Choose a tag to compare

@Kiszkacy Kiszkacy released this 18 Mar 16:55
· 1 commit to main since this release
cb67b18

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 of dayoff for 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 dayoff command - now exclusively marks a day or month as a day off (vacation), no longer serves double duty as an absence marker.
  • Modified checkpoint command - accepts an optional permanent argument 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.txt and 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 undo and redo - 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_size in the config.
  • Multi-date delimiters moved to config - the symbols used to open and close multi-date ranges (( and ) by default) are now configurable via input.date.multi_start_symbol and input.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.normalize in the config.
  • Configurable error color - the color used to display error messages can now be set via output.error_color in the config.
  • Configurable default values for fte and rwr - default values for both commands are now exposed as command.fte.default_value and command.rwr.default_value in the config.
  • Improved key command 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_values list caused defaults to be overwritten across calls; fixed.
  • Crash in fte full - resolved a crash caused by attempting to read the .name attribute of a UnionType, which does not have one.
  • days command used wrong argument type - the command expected an int internally while its definition declared a TimeArgument; both are now consistent.
  • holiday changes 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. 3h was incorrectly parsed as 2.3h instead of 3h 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.
  • clear did not reset work_start and work_end - the reset() 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, and days commands failed with day-mode dates - all four commands now handle day-specific dates correctly, consistent with their documented behavior.
  • config sub-field output was broken - calling config 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 a pydantic bump to a version that supports Python 3.14.
  • Migrated to uv - dependency management and packaging have been moved from plain requirements.txt, to pyproject.toml + uv.
  • Improved publish pipeline - publish.yaml is 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. :)