finish reshaping of the tutorial

This commit is contained in:
Abraham Toriz 2022-10-30 23:13:14 -06:00
parent aa6fca4245
commit 16970f7557
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
2 changed files with 60 additions and 134 deletions

View File

@ -13,7 +13,7 @@ _cargo_toml = Path(__file__).resolve().parent.parent.parent / 'Cargo.toml'
project = 'Tiempo'
copyright = '2022, Categulario'
author = 'Categulario'
author = 'Categulario, Perrotuerto'
release = str(parse(open(_cargo_toml).read())['package']['version'])
# -- General configuration ---------------------------------------------------

View File

@ -88,55 +88,51 @@ Tutorial
Life Cycle
..........
Tiempo has the following life cycle:
Most of the time you'll be using these commands:
1. ``t in`` starts activity time tracking.
2. ``t out`` ends time tracking.
3. ``t resume`` resumes tracking.
4. ``t archive`` archives tracking.
#. ``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.
At all times you can see the state of this cycle with 2 commands:
You can see the state of your activities using:
* ``t list`` displays time tracking summary.
* ``t display`` displays tracking in depth.
* ``t list`` shows time tracking summary for all timesheets.
* ``t now`` shows running entries for all timesheets.
* ``t display`` (and family) shows more detailed information about activities in
the current timesheet. Variants of this subcommand include ``t today``, ``t
yesterday``, ``t week`` and ``t month``.
So, let's start a new first task with:
To begin, let's start a task with:
.. code-block:: shell-session
$ t in task1
$ t in 'task 1'
Checked into sheet "default".
Now you can list a summary of your activity with:
At any time see what's happening with:
.. code-block:: shell-session
$ t list
Timesheet Running Today Total Time
$ 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
* 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:
After some time of hard work you can stop tracking 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:
If later (say, after lunch) you decide to continue with this activity you may do
so with:
.. code:: shell-session
@ -144,27 +140,10 @@ You can resume your activity with:
Resuming "task1"
Checked into sheet "default".
You can now list the summary **or** display the traking in depth with:
Which by default resumes the last task of the timesheet.
.. 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:
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
@ -172,9 +151,8 @@ And then you archive it with:
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:
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
@ -187,110 +165,58 @@ can do it with:
-----------------------------------------------------------
Total 0:09:38
With this you are now ready to use Tiempo!
Using sheets
............
Adding activities
.................
Usually you need to track activities for different projects or clients. That's
what timesheets are for.
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 <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:
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 with:
Then, start a new activity in the new timesheet with:
.. code:: shell-session
$ t in 'An Amazing Activity'
Checked into sheet "My Amazing Project".
You can check all your sheets and activities with:
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 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
$ t list
Timesheet Running Today Total Time
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
* 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 sheets by doing the same as above with:
You can switch timesheets with:
.. code:: shell-session
$ t out && tiempo sheet default
Checked out of sheet "My Amazing Project".
$ t sheet default
Switching to sheet 'default'
Now you can continue tracking your projects or clients in the
:ref:`Tiempo's Life Cycle <life-cycle>`.
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
-----------