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 .......... Most of the time you'll be using these commands: #. ``t in`` starts time tracking for an activity. #. ``t out`` ends time tracking for the current activity. #. ``t resume`` resumes time tracking for a previous activity. #. ``t edit`` allows to quickly edit an entry's details. #. ``t archive`` archives entries without deleting them from the database. #. ``t kill`` permanently deletes entries. You can see the state of your activities using: * ``t list`` shows time tracking summary for all timesheets. * ``t now`` shows running entries for all timesheets. * ``t display`` shows more detailed information about activities in the current timesheet. Variants of this subcommand include ``t today``, ``t yesterday``, ``t week`` and ``t month``. To begin, let's start a task with: .. code-block:: shell-session $ t in 'task 1' Checked into sheet "default". At any time see what's happening with: .. code-block:: shell-session $ t display Timesheet: default Day Start End Duration Notes Sun Oct 30, 2022 11:24:18 - 0:00:03 first task 0:00:03 ---------------------------------------------------------------- Total 0:00:03 After some time of hard work you can stop tracking with: .. code:: shell-session $ t out Checked out of sheet "default". If later (say, after lunch) you decide to continue with this activity you may do so with: .. code:: shell-session $ t resume Resuming "task1" Checked into sheet "default". Which by default resumes the last task of the timesheet. After some time (days, weeks, months...) of activities being recorded and queried you might want to archive some of them. For that use: .. 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 archived 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 Using sheets ............ Usually you need to track activities for different projects or clients. That's what timesheets are for. To switch (and create if necessary) to a new timesheet use: .. code:: shell-session $ t sheet 'My Amazing Project' Switching to sheet 'My Amazing Project' Then, start a new activity in the new timesheet with: .. code:: shell-session $ t in 'An Amazing Activity' Checked into sheet "My Amazing Project". Just like before you can use ``t display`` to see your progress. To see a summary of all of your timesheets use: .. code:: shell-session $ t list Timesheet Running Today Total Time * My Amazing Project 0:00:00 0:00:00 0:00:00 - default 0:00:00 0:00:05 0:00:05 ----------------------------------------------------- 0:00:00 0:00:05 0:00:05 You can switch timesheets with: .. code:: shell-session $ t sheet default Switching to sheet 'default' If you switch very often between two timesheets pass ``-`` to switch to the previously active timesheet. Next steps .......... See the list of subcommands and their options bellow to really take advantage of tiempo. Learn about the different settings (see :ref:`settings`) and how to use the different formatters (see :ref:`default-formatters`) that are shipped by default or learn how to make your own (see :ref:`custom-formatters`). Happy time tracking! 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