From 1fe0e25779dd8925899dd6e9b231da14c3f220b4 Mon Sep 17 00:00:00 2001 From: Nika Zhenya Date: Mon, 24 Oct 2022 20:10:32 -0700 Subject: [PATCH] Tutorial writing --- docs/source/index.rst | 209 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 207 insertions(+), 2 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 25a5bdd..3d51c1a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -83,9 +83,214 @@ command-line arguments in any language of your choice. Tutorial -------- -.. note:: +.. _life-cycle: - yo, doc this +Life Cycle +^^^^^^^^^^^^^^^^ + +Tiempo has the following life cycle: + +1. ``in``. Starts activity time tracking. +2. ``out``. Ends time tracking. +3. ``resume``. Resumes tracking. +4. ``archive``. Archives tracking. + +At all times you can see the state of this cycle with 2 commands: + +* ``list``. Displays time tracking summary. +* ``display``. Displays tracking in depth. + +So, let's start a new first task with: + +.. code-block:: sh + :caption: tiempo in task1 + + Checked into sheet "default". + +Now you can list a summary of your activity with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo out + + Checked out of sheet "default". + +You can see that tracking stopped if you list the summary again with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo resume + + Resuming "task1" + Checked into sheet "default". + +You can now list the summary **or** display the traking in depth with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo out + + Checked out of sheet "default". + +And then you archive it with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo in \'My Task 1\' + + Checked into sheet "default". + +When you need to start a new activity, first you stop +the current one with: + +.. code-block:: sh + :caption: tiempo out + + Checked out of sheet "default". + +And then you start a new activity with: + +.. code-block:: sh + :caption: tiempo in \'My Task 2\' + + Checked into sheet "default". + +You can ensure you are tracking the new activity with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo out + + Checked out of sheet "default". + +Now, add a new sheet with: + +.. code-block:: sh + :caption: tiempo sheet \'My Amazing Project\' + + Switching to sheet 'My Amazing Project' + +Then, start a new activity with: + +.. code-block:: sh + :caption: tiempo in \'An Amazing Activity\' + + Checked into sheet "My Amazing Project". + +You can check all your sheets and activities with: + +.. code-block:: sh + :caption: tiempo 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-block:: sh + :caption: tiempo 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 -----------