python-time-track


Namepython-time-track JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://projects.om-office.de/frans/track.git
SummaryAutomatic Time Tracker
upload_time2023-07-10 05:08:37
maintainer
docs_urlNone
authorFrans Fürst
requires_python>=3.9,<3.12
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Track - automatic time tracker for computer work

Track logs the time you're actively working on your desktop computer as well as
the applications you're using in order to create a time chart of your
working day.

Track does *not* connect *anywhere* and shares your information with nobody!

Actually this is why I started this project in the first place..

However at the current development stage Track stores all data unencrypted,
so please ensure nobody has access to your Track directory (usually `~/.track`).

Unlike [KTimeTracker](https://www.kde.org/applications/utilities/ktimetracker/)
or [Hamster](https://projecthamster.wordpress.com/about/) Track aims at zero
user interaction. Once configured you just (auto)start it and Track runs on
it's own.

This is an early screenshot to give an idea of how Track works:
![recent screenshot](track-screenshot.png)

**What it does**:
* logs times when your computer is active and which applications are in focus
* handles a list of regex-rules which assign certain activities to private work

**What it does not**:
* manage an abstract task list you would have to maintain
* send any information to someone

**When you should use Track**:
* in case you're working mainly on a computer like software developers
* if you want to know how long you've been at work today
* if you want to know how much of your private time you spent on the computer
* if you want to waste your time with another self profiling tool

The current *project state* is (still! damn!) very early (see the
[schedule](progress.md)).

Very basic features are still missing so it might be wise to come back in a
week or so.
However it's totally save to use the tool and it's providing some interesting
information already.


## Categories and Rules

In order to get an idea how much of the day you spend for work and how much
for private stuff (or how much you spend on project A or project B) track allows
you to define special *rules* which assign each running program to a category.

Right now categories are just numbers (2 for work, 3 for private stuff, 4 for break,
0 for idle and 1 for unassigned programs). In the future I plan to allow arbitrary
categories (or category trees), e.g.:

* work
  - project A
  - project B
  - browsing on github.com
* private stuff
  - project C
* procrastinating
  - browsing on reddit.com

The technical approach is very simple: you define standard Python *regex* rules
which are matched against the *title* of the active window.

For example - in a very simple world - it might be enough to define that browsing
the internet using "Firefox" is private stuff (category 3) and everything else
is work (category 2). In this case you would just define one rule:

    regex = `r".*-Mozilla Firefox.*"` -> category = `3`

This way every program whose title does not match `.*-Mozilla Firefox.*` would
be assigned to the default category 0 and all *Firefox* browser windows would
result in category 1 (which you might be *private* in your eyes).


## Requirements

Basically you Python3 with `PyQt5`, `psutil` and `zmq` installed. Some PyQt5 versions do not
behave well and you will need build-essentials etc to make it work.
For me installing the following packages worked:

* Linux with X11 (Wayland had some problems when I last checked it)
* or Windows - it once worked but currently I have no way to check it
* Python 3+
* `python3-devel` or equivalent via `apt`, `dnf`, etc.
* `PyQt5` via pip (v5.14 worked for me)
* `zmq` via pip
* `psutil` via pip

Try this pip command: `pip3 install --user --upgrade psutil zmq PyQt5==5.14`


## How to run

Clone the repo:
```
git clone https://github.com/frans-fuerst/track
```

Run `track` to start Track client and server. The server will keep running in background if UI
gets closed.

To list starting / endings times of recorded days run `track-cli list`


## Know limitations / Shortcomings

* Currently Track seems to not work well with Wayland, which might be an issue of both Track and
  Wayland. When your're on Linux consider using X11.
* I started this project 5 years ago when my Python skills were still very weak. Please do either
  not look at the code or help me improve it.
* Track *records* data but still does not evaluate it. `track-cli` does some steps in that
  direction.
* No check for plausibility: if - for example - your computer wakes up at 3:12 for just a second
  this incident will be recorded and currently there is no way to remove this stray event and
  your day will officially start at 3:12
* Setup / autostart worked once upon a time but doesn't now. But as a Linux Pro you know what to do.
* Daily note does'nt get cleared on midnight (but you can simply overwrite it)
* Break (cat 4) cannot be selected in timechart
* Bug: Gnome Icon not working
* Categories limited to 0-4
* Categories as ints


## Tests

Here is how I currently "test" track. It's actually more try and look for crashes :)

* Delete `~/.track/`, Try to start `track`
* Open all spoilers
* Delete all rules by pressing delete
* add rules
* edit note
* restart
* rules still exist?
* note still exists?

            

Raw data

            {
    "_id": null,
    "home_page": "https://projects.om-office.de/frans/track.git",
    "name": "python-time-track",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "Frans F\u00fcrst",
    "author_email": "frans.fuerst+gitlab@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/31/cb/276b648cb5db72a0099309962fc3fb7a3b8fca4ef4c43680314d492c16d6/python_time_track-0.0.1.tar.gz",
    "platform": null,
    "description": "# Track - automatic time tracker for computer work\n\nTrack logs the time you're actively working on your desktop computer as well as\nthe applications you're using in order to create a time chart of your\nworking day.\n\nTrack does *not* connect *anywhere* and shares your information with nobody!\n\nActually this is why I started this project in the first place..\n\nHowever at the current development stage Track stores all data unencrypted,\nso please ensure nobody has access to your Track directory (usually `~/.track`).\n\nUnlike [KTimeTracker](https://www.kde.org/applications/utilities/ktimetracker/)\nor [Hamster](https://projecthamster.wordpress.com/about/) Track aims at zero\nuser interaction. Once configured you just (auto)start it and Track runs on\nit's own.\n\nThis is an early screenshot to give an idea of how Track works:\n![recent screenshot](track-screenshot.png)\n\n**What it does**:\n* logs times when your computer is active and which applications are in focus\n* handles a list of regex-rules which assign certain activities to private work\n\n**What it does not**:\n* manage an abstract task list you would have to maintain\n* send any information to someone\n\n**When you should use Track**:\n* in case you're working mainly on a computer like software developers\n* if you want to know how long you've been at work today\n* if you want to know how much of your private time you spent on the computer\n* if you want to waste your time with another self profiling tool\n\nThe current *project state* is (still! damn!) very early (see the\n[schedule](progress.md)).\n\nVery basic features are still missing so it might be wise to come back in a\nweek or so.\nHowever it's totally save to use the tool and it's providing some interesting\ninformation already.\n\n\n## Categories and Rules\n\nIn order to get an idea how much of the day you spend for work and how much\nfor private stuff (or how much you spend on project A or project B) track allows\nyou to define special *rules* which assign each running program to a category.\n\nRight now categories are just numbers (2 for work, 3 for private stuff, 4 for break,\n0 for idle and 1 for unassigned programs). In the future I plan to allow arbitrary\ncategories (or category trees), e.g.:\n\n* work\n  - project A\n  - project B\n  - browsing on github.com\n* private stuff\n  - project C\n* procrastinating\n  - browsing on reddit.com\n\nThe technical approach is very simple: you define standard Python *regex* rules\nwhich are matched against the *title* of the active window.\n\nFor example - in a very simple world - it might be enough to define that browsing\nthe internet using \"Firefox\" is private stuff (category 3) and everything else\nis work (category 2). In this case you would just define one rule:\n\n    regex = `r\".*-Mozilla Firefox.*\"` -> category = `3`\n\nThis way every program whose title does not match `.*-Mozilla Firefox.*` would\nbe assigned to the default category 0 and all *Firefox* browser windows would\nresult in category 1 (which you might be *private* in your eyes).\n\n\n## Requirements\n\nBasically you Python3 with `PyQt5`, `psutil` and `zmq` installed. Some PyQt5 versions do not\nbehave well and you will need build-essentials etc to make it work.\nFor me installing the following packages worked:\n\n* Linux with X11 (Wayland had some problems when I last checked it)\n* or Windows - it once worked but currently I have no way to check it\n* Python 3+\n* `python3-devel` or equivalent via `apt`, `dnf`, etc.\n* `PyQt5` via pip (v5.14 worked for me)\n* `zmq` via pip\n* `psutil` via pip\n\nTry this pip command: `pip3 install --user --upgrade psutil zmq PyQt5==5.14`\n\n\n## How to run\n\nClone the repo:\n```\ngit clone https://github.com/frans-fuerst/track\n```\n\nRun `track` to start Track client and server. The server will keep running in background if UI\ngets closed.\n\nTo list starting / endings times of recorded days run `track-cli list`\n\n\n## Know limitations / Shortcomings\n\n* Currently Track seems to not work well with Wayland, which might be an issue of both Track and\n  Wayland. When your're on Linux consider using X11.\n* I started this project 5 years ago when my Python skills were still very weak. Please do either\n  not look at the code or help me improve it.\n* Track *records* data but still does not evaluate it. `track-cli` does some steps in that\n  direction.\n* No check for plausibility: if - for example - your computer wakes up at 3:12 for just a second\n  this incident will be recorded and currently there is no way to remove this stray event and\n  your day will officially start at 3:12\n* Setup / autostart worked once upon a time but doesn't now. But as a Linux Pro you know what to do.\n* Daily note does'nt get cleared on midnight (but you can simply overwrite it)\n* Break (cat 4) cannot be selected in timechart\n* Bug: Gnome Icon not working\n* Categories limited to 0-4\n* Categories as ints\n\n\n## Tests\n\nHere is how I currently \"test\" track. It's actually more try and look for crashes :)\n\n* Delete `~/.track/`, Try to start `track`\n* Open all spoilers\n* Delete all rules by pressing delete\n* add rules\n* edit note\n* restart\n* rules still exist?\n* note still exists?\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Automatic Time Tracker",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://projects.om-office.de/frans/track.git",
        "Repository": "https://projects.om-office.de/frans/track.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2361eb07bd796d2faf852895a492c7046610589c5a65cff80ce59b4324ec74b",
                "md5": "09b2b6931ec8ed876c4fcf0dc120102e",
                "sha256": "abeb1862f7dee476bc1177c3f6ca3ea943b702b104bed14b964c01cb84c23a87"
            },
            "downloads": -1,
            "filename": "python_time_track-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "09b2b6931ec8ed876c4fcf0dc120102e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.12",
            "size": 44931,
            "upload_time": "2023-07-10T05:08:35",
            "upload_time_iso_8601": "2023-07-10T05:08:35.597011Z",
            "url": "https://files.pythonhosted.org/packages/d2/36/1eb07bd796d2faf852895a492c7046610589c5a65cff80ce59b4324ec74b/python_time_track-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31cb276b648cb5db72a0099309962fc3fb7a3b8fca4ef4c43680314d492c16d6",
                "md5": "d08766de12b2a5648f6e4e4d3823d315",
                "sha256": "048afb499554d9d32528664e7e58b56ae7064c83bd5735f46f80328b4941d70b"
            },
            "downloads": -1,
            "filename": "python_time_track-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d08766de12b2a5648f6e4e4d3823d315",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.12",
            "size": 38526,
            "upload_time": "2023-07-10T05:08:37",
            "upload_time_iso_8601": "2023-07-10T05:08:37.348715Z",
            "url": "https://files.pythonhosted.org/packages/31/cb/276b648cb5db72a0099309962fc3fb7a3b8fca4ef4c43680314d492c16d6/python_time_track-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 05:08:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-time-track"
}
        
Elapsed time: 0.11126s