Giter VIP home page Giter VIP logo

watson's Introduction

https://tailordev.github.io/Watson/img/logo-watson-600px.png

Build Status PyPI Latest Version Requirements Status

Watson is here to help you manage your time. You want to know how much time you are spending on your projects? You want to generate a nice report for your client? Watson is here for you.

Wanna know what it looks like? Check this below.

Watson screenshot

Nice isn't it?

Quick start

Installation

On OS X, the easiest way to install watson is using Homebrew:

$ brew update && brew install watson

On other platforms, install watson using pip or pip3, depending on which one is available:

$ pip install td-watson

or:

$ pip3 install td-watson

If you need more details about installing watson, please refer to the documentation.

Usage

Start tracking your activity via:

$ watson start world-domination +cats

With this command, you have started a new frame for the world-domination project with the cats tag. That's it.

Now stop tracking you world domination plan via:

$ watson stop
Project world-domination [cats] started 8 minutes ago (2016.01.27 13:00:28+0100)

You can log your latest working sessions (aka frames) thanks to the log command:

$ watson log
Tuesday 26 January 2016 (8m 32s)
      ffb2a4c  13:00 to 13:08      08m 32s   world-domination  [cats]

Please note that, as the report command, the log command comes with projects, tags and dates filtering.

To list all available commands, either read the documentation or use:

$ watson help

Contributor Code of Conduct

If you want to contribute to this project, please read the project Contributor Code of Conduct

License

Watson is released under the MIT License. See the bundled LICENSE file for details.

watson's People

Contributors

alexkey avatar andrewmeyer avatar bcho avatar braincow avatar davidag avatar dbln avatar emilmaric avatar ericguirbal avatar gdetrez avatar geistesk avatar hiiwave avatar jmaupetit avatar jmkerr avatar joelostblom avatar k4nar avatar komputerwiz avatar kwou avatar larsborn avatar loonies avatar maxg87 avatar minchinweb avatar pylipp avatar rianmcguire avatar roramirez avatar spotlightkid avatar timofurrer avatar tycholiz avatar veganjay avatar waynew avatar willdurand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watson's Issues

[restart command] stop_on_start option?

It seems that the stop_on_start option is not taken into account when using restart with an active project. In the following scenario, should we consider stopping bar and restart foo?

$ watson start foo +tag
$ watson start bar +lol
Stopping project foo [tag], started just now. (id: xxxxxx)
Starting project bar [lol] at 13:48
$ watson restart
Error: Project already started: bar [lol]

Add color settings

It would be nice to have some control over the color codes being used. I am having trouble reading tags on a windows machine using putty with default color settings (black background).

If I can help out make this happen, in any way, give me hint ๐Ÿ˜„

Impossible to delete the last frame

When i try to delete all frames one by one, the last one never can be deleted.

watson remove 125daea
You are about to remove frame test [test] from 23:13 to 23:14, continue? [y/N]: y
Frame deleted.
watson log
Tuesday 06 October 2015
        125daea  23:13 to 23:14         18s  test  [test]

watson edit barfs with TypeError

Under Python 3.4.3 & arch linux, with watson installed in a venv:

$ watson edit

<opens up vim session, simply write and quit>

๐Ÿ’ฅ

Traceback (most recent call last):
  File "/home/wayne/.virtualenvs/myenv/bin/watson", line 7, in <module>
    from watson.__main__ import cli
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/watson/__main__.py", line 6, in <module>
    cli.cli()
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/watson/cli.py", line 544, in edit
    watson.frames[id] = (project, start, stop, tags)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/watson/frames.py", line 105, in __setitem__
    self._rows[self._get_index_by_id(key)] = frame
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/watson/frames.py", line 120, in _get_index_by_id
    i for i, v in enumerate(self['id']) if v.startswith(id)
  File "/home/wayne/.virtualenvs/myenv/lib/python3.4/site-packages/watson/frames.py", line 120, in <genexpr>
    i for i, v in enumerate(self['id']) if v.startswith(id)
TypeError: startswith first arg must be str or a tuple of str, not NoneType

[remove] watson remove should ask for user confirmation

The remove command should ask the user to confirm its choice unless the -f --force flag is activated.

$ watson remove 156a044
You are about to remove frame <project> [tag] with 156a044. Confirm? (y/N) y
Frame removed
$ watson remove da4f0ed --force
Frame removed

Bash completion doesn't handle projects or tags with spaces properly

Just noticed this:

$ watson start "World Domination" +"first analysis"
$ watson stop

now:

$ watson start <tab>
anotherproject Domination foo World
...
$ watson start "World Domination" <TAB>
analysis +anothertag first +yetanothertag
...

Probably can be fixed by introducing proper quoting for the output of watson projects and watson tags. Have to look into it.

handle pause/resume

It would be great to have a pause/resume functionality. This would actually have the same effect than start, stop then start again, but without having to specify the project each time.

Add merge command

I am using dropbox with Mackup to sync watson frames between all my machines. In some cases, a conflict file is generated due to a missing sync when one of my machine was used off-line. Hence, it would be nice to be able to merge two conflicting watson frames files.

Usage may be:

$ watson merge frames frames-with-conflicts

By default, merge will output statistics about the merge operation, like:

$ watson merge frames frames-with-conflicts
120 frames will be left unchanged
12  frames will be merged
3   frame conflicts need to be resolved

To perform the merge operation, there is an option for that:

$ watson merge frames frames-with-conflicts --no-dry-run
120 frames unchanged
12 frames merged
Will resolve conflicts:
frame 8804872:
< {
<     "project": "tailordev",
<     "start": "2015-07-28 09:33:33",
<     "stop": "2015-07-28 10:39:36",
<     "tags": [
<         "intern",
<         "daily-meeting"
<     ]
< }

---
> {
>     "project": "tailordev",
>     "start": "2015-07-28 09:33:33",
>     "stop": "**2015-07-28 11:39:36**",
>     "tags": [
>         "intern",
>         "daily-meeting"
>     ]
> }
Select the frame you want to keep: left or right? (L/r)
...

I am widely open to discussion & suggestions.

Rename project / tag

is there anything planed to rename a project / tag? At the moment I'm doing this with search&replace on the frames file directly (which is possible but most probably not indented ;-)).

I may also be able to contribute with a PR if we agree on a syntax.

watson rename --project old_project new_project
watson rename --tag old_tag new_tag

would be a first simple approach. At a later point, we could also integrate some sort of interactivity to ask on a per entry basis for renames.

Or am I heading in a wrong direction since there already is such a command or something?

awesome tool btw ๐Ÿ‘!

Start a frame with a defined date and time

Hi,

Most of time I forget to start watson when I start a new task. If I start watson 30 minutes after I start my task, I have to wait the end of the task and then edit the frame and change the date.

It would be great to have an option like --date where you can specify the date and time.

WDYT ?

Add a context to frames

The aim is to propose the management of multiple context of work. For example watson start sonata +formatter --context=home, watson start sonata +formatter --context=office

The report could have this format:

Total time: 41s

Total home: 18s
125daea 23:13 to 23:14 18s sonata [formatter]

Total office: 23s
125daeb 23:14 to 23:15 23s sonata [formatter]

Issues with time reporting

When I make a report for time tracked today (watson report proj -f <today>), I get a report for only those items since 12 noon today. Why not for the whole of today?

TravisCI build sometime fails while installing python

TravisCI logs:

3.5 is not installed; attempting download

bzip2: Compressed file ends unexpectedly;

    perhaps it is corrupted?  *Possible* reason follows.

bzip2: Inappropriate ioctl for device

    Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.

You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover

data from undamaged sections of corrupted files.

tar: Unexpected EOF in archive

tar: Unexpected EOF in archive

tar: Error is not recoverable: exiting now
git.checkout

0.41s$ git clone --depth=50 https://github.com/TailorDev/Watson.git TailorDev/Watson

Cloning into 'TailorDev/Watson'...

remote: Counting objects: 617, done.

remote: Compressing objects: 100% (255/255), done.

remote: Total 617 (delta 382), reused 570 (delta 344), pack-reused 0

Receiving objects: 100% (617/617), 223.28 KiB | 0 bytes/s, done.

Resolving deltas: 100% (382/382), done.

Checking connectivity... done.

$ cd TailorDev/Watson

0.45s$ git fetch origin +refs/pull/70/merge:

remote: Counting objects: 14, done.

remote: Compressing objects: 100% (11/11), done.

remote: Total 14 (delta 8), reused 9 (delta 3), pack-reused 0

Unpacking objects: 100% (14/14), done.

From https://github.com/TailorDev/Watson

 * branch            refs/pull/70/merge -> FETCH_HEAD

$ git checkout -qf FETCH_HEAD

This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.

If you require sudo, add 'sudo: required' to your .travis.yml

See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.

Setting environment variables from .travis.yml

$ export TOX_ENV=flake8

0.00s$ source ~/virtualenv/python3.5/bin/activate

/home/travis/build.sh: line 45: /home/travis/virtualenv/python3.5/bin/activate: No such file or directory

The command "source ~/virtualenv/python3.5/bin/activate" failed and exited with 1 during .

Your build has been stopped.

Python module error, can't import cli

System: Ubuntu 12.04, python 2.7

Cloned repository, sudo python setup.py install

Successful.

Run "watson help"

and get:

Traceback (most recent call last):
  File "/usr/local/bin/watson", line 9, in <module>
    load_entry_point('watson==0.1', 'console_scripts', 'watson')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/watson-0.1-py2.7.egg/watson/__main__.py", line 1, in <module>
    from watson import cli
ImportError: cannot import name cli

Synchronization backends should be plugable

In my opinion watson should not support only one (relatively unknown) service for synchronizing frames with a remote storage, but give the means to users to choose alternatives and to developers to implement support for them. For example, there could be synchronization Backends for Dropbox, Google Drive, iCloud, etc.

Please excuse the long text below, but I think this issue warrants some thorough discussion and I would be glad to hear your thoughts on it.

To not bloat the watson distribution with too many sync backends (and their dependencies), I propose to use a plugin framework to load backend implementations and to specify the API that they have to support.

As a fist step, the existing backend implementation for artich.io should be refactored as a plugin and a framework for loading it implemented in watson. For the latter I propose to use setuptools entry points since it allows to implement backend plugins in separate distributions and it can be supported in watson without adding additional dependencies and very little code. A good brief introduction to using entry points can be found here.

As a Proof of Concept I have started a new branch called syncplugins on my fork of watson. I plan to add a backend plugin using Dropbox to it soon.

The branch has the following changes:

  • Moved pull, push, _get_request_info and _get_remote_projects methods of watson.watson.Watson into a new class ArtichIOSync in the new module watson.artichio.
  • Added an entry point group watson.sync in setup.py
  • Added the entry point artichio with the implementation in watson.artichio:ArtichIOSync to it
  • Added a new method _load_backend to the Watson class to load the sync backend specified in the configuration option backend.name (defaults to artichio)
  • Re-implemented Watson.pull and Watson.push to call _load_backend and then delegate the actual pushing and puling of frames to the backend plugin.
  • I've kept the logic to decide which frames to add and upload in those methods, since this will probably be the same for all plugins (but see discussion below about using several backends at the same time). This means that push and pull just return a list of frames, they do not modify Watson.frames themselves.
  • To support this better, I've added a __contains__ method to frames.Frames to test for existing frames by ID.
  • Added some tests for Watson._load_backend and fixed others to account for moved methods.

Since I don't have an artich.io account, I can't really test wether the changes broke the synchronization, but the tests still pass. The way the artich.io responses are mocked, leads to few questions, though:

  • Do the frames returned by artich.io not contain an updated_at timestamp? IMHO this should be always required to enable watson to recognise editing conflicts.
  • Is there a way to pass information about deleted frames (in both directions)?
  • Currently watson keeps a global timestamps when the last sync was performed and this is passed to artich.io. If we want to allow the user to synchronize with several services at the same time, this timestamp must either be saved per backend or it should be the backend's responsibility to save and retrieve it.

The current API for plugins looks like this:

class BaseSyncBackend:
    def __init__(self, config):
         self.config = config  # a configparser.ConfigParser instance

   def pull(self, last_sync):
       return received_frames  # a list of frames.Frame instances

   def push(self, frames):
       return uploaded_frames  # a list of frames.Frame instances

Does this need to be extended / changed somehow? If backends should become responsible for keeping their state (last_sync), do we need to pass a storage path?

Add some tests for the CLI

Currently the lib is pretty well covered, but the CLI is not. Some functions like start or edit have some complexity in them so they should be tested.

[stop] return frame uuid

It would be nice to print the created frame id when calling the stop command:

$ watson stop
Stopping project foo [tag1], started 2 minutes ago. A new frame with id 0fdbc7a was created.

[log] order frames by starting date

At this times frames are not properly sorted, leading to this kind of output when editing a frame:

Tuesday 07 April 2015
        dd307a6  16:20 to 19:00  2h 40m 35s     foo  [tag]
        ae08c81  15:20 to 16:10     50m 02s     bar  [tag]
        741dab2  23:31 to 00:35  1h 04m 22s     foo  [tag]

Frames should be ordered by starting date.

Add project documentation

A real browsable documentation is drastically missing. I mean the README is a good start, but it's not enough: for example, all supported configuration options are not documented!

documentation: explaining 'frame' and config

Hi!

Great project so far =).

A couple things, though. Currently, there is nothing in the readme explaining what a frame is (I'm guessing it's a logging instance--aka one start and stop). Also, you don't say anywhere what the config options are, or what "crick" is.

Best,
Brian

Watson not found in iMac after install -- Help Needed

$ pip install td-watson
Requirement already satisfied (use --upgrade to upgrade): td-watson in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Click in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from td-watson)
Requirement already satisfied (use --upgrade to upgrade): arrow in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from td-watson)
Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from td-watson)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from arrow->td-watson)
zsh: command not found: battery_time_remaining
zsh: command not found: battery_pct_prompt

$ watson help
zsh: command not found: watson
zsh: command not found: battery_time_remaining
zsh: command not found: battery_pct_prompt

With hours > 9, log output doesn't line up

An example from me, forgetting to stop my timer last night:

    f9b1aa1  16:24 to 16:25     01m 13s               watson  [personal, floss]
    d59db15  16:25 to 07:23  14h 57m 45s               watson  [personal, floss]

I would have expected to see

    f9b1aa1  16:24 to 16:25      01m 13s               watson  [personal, floss]
    d59db15  16:25 to 07:23  14h 57m 45s               watson  [personal, floss]

Given that there are 168 hours in a week, even disallowing for overlap in theory someone could have 100 hours one task, and up to 68 hours distributed over the rest of their time.

Though I guess technically you could get the log for more than a week, so perhaps the correct thing to do here would be something like len(str(days * 24)) to get the format width specifier (and I guess +1, for the 'h' field)

Switch from git-flow to a simple git branching model

Historically at TailorDev we used to be git-flow people. This is why you will find multiple branches in this repository, e.g. master, develop, and feature branches (feature/foo). As previously mentioned by @willdurand and after a few weeks working with a simple git branching model, I think we need to clean up this repository and only keep the master branch. Every feature or hotfix will be developed in a feature branch and merged to master. All tags should point to master commits.

If we do so, this will have consequences for people having forked this repository since we will force push master and remove develop.

Are you ready for this?

Post edition summary should be converted to local time

When editing a frame, post edition summary datetimes are represented as utc and not local times. See for example:

$ watson status
Project crick [watson, community, tailordev] started 7 minutes ago (2015.11.24 09:27:46+0100)
# Edit the current frame without changing anything
$ watson edit
Edited frame for project crick [watson, community, tailordev], from 08:27 to - (-)

[edit] edit current state

In some cases, it would be useful to be able to edit the current state. For example, let's say I start a new working session:

$ watson start foo +bar

And I realize that a tag is missing. I am pretty sure that once I will stop this session, I will not remember to edit the new frame to fix this. Hence, editing the current status with a simple:

$ watson edit state

or

$ watson edit

would be a simple but useful feature.

watson log fails

When you try to log previous activity, watson fails. To reproduce test:

$ watson log

The traceback for python3.4 installed via homebrew (MacOS 10.10.2) follows:

Traceback (most recent call last):
  File "/usr/local/bin/watson", line 9, in <module>
    load_entry_point('watson==0.1', 'console_scripts', 'watson')()
  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 353, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 2302, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 2029, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/watson-0.1-py3.4.egg/watson/__main__.py", line 3, in <module>
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/decorators.py", line 26, in new_func
    return ctx.invoke(f, ctx.obj, *args[1:], **kwargs)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/click-3.3-py3.4.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/python3/3.4.1_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/watson-0.1-py3.4.egg/watson/cli.py", line 278, in log
ValueError: max() arg is an empty sequence

status should also report the exact start date/time

Information like an hour ago may be pretty but often isn't very useful or accurate.

Currently you have to manually open the state file any then convert the unix timestamp to see the exact start time of a running frame. Or did I miss another way to do this?

Repository tags pattern

At this time, release tags are not homogeneous. Two patterns have been pushed: 1.0.1 and v1.1.0. I would prefer a simple, non-prefixed pattern like: 1.0.1.

Do you agree?

When we will have chosen a pattern, we will need to fix existing tags and force push them. Since some tags point to master and others to develop, this needs to be done along with #58.

Include (or provide an option) to include current frame in reports

Right now the current frame appears to be excluded from reports. If you have no frames, for instance, and you do this:

$ watson start fnord
$ sleep 10; # Just so there's some time
$ watson report

You'll see that watson does not display anything. I think either it should by default, or you could do something like:

$ watson report --with-current

Most of the time I want to see how much time I've spent on a project including what I've been working on for the past 3.5 hours. Right now I think the only option is to do something like this:

$ watson report
$ watson status

And then manually combine the two numbers. There must be a better way :)

watson edit fails

cogniton@ada ~/research/code/Watson $ watson edit
Traceback (most recent call last):
  File "/home/cogniton/anaconda/bin/watson", line 9, in <module>
    load_entry_point('watson==0.1', 'console_scripts', 'watson')()
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 558, in load_entry_point

  File "/home/cogniton/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 2682, in load_entry_point

  File "/home/cogniton/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 2355, in load

  File "/home/cogniton/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 2361, in resolve

  File "build/bdist.linux-x86_64/egg/watson/__main__.py", line 6, in <module>
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/cogniton/anaconda/lib/python2.7/site-packages/click-5.1-py2.7.egg/click/decorators.py", line 26, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/watson/cli.py", line 481, in edit
  File "build/bdist.linux-x86_64/egg/watson/frames.py", line 88, in __getitem__

Add some options to the report command

Watson report is great, but experience can be smoother with a few more options:

Proposition 1:

  • --this-day (alias --today): report for current day
  • --past-day (alias --yesterday): report for day before today
  • --this-week: report for current month (from monday)
  • --past-week: report for last month (from monday)
  • --this-month: report for current month (from 1st)
  • --past-month: report for last month (from 1st)
  • --this-year: report for current year (from January 1st)
  • --past-year: report for last year (from January 1st)

Proposition 2:

  • --day report for current day
  • --day -1 report for yesterday
  • --week report for current week
  • --week -1 report for past week
  • --month report for current month
  • --month -1 report for past month
  • --year report for current year (starting January 1st)
  • --year -1 report for past year (starting January 1st)

The report command should handle projects and tags filtering

At this time, the report command only handles timespan reports. We must be able to generate a report for a single (or multiple) project(s) or tag(s). Typical calls would look like:

$ watson report --from 2014-04-16 --to 2014-04-17 --project foo
$ watson report --from 2014-04-16 --to 2014-04-17 --tag bar

We must be able to combine tags and projects filtering. Hence, if we want all frames from 2014-04-16 to 2014-04-17 for the project foo tagged with bar, usage would be:

$ watson report --from 2014-04-16 --to 2014-04-17 --project foo --tag bar 

If we also want to have frames tagged with lol, the call would be:

$ watson report --from 2014-04-16 --to 2014-04-17 --project foo --tag bar --tag lol

And of course, we are able to combine projects (and tags):

$ watson report --from 2014-04-16 --to 2014-04-17 --project foo --project spam --tag bar --tag lol

Add an optional (relative) time to the start and stop commands

Some times, you realize you have started working on a task/project without tracking it. It would be nice to have a CLI option to indicate that you actually started earlier. For instance

watson start --for 10min 'World Domination Project' +'first analysis'
watson start --since 14:35 'Work on personal organisation'

or something similar.

In the same way, the option can be useful for the stop command (e.g. back from lunch and see that your task is still started).

Add git commit-like comment on watson stop

This would be useful to provide historic context for a given time entry. Admittedly, this could possibly be handled via tags but I a description of "updated project estimates spreadsheet" vs. +project +estimates +update (or something similar) would make more sense.

An example of what I'm thinking is:

$ watson start ....
$ watson stop ....

Then open default editor (akin to watson edit <frame ref>).

Alternatively, add an additional flag -c "some kind of comment or note".

Integration with Toggl

I use Toggl to track my entire day's time. It would be awesome to be able to leverage Watson to track time and have it sync with Toggl.

I'm a python developer by trade, so I'll fork this bad boy and see what I can do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.