Package: timeturner
Time TurnerA Minimalistic Time Tracker.This is a minimalistic time tracker that allows you to record when you start working, even if it is in the past, stop running activities now, and add activities from the past. It also ensures legal rest periods are included if you forgot to track them.In the Harry Potter series, the Time-Turner is a magical device that allows the user to travel back in time. Time Turner is a time tracker that lets you "turn back time" and record activities from the past.Warning, this is still an alpha release, the API is not stable yet.UsageStarting an ActivityTo start tracking an activity, run the following command:This will record the current time as the start of your activity.If you forgot to start tracking an activity yesterday, you can provide the start time with an additional parameter,-10mwould mean 10 minutest ago. The full list of possible time values can beseen further downStopping an ActivityTo stop tracking the current activity, run the following command:This will record the current time as the end of your activity and calculate the total duration.Adding a Past ActivityIf you forgot to track an activity in the past, you can add it withtimeturner add <start_time> - <end_time>Adding a public holidayTo add May 1st as a public holiday, run the following command:Adding your vacationTo add your vacation, run the following command:Adding your vacation will add a segments that are not part of holidays, it will also split
weekends and only add working days as vacation.ConfigurationEnvironment VariableDefault ValueDescriptionTIMETURNER_CONFIG_HOME~/$XDG_CONFIG_HOME/timeturnerThe directory for configuration files.TIMETURNER_CONFIG_FILEtimeturner.tomlThe configuration file to use.TIMETURNER_DATABASE__HOMEvalue of $TIMETURNER_CONFIG_HOMEThe directory to store the database file in.TIMETURNER_DATABASE__FILEtimeturner.dbThe database file to use.TIMETURNER_DATABASE__TABLEpensiveThe table to use in the database.ExamplesExamples for times<start_time> or <end_time> could be one of the following Examples:ExampleDescriptionnow9:009:00 today-1m1 minute ago-1h1 hour ago-1d1 day ago, you will be asked for the time-1d@9:001 day ago 9:00+1m1 minute from now+1h1 hour from now12 7:007:00 on the 12th of the current month02-28 9:009:00 on February 28 of the current year2022-02-28 9:009:00 on February 28, 2022Automatic Rest PeriodsIf you forget to track a rest period, the time tracker will reduce the required rest period before showing it. For periods greater than 4h 15 are reducted, for periods greater than 6:15 additional 30m are reducted.TODOs:Add Configurationignore secondsfreeze time, to generate useful and pretty images for docsautomatic rest periodsdefault work timedefault work week daysallow full day activities to coexist with other activitiestravel time and holiday could happenDB migrationsshow and generate tui outputAdd section about contributionsAdd precommit hook to ensure code is formattedGenerate docstrings for DB methodsRemove import command (it contains assumptions that will not be true for everyone)Document how to import data from other time trackersAdd mode to convert hamster output to jsonl file.Add mode to import jsonl fileAdd loggingallow different log levels for database and applicationadd test that the last release version in Changelog is the same as in pyproject.toml and appREADMEauto generate config optionsTODOS by command:addendadd testsconfiguremodify and write configfileallow to add aliases for commandse.g. new new add alias with setting passive to trueadd test when holiday tag name is changed in settingslistsplit up multiday activitiessummaries full day tags differentlyholidays should not count as work timeit should also not count as missing work timegroup by year, month, week, daysplit up multiday activitiesadd option to show only open activitiesadd testsMM-DD or YYYY-MM-DD should only show show a single dayimport holidaysexportprobably like list --format jsonlundo (revert the last change)confirm changes that would modify other entriesDesign Goalsminimalistic, little to typeenforce as little as possiblebe clearbe extensibleTODO: support plugins (maybe a later version)be able to use it programmaticallybe able to use it as a libraryOpen Questionsshould the get_latest_segment return segments from the future (start_time in the future)?Nice to have:Build a minimal Docker image (maybe)https://github.com/ines/termynal