Skip to content

Commit

Permalink
chg: doc: still more readme updates and a docstring tweak
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Aug 18, 2024
1 parent f20fc38 commit d6f72f3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
35 changes: 26 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ See `Adding this PPA to your system`_ for more info.
.. _Adding this PPA to your system:
.. _this PPA:
.. _Ubuntu PPA: https://launchpad.net/~nerdboy/+archive/ubuntu/embedded

.. _Gentoo: https://www.gentoo.org/
.. _readme:
.. _this portage overlay: https://github.com/VCTLabs/embedded-overlay/
.. _readme: https://github.com/VCTLabs/embedded-overlay/blob/master/README.rst#install-the-overlay-without-layman


Install with pip
----------------
Expand Down Expand Up @@ -131,12 +131,13 @@ Reporting examples
The following extension examples can be found in the ``extensions`` folder
in the top-level of the sdist or repository:

* ``csv_rpt.py`` - a simple CSV report based on the `upstream example`_
* ``onelineday.py`` - a real-world custom report example
* ``totals.py`` - a totals-by-tag report based on the `upstream example`_
* ``csv_rpt.py`` - a simple CSV report also based on the `upstream example`_

They must be manually installed to the location shown below.

.. _upstream example: https://github.com/lauft/timew-report/blob/master/README.md#examples
.. _upstream example: https://github.com/lauft/timew-report/blob/master/README.md

Extension usage
---------------
Expand All @@ -145,7 +146,7 @@ In general, report extension scripts are installed under ``$HOME`` in the
timewarrior extensions folder, which on Linux equates to::

$ ls ~/.timewarrior/extensions
csv_rpt.py onelineday.py
csv_rpt.py onelineday.py totals.py

To use the report extensions, first install timewarrior `on your platform`_
and run the command from a console prompt, then find the extensions directory,
Expand Down Expand Up @@ -206,11 +207,27 @@ package manager). Running the indicator GUI script requires both
Python_ and a modern Gtk+ windowing environment with Gtk3+_ and
PyGObject_.

.. note:: The GUI script also requires the ``onelineday.py`` extension to
be installed (as shown above) in order to interact with ``timew``.
.. important:: The GUI script requires one of the following extensions to
to parse the current time total from the ``timew`` output.
They have been modified to check an environment variable
and output a summary CSV format.

Install either ``onelineday.py`` or ``totals.py`` as shown above. depending
on preferred tag format:

onelineday
Use for job-tag prefix format with sub-totals. See the docstring in
``onelineday.py`` for more details.

totals
Use for free-form tag format *without* a job-tag prefix.

Set the extension script in the config file with the following key, using
either "onelineday" or "totals" for the value. Similarly set the job-tag
separator if needed::

The above (timew) platform support link shows package support for several
Linux distributions.
extension_script: onelineday
jtag_separator: ";"


.. _Python: https://docs.python.org/3/contents.html
Expand Down
2 changes: 1 addition & 1 deletion extensions/onelineday.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
'''
Modified from upstream example; extract a Job name from the first
Modified from upstream example; extract a job-tag from the first
comma-separated split of the full tag string and produce subtotals
for each <jobname> where <jobname> is a short mnemonic for customer
and/or task, for example::
Expand Down

0 comments on commit d6f72f3

Please sign in to comment.