Tiempo ====== Synopsys -------- ``t -h|--help`` ``t help SUBCOMMAND`` ``t SUBCOMMAND -h|--help`` ``t SUBCOMMAND [OPTIONS]`` Subcommands ----------- Bellow you can see the full list of subcommands. All of them can be abbreviated to their first letter, so for example ``t backend`` can also be typed ``t b``. +--------------------+---------------------------------------------------------+ | Command | Description | +====================+=========================================================+ | :ref:`t-archive` | Archive entries to a hidden timesheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-backend` | Open an sqlite shell to the database | +--------------------+---------------------------------------------------------+ | :ref:`t-configure` | Configure tiempo in-place or get path to config file. | +--------------------+---------------------------------------------------------+ | :ref:`t-display` | Display all entries in the current sheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-edit` | Edit an entry. | +--------------------+---------------------------------------------------------+ | :ref:`t-in` | Start an entry in the current timesheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-kill` | Delete an entry or an entire timesheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-list` | List existing sheets. | +--------------------+---------------------------------------------------------+ | :ref:`t-month` | Display entries starting this month. | +--------------------+---------------------------------------------------------+ | :ref:`t-now` | Show all running entries. | +--------------------+---------------------------------------------------------+ | :ref:`t-out` | End the active entry in the current timesheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-resume` | Restart the timer for an entry. | +--------------------+---------------------------------------------------------+ | :ref:`t-sheet` | Switch to a new or existing timesheet. | +--------------------+---------------------------------------------------------+ | :ref:`t-today` | Display entries that started today. | +--------------------+---------------------------------------------------------+ | :ref:`t-week` | Display entries starting last monday or later. | +--------------------+---------------------------------------------------------+ | :ref:`t-yesterday` | Display entries that started yesterday. | +--------------------+---------------------------------------------------------+ Description ----------- Tiempo is a command-line time tracker. Register the start and end times of your activities and get results by day, week, month or custom periods of time in different formats, including custom ones. Entries are optionally organized in timesheets which you can use to represent projects, clients etc. Most commands (notably the ones that display entries) work on the *current* or *active* timesheet. The entries are stored in a local Sqlite3 database whose location you can learn by looking at your config file (whose location you can learn running ``t c``). **tiempo** stores entries as UTC and then converts to the local timezone for displaying and querying. This means that even if you change timezones your recorded times will be correct, although their displayed results might vary if grouping by day for example. This tool is compatible with a previous one with the same purpose called ``timetrap``. The most notable difference being that timetrap stores times as local timezone times, which makes it messy if you switch timezones. Another difference is that in timetrap you used the internal ruby API to add custom display formats and in ``tiempo`` you'll use standard input/output and command-line arguments in any language of your choice. Tutorial -------- .. _life-cycle: Life Cycle .......... Tiempo has the following life cycle: 1. ``t in`` starts activity time tracking. 2. ``t out`` ends time tracking. 3. ``t resume`` resumes tracking. 4. ``t archive`` archives tracking. At all times you can see the state of this cycle with 2 commands: * ``t list`` displays time tracking summary. * ``t display`` displays tracking in depth. So, let's start a new first task with: .. code-block:: shell-session $ t in task1 Checked into sheet "default". Now you can list a summary of your activity with: .. code-block:: shell-session $ t list Timesheet Running Today Total Time * default 0:02:04 0:02:04 0:02:04 -------------------------------------------- 0:02:04 0:02:04 0:02:04 You can stop tracking your time with: .. code:: shell-session $ t out Checked out of sheet "default". You can see that tracking stopped if you list the summary again with: .. code:: shell-session $ t list Timesheet Running Today Total Time * default 0:00:00 0:04:21 0:04:21 -------------------------------------------- 0:00:00 0:04:21 0:04:21 You can resume your activity with: .. code:: shell-session $ t resume Resuming "task1" Checked into sheet "default". You can now list the summary **or** display the traking in depth with: .. code:: shell-session $ t display Timesheet: default Day Start End Duration Notes Mon Oct 24, 2022 18:57:03 - 19:01:25 0:04:21 task1 19:06:49 - 0:00:30 task1 0:04:52 ----------------------------------------------------------- Total 0:04:52 Finally, when you want to archive a task, first you stop it with: .. code:: shell-session $ t out Checked out of sheet "default". And then you archive it with: .. code:: shell-session $ t archive A total of 2 entries accounting for 9m 38s will be archived. Proceed? [y/N] y If you do ``list`` or ``display``, no activities are going to be active. If you want to see archive activities, you can do it with: .. code:: shell-session $ t display full Timesheet: _default Day Start End Duration Notes Mon Oct 24, 2022 18:57:03 - 19:01:25 0:04:21 task1 19:06:49 - 19:12:05 0:05:16 task1 0:09:38 ----------------------------------------------------------- Total 0:09:38 With this you are now ready to use Tiempo! Adding activities ................. Most of the times you need to track more than one activity and switch between each other. So, let's do that. First, start an activity with: .. code:: shell-session $ t in 'My Task 1' Checked into sheet "default". When you need to start a new activity, first you stop the current one with: .. code:: shell-session $ t out Checked out of sheet "default". And then you start a new activity with: .. code:: shell-session $ t in 'My Task 2' Checked into sheet "default". You can ensure you are tracking the new activity with: .. code:: shell-session $ t display Timesheet: default Day Start End Duration Notes Mon Oct 24, 2022 19:29:06 - 19:32:30 0:03:24 My Task 1 19:32:39 - 0:00:21 My Task 2 0:03:45 --------------------------------------------------------------- Total 0:03:45 Now you can continue tracking your activities in the :ref:`Tiempo's Life Cycle `. Adding sheets ............. Usually you need to track activities for different projects or clients. So, let's add a new sheet to achieve that. First, ensure you don't have any running activities with: .. code:: shell-session $ t out Checked out of sheet "default". Now, add a new sheet with: .. code:: shell-session $ t sheet 'My Amazing Project' Switching to sheet 'My Amazing Project' Then, start a new activity with: .. code:: shell-session $ t in 'An Amazing Activity' Checked into sheet "My Amazing Project". You can check all your sheets and activities with: .. code:: shell-session $ t display full Timesheet: My Amazing Project Day Start End Duration Notes Mon Oct 24, 2022 19:56:55 - 0:00:35 An Amazing Activity 0:00:35 ------------------------------------------------------------------------- Total 0:00:35 Timesheet: default Day Start End Duration Notes Mon Oct 24, 2022 19:53:00 - 19:53:04 0:00:03 task1 0:00:03 ----------------------------------------------------------- Total 0:00:03 ----------------------------------------------------------- Grand total 0:00:39 You can switch sheets by doing the same as above with: .. code:: shell-session $ t out && tiempo sheet default Checked out of sheet "My Amazing Project". Switching to sheet 'default' Now you can continue tracking your projects or clients in the :ref:`Tiempo's Life Cycle `. Subcommands ----------- .. _t-archive: t archive ......... ``t a|archive [OPTIONS] [SHEET]`` To archive means to move entries from the current or specified timesheet to a different "hidden" sheet so that when you query the current sheet you don't see them but they are kept in the database. Archived entries are stored in a sheet with the same name of the original with an underscore as prefix. Use :ref:`t-list` to see archived sheets. By default this command will ask for you confirmation, then archive ALL entries in the current timesheet. Pass ``--fake`` to only display the entries using the ``text`` formatter (useful if you want to make sure that the archived time/entries are correct). Using ``--start`` and ``--end`` you can further limit the period of time that will be archived (See :ref:`specifying-times` section of the docs on the accepted formats). You can use ``--grep`` to only archive certain entries that match the given regular expression. If what you need is to archive a specific elapsed time, for example only 15 hours out of however many the timesheet has use ``--time`` with the amount of hours you want to archive. **Options** -f, --fake Don't actually archive the entries, just display them -e, --end