Metadata-Version: 2.1
Name: timew
Version: 0.1.0
Summary: Python interface to your timewarrior database
Author-email: Tjaart van der Walt <tjaart@tjaart.org>, Scott Mcdermott <scott@smemsh.net>
Project-URL: Issues, https://github.com/smemsh/python-timew/issues/
Project-URL: Homepage, https://github.com/smemsh/python-timew/
Project-URL: Repository, https://github.com/smemsh/python-timew/
Project-URL: Documentation, https://github.com/smemsh/python-timew/blob/master/docs/api/modules.rst
Keywords: timewarrior
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: python-dateutil >=2.8
Provides-Extra: dev
Requires-Dist: alabaster ==0.7.16 ; extra == 'dev'
Requires-Dist: babel ==2.14.0 ; extra == 'dev'
Requires-Dist: build ==1.0.3 ; extra == 'dev'
Requires-Dist: certifi ==2023.11.17 ; extra == 'dev'
Requires-Dist: charset-normalizer ==3.3.2 ; extra == 'dev'
Requires-Dist: coverage[toml] ==7.4.0 ; extra == 'dev'
Requires-Dist: docutils ==0.20.1 ; extra == 'dev'
Requires-Dist: exceptiongroup ==1.2.0 ; extra == 'dev'
Requires-Dist: idna ==3.6 ; extra == 'dev'
Requires-Dist: imagesize ==1.4.1 ; extra == 'dev'
Requires-Dist: importlib-metadata ==7.0.1 ; extra == 'dev'
Requires-Dist: iniconfig ==2.0.0 ; extra == 'dev'
Requires-Dist: jinja2 ==3.1.3 ; extra == 'dev'
Requires-Dist: markupsafe ==2.1.3 ; extra == 'dev'
Requires-Dist: packaging ==23.2 ; extra == 'dev'
Requires-Dist: pbr ==6.0.0 ; extra == 'dev'
Requires-Dist: pluggy ==1.3.0 ; extra == 'dev'
Requires-Dist: pockets ==0.9.1 ; extra == 'dev'
Requires-Dist: pygments ==2.17.2 ; extra == 'dev'
Requires-Dist: pyproject-hooks ==1.0.0 ; extra == 'dev'
Requires-Dist: pytest ==7.4.4 ; extra == 'dev'
Requires-Dist: pytest-cov ==4.1.0 ; extra == 'dev'
Requires-Dist: python-dateutil ==2.8.2 ; extra == 'dev'
Requires-Dist: requests ==2.31.0 ; extra == 'dev'
Requires-Dist: six ==1.16.0 ; extra == 'dev'
Requires-Dist: snowballstemmer ==2.2.0 ; extra == 'dev'
Requires-Dist: sphinx ==7.2.6 ; extra == 'dev'
Requires-Dist: sphinxcontrib-apidoc ==0.4.0 ; extra == 'dev'
Requires-Dist: sphinxcontrib-applehelp ==1.0.8 ; extra == 'dev'
Requires-Dist: sphinxcontrib-devhelp ==1.0.6 ; extra == 'dev'
Requires-Dist: sphinxcontrib-htmlhelp ==2.0.5 ; extra == 'dev'
Requires-Dist: sphinxcontrib-jsmath ==1.0.1 ; extra == 'dev'
Requires-Dist: sphinxcontrib-napoleon ==0.7 ; extra == 'dev'
Requires-Dist: sphinxcontrib-qthelp ==1.0.7 ; extra == 'dev'
Requires-Dist: sphinxcontrib-restbuilder ==0.3 ; extra == 'dev'
Requires-Dist: sphinxcontrib-serializinghtml ==1.1.10 ; extra == 'dev'
Requires-Dist: tomli ==2.0.1 ; extra == 'dev'
Requires-Dist: urllib3 ==2.1.0 ; extra == 'dev'
Requires-Dist: zipp ==3.17.0 ; extra == 'dev'

python-timew
==============================================================================

A Python API for Timewarrior, originally by Tjaart van der Walt
`@tjaartvdwalt`__, now maintained here.  Archived original is
`on gitlab`__.

.. __: https://github.com/tjaartvdwalt/
.. __: https://gitlab.com/tjaart/python-timew


Installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For this API to work, you need Timewarrior__ installed

Installation is easy from the `Python Package Index`__

.. code:: bash

 pip install timew

.. __: https://github.com/GothenburgBitFactory/timewarrior
.. __: https://pypi.org/project/timew/


API Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Documentation is generated by Sphinx apidocs, from embedded docstrings
in napoleon format.  We generate ``.rst`` files, which are checked into
the repository and can be previewed online.

The timewarrior__ module contains the interesting docs, while the formal
doctree are rendered to an index__ and a more concise modules__ file.

.. __: https://github.com/smemsh/python-timew/blob/master/docs/api/timew.timewarrior.rst
.. __: https://github.com/smemsh/python-timew/blob/master/docs/api/index.rst
.. __: https://github.com/smemsh/python-timew/blob/master/docs/api/modules.rst



Examples
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: pycon

 >>> from timew import TimeWarrior

 >>> timew = TimeWarrior()

 >>> timew.start(time=datetime(2018, 8, 15, 9, 0, 0), tags=['my tag'])
 Tracking "my tag"
 Started 2018-09-06T09:00:00
 Current         07T13:20:45
 Total              28:20:45

 >>> timew.cancel()
 Canceled active time tracking.

 >>> timew.delete(1)
 Deleted @1

 >>> timew.join(1, 2)
 Joined @1 and @2

 >>> from timew import Duration
 >>> from datetime import timedelta
 >>> timew.lengthen(1, Duration(timedelta(minutes=30)))
 Lengthened @1 by 0:30:00

 >>> timew.move(1, datetime(2018, 8, 15, 9, 0, 0))
 Moved @1 to 2018-09-05T09:00:00

 >>> timew.shorten(1, Duration(timedelta(minutes=10)))
 Shortened @1 by 0:10:00

 >>> timew.split(1)
 Split @1

 >>> timew.start(tags=['my tag'])
 Tracking "my tag"
 Started 2018-09-07T13:37:00
 Current               40:22
 Total               0:03:22

 >>> timew.stop()
 Recorded "my tag"
 Started 2018-09-07T13:37:00
 Ended                 40:53
 Total               0:03:53

 >>> timew.track(start_time=datetime(2018, 9, 7, 11, 0, 0),
                 end_time=datetime(2018, 9, 7, 12, 0, 0))
 Tracking "from 20180907T110000 - 20180907T120000"
 Started 2018-09-07T13:42:27
 Current                  27
 Total               0:00:00


Contributing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Report bugs, submit inquiries, or request features via `issues`__.

Please submit a `pull request`__ for modifications.  Make sure the
``dist``, ``test`` and ``docs`` Makefile targets work.  Docs need to be
kept generated during development, because they are checked in assets.

The build environment and tools will contain themselves in a venv within
the source tree, and should not pollute your system.

.. __: https://github.com/smemsh/python-timew/issues/
.. __: https://github.com/smemsh/python-timew/pulls/


Commits
------------------------------------------------------------------------------

Use the following format for commit messages::

  X subsystem: summary description of change

  long description text paragraphs
  ...

where X is a single character from the following:

==== ====================
 /    fix
 ^    removal
 \-   task/chore
 \+   feature/new
 =    comment/code-equal
==== ====================

All text should [usually] be wrapped by 79 characters, especially the
summary line.

For subsystem, use your best judgement, and look at previous commits
with `git log --oneline` to get an idea and for consistency with
previous changes.  More than one level of subsystem can make sense.

Please use interactive rebase to make commits look nice and have one
logical change each, with no merge commits.

Thanks.
