tickertock


Nametickertock JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryStreamdeck as a timetracker
upload_time2024-03-01 10:16:38
maintainer
docs_urlNone
author
requires_python<3.11,>=3.7
licenseMIT License
keywords timetracking clockify
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Tickertock
==========

A wrapper for `streamdeck_ui` to link it up to Clockify.

Using a StreamDeck for
this seemed like a waste of money until compared against losing an hour of
consultancy billing, and I dunno about anyone else, but I have saved many
hours through this little jobbie versus trying to be disciplined using the
desktop app or browser plugins.

With many thanks to the StreamDeck and `streamdeck_ui` folks, who
did 99.99% of the work, which I just in imported (aside from the
other open source libs obvs :D).

Installation
------------

"Nothing works, there's no buttons!"

Do you actually have a StreamDeck? Have a look at `Elgato's website <https://www.elgato.com/en/stream-deck>`_
and imagine yourself doing something way less cool with one. This has been tested
with 6- and 15- key decks on Linux.

"Nothing works, there's no setup.py file!"

That's right. I have fought with (and alongside) pipenv, poetry, generations
of pip, conda, setuptools, distutils and others. Now I there is a standard and
I am sticking to it. PEP621 is the hill I shall defend. It may be half-supported, and
have weirdnesses and I spent half an hour trying to get package data to
install (like every other Python packaging experience that I have had), but
it's a PEP, and some day we will live in an Avalon of packaging consistency.
And this package will install.

Make sure that you have a recent pip and setuptools, then:

    pip install .

"Why are there no tests"

Because this spent most of its life as a gluescript and custom changes to
streamdeck_ui, which did not deserve to pass tests. Now I have got frustrated
patching it, and other people want to use this, so this is step 1 of tidying
up. The other steps involve tests, once actual use for this is established.
In the meantime, PR heroes welcome.

Usage
-----

To initialize:

    tickertock init --clockify-api-key APIKEY --clockify-workspace-id WORKSPACEID

Once this is up, you should have a directory `~/.config/tickertock` with a bunch
of config. In particular, a `projects.toml` file with your projects from
Clockify. You can rearrange the order of these (or remove any) from the `entries`
list to change how they get ordered on your StreamDeck.

If you want fancier icons, put 128x128 icons into the `~/.config/tickertock/assets`
folder with lowercase names (PNGs) matching your projects (e.g. General ->
general.png)

You can customize the names, which will change the button text (and expected
asset PNG name, if used) by altering the key in the projects map (e.g. to Accounts)
and updating the matching name in `entries`. For instance:

    [projects.Accounts]
    
    "Accounts System Logs"
    colour = "9C27B0"
    ...
    [page]
    entries = [
    "Accounts",
    ...

This works provided you keep the ``name = "..."`` matching Clockify.

Once it is set up, you can run `tickertock ui`. This is a thin wrapper around
the StreamDeck UI tool and you should get a taskbar icon of theirs appearing.
When you toggle to timetrack, this image will update to your project logo.
In theory, you could try configuring the StreamDeck via their configuration UI,
but I don't know how that'll go for you, as we patch it on load. YMMV.

You can use `tickertock writeout` to get output config if you just want to get
an initial setup that you can customize with the full streamdeck_ui
functionality.

Scripting Clockify is also then as easy as:

    tickertock toggle Accounts

to start the Accounts project tracking, and

    tickertock toggle None

to stop any active tracking.

Functionality
-------------

While this is running on a StreamDeck, the button in the bottom-right corner
is special. All the others should be project icons and pressing them will
start tracking on that project.

If you stop tracking, then the bottom-right indicator should show a big red
icon to warn you. If you are tracking, it should show "@" followed by the name
of the project. As time goes on it shows a clockface to indicate minutes tracked
and, if you go over an hour, a number indicating the hours on the project.

It syncs from Clockify every 30s, so it should automatically show the active
project when started, and if you change something in Clockify or the browser
plugin, you should see it shortly update on your device.

Repeatedly pressing the bottom-right button will cycle through the pages,
showing all your projects. It should correctly rearrange if you plug a bigger
or smaller deck in, but I have not tried with multiple at once (should be
fixable by a PR if it doesn't work, as we always loop through attached decks).

Notes
-----

Recently, I noticed a change needed to be added to streamdeck_ui to successfully
run:

    image_filter:31    if kind is None and isinstance(self.file, str):

As the project is moving to `streamdeck-linux-gui`, this does not seem sensible
to PR to the old project, but instead to update `tickertock` to run with the new
one first.

License
-------

MIT License, 2020- Phil Weir.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tickertock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<3.11,>=3.7",
    "maintainer_email": "",
    "keywords": "timetracking,clockify",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8b/7e/ee50c77a8e2a4c0aea58a282a68429d50e9884159faf061745234b6058d9/tickertock-0.1.2.tar.gz",
    "platform": null,
    "description": "Tickertock\n==========\n\nA wrapper for `streamdeck_ui` to link it up to Clockify.\n\nUsing a StreamDeck for\nthis seemed like a waste of money until compared against losing an hour of\nconsultancy billing, and I dunno about anyone else, but I have saved many\nhours through this little jobbie versus trying to be disciplined using the\ndesktop app or browser plugins.\n\nWith many thanks to the StreamDeck and `streamdeck_ui` folks, who\ndid 99.99% of the work, which I just in imported (aside from the\nother open source libs obvs :D).\n\nInstallation\n------------\n\n\"Nothing works, there's no buttons!\"\n\nDo you actually have a StreamDeck? Have a look at `Elgato's website <https://www.elgato.com/en/stream-deck>`_\nand imagine yourself doing something way less cool with one. This has been tested\nwith 6- and 15- key decks on Linux.\n\n\"Nothing works, there's no setup.py file!\"\n\nThat's right. I have fought with (and alongside) pipenv, poetry, generations\nof pip, conda, setuptools, distutils and others. Now I there is a standard and\nI am sticking to it. PEP621 is the hill I shall defend. It may be half-supported, and\nhave weirdnesses and I spent half an hour trying to get package data to\ninstall (like every other Python packaging experience that I have had), but\nit's a PEP, and some day we will live in an Avalon of packaging consistency.\nAnd this package will install.\n\nMake sure that you have a recent pip and setuptools, then:\n\n    pip install .\n\n\"Why are there no tests\"\n\nBecause this spent most of its life as a gluescript and custom changes to\nstreamdeck_ui, which did not deserve to pass tests. Now I have got frustrated\npatching it, and other people want to use this, so this is step 1 of tidying\nup. The other steps involve tests, once actual use for this is established.\nIn the meantime, PR heroes welcome.\n\nUsage\n-----\n\nTo initialize:\n\n    tickertock init --clockify-api-key APIKEY --clockify-workspace-id WORKSPACEID\n\nOnce this is up, you should have a directory `~/.config/tickertock` with a bunch\nof config. In particular, a `projects.toml` file with your projects from\nClockify. You can rearrange the order of these (or remove any) from the `entries`\nlist to change how they get ordered on your StreamDeck.\n\nIf you want fancier icons, put 128x128 icons into the `~/.config/tickertock/assets`\nfolder with lowercase names (PNGs) matching your projects (e.g. General ->\ngeneral.png)\n\nYou can customize the names, which will change the button text (and expected\nasset PNG name, if used) by altering the key in the projects map (e.g. to Accounts)\nand updating the matching name in `entries`. For instance:\n\n    [projects.Accounts]\n    \n    \"Accounts System Logs\"\n    colour = \"9C27B0\"\n    ...\n    [page]\n    entries = [\n    \"Accounts\",\n    ...\n\nThis works provided you keep the ``name = \"...\"`` matching Clockify.\n\nOnce it is set up, you can run `tickertock ui`. This is a thin wrapper around\nthe StreamDeck UI tool and you should get a taskbar icon of theirs appearing.\nWhen you toggle to timetrack, this image will update to your project logo.\nIn theory, you could try configuring the StreamDeck via their configuration UI,\nbut I don't know how that'll go for you, as we patch it on load. YMMV.\n\nYou can use `tickertock writeout` to get output config if you just want to get\nan initial setup that you can customize with the full streamdeck_ui\nfunctionality.\n\nScripting Clockify is also then as easy as:\n\n    tickertock toggle Accounts\n\nto start the Accounts project tracking, and\n\n    tickertock toggle None\n\nto stop any active tracking.\n\nFunctionality\n-------------\n\nWhile this is running on a StreamDeck, the button in the bottom-right corner\nis special. All the others should be project icons and pressing them will\nstart tracking on that project.\n\nIf you stop tracking, then the bottom-right indicator should show a big red\nicon to warn you. If you are tracking, it should show \"@\" followed by the name\nof the project. As time goes on it shows a clockface to indicate minutes tracked\nand, if you go over an hour, a number indicating the hours on the project.\n\nIt syncs from Clockify every 30s, so it should automatically show the active\nproject when started, and if you change something in Clockify or the browser\nplugin, you should see it shortly update on your device.\n\nRepeatedly pressing the bottom-right button will cycle through the pages,\nshowing all your projects. It should correctly rearrange if you plug a bigger\nor smaller deck in, but I have not tried with multiple at once (should be\nfixable by a PR if it doesn't work, as we always loop through attached decks).\n\nNotes\n-----\n\nRecently, I noticed a change needed to be added to streamdeck_ui to successfully\nrun:\n\n    image_filter:31    if kind is None and isinstance(self.file, str):\n\nAs the project is moving to `streamdeck-linux-gui`, this does not seem sensible\nto PR to the old project, but instead to update `tickertock` to run with the new\none first.\n\nLicense\n-------\n\nMIT License, 2020- Phil Weir.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Streamdeck as a timetracker",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "timetracking",
        "clockify"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "847673adacd87f9d4282047d5258efcdea7a36b188812f50bee32dec43f51841",
                "md5": "28b46886133601bc994fd1ffa064078e",
                "sha256": "721d7b9379b47332c9ceb4087dcd018e00fad25c7e50117c43395cd5c9509702"
            },
            "downloads": -1,
            "filename": "tickertock-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28b46886133601bc994fd1ffa064078e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.11,>=3.7",
            "size": 17259,
            "upload_time": "2024-03-01T10:16:37",
            "upload_time_iso_8601": "2024-03-01T10:16:37.048574Z",
            "url": "https://files.pythonhosted.org/packages/84/76/73adacd87f9d4282047d5258efcdea7a36b188812f50bee32dec43f51841/tickertock-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b7eee50c77a8e2a4c0aea58a282a68429d50e9884159faf061745234b6058d9",
                "md5": "f5d6071bbb38c0c41f62740e8512e82d",
                "sha256": "2876de7f76a0f2fe157408689853399bb7e580238be5ddcfba80b0c8fc6eb667"
            },
            "downloads": -1,
            "filename": "tickertock-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f5d6071bbb38c0c41f62740e8512e82d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.11,>=3.7",
            "size": 17872,
            "upload_time": "2024-03-01T10:16:38",
            "upload_time_iso_8601": "2024-03-01T10:16:38.684128Z",
            "url": "https://files.pythonhosted.org/packages/8b/7e/ee50c77a8e2a4c0aea58a282a68429d50e9884159faf061745234b6058d9/tickertock-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 10:16:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tickertock"
}
        
Elapsed time: 0.19965s