# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['pomw', 'pomw.console', 'pomw.model']

package_data = \
{'': ['*']}

install_requires = \
['python-dateutil>=2.7,<3.0',
 'semver>=2.8,<3.0',
 'taskw>=1.2,<2.0',
 'timew>=0.0.22,<0.0.23',
 'unijson>=1.0,<2.0',
 'urwid>=2.0,<3.0']

entry_points = \
{'console_scripts': ['pomw = pomw.console:main']}

setup_kwargs = {
    'name': 'pomw',
    'version': '0.1.0',
    'description': 'The Pomodoro Technique using TaskWarrior and TimeWarrior',
    'long_description': '# PomodoroWarrior #\n\nA command line tool that integrates with TaskWarrior and TimeWarrior to implement the Pomodoro Technique.\n\n## Configuration ##\n\nThe configuration file is located at `$HOME/.config/pomw/pomwrc`\n\n### Timewarrior integration ###\n\nPomodoroWarrior aims to play nicely with TimeWarrior. By default all intervals created by PomodoroWarrior will also be updated in TimeWarrior. To change the default value, add the following section to your configuration file:\n \n```ini\n[timew]\nsync = false\n```\n\n### Pomodoro length ###\n\nPomodoro lengths are also configurable. Default length is 25 minutes.\n\n```ini\n[pomw]\nlength = 30\n```\n\n## Command Line Interface ##\n\nPomodoroWarrior uses a command line interface similar to TaskWarrior and TimeWarrior.\n\nCommands can refer to both TaskWarrior task ids, and PomodoroWarrior interval ids. To make the distinction clear, we force interval ids to be prepended by a `@` sign.\n\nThe commands can be grouped into 2 categories. Those that deal with Pomodoros, and those that deal with generic time intervals.\n\n### Workflow example ###\n\nFirst thing in the morning, we plan our Pomodoros for the day. We view our TaskWarrior task list.\n\n```bash\n$ task next\n```\n\n```\nID Age  P Project      Tag  Due Description                      Urg \n1 6w   M pomw                2d Create documentation for pomw     10\n2 6w   M python              1w Find the holy grail                8\n```\n\nWe decide to plan 5 pomodoros for writing this documentation\n\n```bash\n$ pomw plan -q 4 1 # Plan 4 pomodoros for task 1\n```\n\nWe check our To Do Today sheet\n\n```bash\n$ pomw tdt # Print the To Do Today sheet\n```\n\n```\nTo Do Today                                                        2019-03-21\n-----------                                                        ----------\n                                     ┌─┐┌─┐┌─┐┌─┐\n1  Create documentation for pomw     │ ││ ││ ││ │\n                                     └─┘└─┘└─┘└─┘\n```\n\nOops, we wanted 5 pomodoros, but we only planned 4. We now have 2 options, we can either override the number of planned pomodoros\n\n```bash\n$ pomw plan -q 5 1 # Plan 5 pomodoros for task 1\n```\n\nor append more pomodoros to the existing number of planned pomodoros\n\n```bash\n$ pomw plan -q +1 1 # Increment the planned pomodoros for task 1 by 1\n```\n\nWe check our tdt sheet again, and all is good!\n\n```\nTo Do Today                                                        2019-03-21\n-----------                                                        ----------\n                                     ┌─┐┌─┐┌─┐┌─┐┌─┐\n1  Create documentation for pomw     │ ││ ││ ││ ││ │\n                                     └─┘└─┘└─┘└─┘└─┘\n```\n\nSince we cannot find the holy grail using pomodoros, we will add the time we spend on this task using (non-pomodoro) intervals. \n\nOur To Do Today sheet looks good, and we start working on our first pomodoro.\n\n<!-- After working for several minutes, we remember that we need to buy SPAM. We add this to our shopping list, and mark an internal interruption -->\n\n<!-- ``` -->\n<!-- $ pomw interrupt internal 1 -->\n<!-- ``` -->\n\n<!-- Now our To Do Today sheet looks like this -->\n\n<!-- ``` -->\n<!-- To Do Today                                                        2019-03-21 -->\n<!-- -----------                                                        ---------- -->\n<!--                                      ┌─┐┌─┐┌─┐┌─┐┌─┐ -->\n<!-- 1  Create documentation for pomw     │ │ │ │ │ │ │ │ │ │ -->\n<!--                                      └─┘└─┘└─┘└─┘└─┘ -->\n<!-- ``` -->\n\nAfter working for several minutes, we start dreaming about lady Gwenevere, and before we realize it 10 minutes have passed. Because we believe in strictly following the Pomodoro Technique, we void the pomodoro.\n\n```bash\n$ pomw void 1 # Void the current pomodoro for task 1\n```\n\nOur TDT sheet reflects the voided Pomodoro\n\n```\nTo Do Today                                                        2019-03-21\n-----------                                                        ----------\n                                     ┌─┐┌─┐┌─┐┌─┐┌─┐\n1  Create documentation for pomw     │/││ ││ ││ ││ │\n                                     └─┘└─┘└─┘└─┘└─┘\n```\n\nOn our second attempt, we complete a pomodoro. Once it rings, we mark the pomodoro as done.\n\n```bash\n$ pomw done 1 # Complete a pomodoro for task 1\n```\n\n```\nTo Do Today                                                        2019-03-21\n-----------                                                        ----------\n                                     ┌─┐┌─┐┌─┐┌─┐┌─┐\n1  Create documentation for pomw     │/││x││ ││ ││ │\n                                     └─┘└─┘└─┘└─┘└─┘\n                                      --------\n                                      00:25:00\n```\n\nWe search for the grail. After an hour we give up to take a nap. We log our time as an interval\n\n```bash\n$ pomw add -d 60 2 # Add a 60 minute time interval for task 2\n```\n\n```\nTo Do Today                                                        2019-03-21\n-----------                                                        ----------\n                                     ┌─┐┌─┐┌─┐┌─┐┌─┐\n1  Create documentation for pomw     │/││x││ ││ ││ │\n                                     └─┘└─┘└─┘└─┘└─┘\n                                      -------\n                                      0:25:00\n                                      \nNon Pomodoro Time                     \n-----------------\n2  Find the holy grail                1:00:00\n                                      -------\n                                      1:00:00\n```\n\nKing Arthur will only pay for 50 minutes of our time, so we modify the time interval\n\n```bash\n$ pomw ls  # Lists the time intervals contained in the database\n```\n\n```\nID   Type    Date        Start     End       Project                Task\n@1   NonPom  2019-03-21  13:43:32  14:43:32  python                 Find the holy grail\n@2   Pom     2019-03-21  13:15:17  13:40:17  pomw                   Create documentation for pomw\n```\n\nFrom the listing, we see that we need to modify interval `@1`. We set the new end time to 14:33:32\n\n```bash\n$ pomw mod -e 14:33:32 @1 # Modify interval @1, set new end time as 14:33:32\n```\n\n```\nID   Type    Date        Start     End       Project                Task\n@1   NonPom  2019-03-21  13:43:32  14:33:32  python                 Find the holy grail\n@2   Pom     2019-03-21  13:15:17  13:40:17  pomw                   Create documentation for pomw\n```\n\nKing Arthur will not pay for our documentation creation efforts. We delete the pomodoro at interval `@2`.\n\n```bash\n$ pomw rm @2 # Delete interval @2 \n```\n\n```\nID   Type    Date        Start     End       Project                Task\n@1   NonPom  2019-03-21  13:43:32  14:33:32  python                 Find the holy grail\n```\n\n\nHopefully this gave you a (not too confusing) introduction on the power of PomodoroWarrior. \n\nThere are many more command line arguments available than was illustrated in this example. Use the `--help` option for any command to learn its complete usage.  \n\n\n## Caveat ##\n\nTimeWarrior intervals does not have unique ids, and as such, PomodoroWarrior matches intervals through start and end times. \n\nIf intervals are modified with TimeWarrior directly, the link for that interval between the databases is lost.\n\nPomodoroWarrior tries to handle this situation gracefully, but it is recommend that you use PomodoroWarrior to modify any intervals, in order to keep the databases in sync.\n\n## Development ##\n\n### Build System ###\n\nStarting with version `0.0.3` we replace [setuptools](https://setuptools.readthedocs.io) with [poetry](https://poetry.eustace.io).\nPoetry is [PEP 518](https://www.python.org/dev/peps/pep-0518/) compliant, and uses `pyproject.toml` for configuration. In my opinion it provides for a simpler development experience.\n\nPoetry recommends that you install it isolated from the rest of your system. This can be done by running the install script:\n\n`curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python`\n\n### Release ###\n\nThe script `./release.py` have been developed to automate cutting releases. It requires [git-extras](https://github.com/tj/git-extras) to be installed on your system.\n\nIf you want to manually create a release, you have to follow these rules:\n\n- Only release from `master`\n- Update `pomw/__version__.py` with the new version number\n- Update `pyproject.toml` with the new version number\n- Update `Changelog` with the commits since the previous release\n\n### Upload a release to PYPI ###\n\nOnce a tag is created, and pushed to Gitlab, the release is automatically uploaded to PYPI by the Gitlab CI publish stage.\n\n\n',
    'author': 'Tjaart van der Walt',
    'author_email': 'tjaart@tjaart.org',
    'url': 'https://tjaart.gitlab.io/pomw',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
