{"id":20153372,"url":"https://github.com/viseshrp/workedon","last_synced_at":"2025-04-09T21:33:06.703Z","repository":{"id":65225249,"uuid":"393994502","full_name":"viseshrp/workedon","owner":"viseshrp","description":"Work tracking from your shell.","archived":false,"fork":false,"pushed_at":"2023-09-05T05:27:22.000Z","size":1800,"stargazers_count":34,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-23T23:26:55.694Z","etag":null,"topics":["cli","command-line","command-line-tool","journal","journal-application","log","productivity","python","python3","work"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viseshrp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-08T15:13:11.000Z","updated_at":"2025-02-02T23:40:12.000Z","dependencies_parsed_at":"2024-11-13T23:29:09.999Z","dependency_job_id":null,"html_url":"https://github.com/viseshrp/workedon","commit_stats":{"total_commits":209,"total_committers":4,"mean_commits":52.25,"dds":"0.36363636363636365","last_synced_commit":"73684695398f6fd9093753043c1424cebb52cbfc"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viseshrp%2Fworkedon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viseshrp%2Fworkedon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viseshrp%2Fworkedon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viseshrp%2Fworkedon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viseshrp","download_url":"https://codeload.github.com/viseshrp/workedon/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114947,"owners_count":21050145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","command-line-tool","journal","journal-application","log","productivity","python","python3","work"],"created_at":"2024-11-13T23:18:45.248Z","updated_at":"2025-04-09T21:33:06.682Z","avatar_url":"https://github.com/viseshrp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"workedon\n========\n\n[![image](https://img.shields.io/pypi/v/workedon.svg)](https://pypi.python.org/pypi/workedon)\n[![Python versions](https://img.shields.io/pypi/pyversions/workedon.svg?logo=python\u0026logoColor=white)](https://pypi.org/project/workedon/)\n[![Tests status](https://github.com/viseshrp/workedon/workflows/Test/badge.svg)](https://github.com/viseshrp/workedon/actions?query=workflow%3ATest)\n[![Coverage](https://codecov.io/gh/viseshrp/workedon/branch/develop/graph/badge.svg)](https://codecov.io/gh/viseshrp/workedon)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/viseshrp/workedon/blob/develop/LICENSE)\n[![Downloads](https://pepy.tech/badge/workedon)](https://pepy.tech/project/workedon)\n\nWork tracking from your shell.\n\n![demo](https://raw.githubusercontent.com/viseshrp/workedon/develop/demo.gif)\n\nWhy build this\n--------------\n\nI believe tracking your work is an important way of measuring productivity\nand is a habit that is very helpful to develop. But the thing about habits\nis - if they aren’t easy and accessible, you will eventually stop doing\nthem - just like going to a gym that is 40 minutes away :) I tried\ndifferent methods to log my work and failed. Google Docs, iCloud\nNotes, Notepad++, Sticky Notes, etc. I really wanted a way of tracking\nwith very little effort so I could make this a habit.\nIt's pretty obvious that we all spend most of our day on the terminal.\nWouldn’t it be nice if I wrote a feature, committed it and then logged\nwhat I did right then and there without a second thought?\nWhat if I could also search this based on date so I could look at,\nfor example, how productive I was in the past week?\n\n`workedon` is another attempt of mine to make work logging a habit and\nimprove my productivity.\n\nHow it works\n------------\n\nThis tool is useful in two ways - for logging work and fetching logged work.\nThe implementation is very simple. Work is logged in the form of\n`workedon \u003ctext\u003e @ \u003cdate\u003e`or just `workedon \u003ctext\u003e`\n(which uses the current date/time). There is a custom parser that reads the\ncontent, splits it at the `@` to a work and a date component and then uses\nthe awesome `dateparser` library to parse human-readable dates into datetime\nobjects. This is then saved in a SQLite database\n([File location varies](https://github.com/platformdirs/platformdirs) based\non OS). Logged work can be fetched using multiple options that accept similar\nhuman-readable date/times. The same parser is used again to parse into datetime\nobjects which are used to query the database. The output uses the current\nshell's pager to display a paged list similar to `git log`\n(your output may slightly vary based on your shell).\n\nInstallation\n------------\n\n``` {.bash}\npip install workedon\n```\n\nRequirements\n------------\n\n- Python 3.7+\n\nFeatures\n--------\n\n- Log work from your shell in plain text with human-readable dates/times.\n  - The date/time is optional. The default is the current date/time.\n  - The `@` character is used to separate the text from the\n  date/time.\n- Fetch logged work with human-readable dates/times.\n- Familiar Git-like interface.\n- Filter, sort, delete, format and display logged work on your shell.\n- Set date/time format of the output through settings.\n\nSettings\n--------\n\nWhenever `workedon` is run for the first time, a settings file named\n`wonfile.py` is generated at the user's configuration directory, which\nvaries based on OS. To find out, run:\n\n``` {.bash}\nworkedon --print-settings-path\n```\n\nSettings are strings used to configure the behavior of `workedon`.\nThe currently available settings are:\n\n- `DATE_FORMAT` : Sets the date format of the output.\n  - Must be a valid Python [strftime](https://strftime.org/) string.\n  - Option: `--date-format \u003cvalue\u003e`\n  - Environment variable: `WORKEDON_DATE_FORMAT`\n- `TIME_FORMAT` : Sets the time format of the output.\n  - Must be a valid Python [strftime](https://strftime.org/) string.\n  - Option: `--time-format \u003cvalue\u003e`\n  - Environment variable: `WORKEDON_TIME_FORMAT`\n- `DATETIME_FORMAT` : Sets the date and time format of the output.\n  - Must be a valid Python [strftime](https://strftime.org/) string.\n  - Setting this overrides `DATE_FORMAT` and `TIME_FORMAT`.\n  - Option: `--datetime-format \u003cvalue\u003e`\n  - Environment variable: `WORKEDON_DATETIME_FORMAT`\n- `TIME_ZONE` : Sets the time zone of the output.\n  - Must be a valid\n    [timezone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n  - Default is the auto-detected timezone using the\n    [tzlocal](https://github.com/regebro/tzlocal) library.\n  - Option: `--time-zone \u003cvalue\u003e`\n  - Environment variable: `WORKEDON_TIME_ZONE`\n\nOrder of priority is Option \u003e Environment variable \u003e Setting.\n\nTo find your current settings, run:\n\n``` {.bash}\nworkedon --print-settings\n```\n\nCheck the default settings\n[here](https://github.com/viseshrp/workedon/blob/develop/workedon/default_settings.py).\n\nUsage\n-----\n\n\u003c!-- [[[cog\nimport cog\nfrom workedon import cli\nfrom click.testing import CliRunner\nrunner = CliRunner()\nresult = runner.invoke(cli.main, [\"--help\"])\nout = result.output.replace(\"Usage: main\", \"Usage: workedon\")\nresult = runner.invoke(cli.what, [\"--help\"])\nwhat_out = result.output\ncog.out(\n    \"``` {{.bash}}\\n\"\n    \"$ workedon --help\\n\"\n    \"{}\\n\"\n    \"$ workedon what --help\\n\"\n    \"{}\"\n    \"```\".format(out, what_out)\n)\n]]] --\u003e\n``` {.bash}\n$ workedon --help\nUsage: workedon [OPTIONS] COMMAND [ARGS]...\n\n  Work tracking from your shell.\n\n  Example usages:\n  1. Logging work:\n  workedon painting the garage\n  workedon studying for the SAT @ June 23 2010\n  workedon pissing my wife off @ 2pm yesterday\n\n  2. Fetching work:\n  workedon what\n  workedon what --from \"2pm yesterday\" --to \"9am today\"\n  workedon what --today\n  workedon what --past-month\n\nOptions:\n  -v, --version  Show the version and exit.\n  -h, --help     Show this message and exit.\n\nCommands:\n  workedon*  Specify what you worked on, with optional date/time.\n  what       Fetch and display logged work.\n\n$ workedon what --help\nUsage: what [OPTIONS]\n\n  Fetch and display logged work.\n\n  If no options are provided, work\n  from the past week is returned.\n\nOptions:\n  -r, --reverse           Reverse order while sorting.\n  -n, --count INTEGER     Number of entries to return.\n  -s, --last              Fetch the last thing you worked on\n  -i, --id TEXT           id to fetch with.\n  -f, --from TEXT         Start date-time to filter with.\n  -t, --to TEXT           End date-time to filter with.\n  --since TEXT            Fetch work done since a specified date-time in the\n                          past.\n  -d, --past-day          Fetch work done in the past 24 hours.\n  -w, --past-week         Fetch work done in the past week.\n  -m, --past-month        Fetch work done in the past month.\n  -y, --past-year         Fetch work done in the past year.\n  -e, --yesterday         Fetch work done yesterday.\n  -o, --today             Fetch work done today.\n  --on TEXT               Fetch work done on a particular date/day.\n  --at TEXT               Fetch work done at a particular time on a particular\n                          date/day.\n  --delete                Delete fetched work.\n  -g, --no-page           Don't page the output.\n  -l, --text-only         Output the work log text only.\n  --date-format TEXT      Sets the date format of the output. Must be a valid\n                          Python strftime string.\n  --time-format TEXT      Sets the time format of the output. Must be a valid\n                          Python strftime string.\n  --datetime-format TEXT  Sets the datetime format of the output. Must be a\n                          valid Python strftime string.\n  --time-zone TEXT        Sets the timezone of the output. Must be a valid\n                          timezone string.\n  --help                  Show this message and exit.\n```\n\u003c!-- [[[end]]] --\u003e\n\nLimitations\n-----------\n\n- Your input is limited by your shell. Certain characters like the single\n  quote `'` behave differently. Put your content within double quotes\n  to get around special characters.\n\n  For example:\n\n  ``` {.bash}\n  workedon \"repairing my wife's phone\"\n  ```\n\n- The [date parser](https://github.com/scrapinghub/dateparser) which is\n  used may misinterpret some irregular phrases of date/time, but mostly\n  does great.\n\n- There are some reserved keywords that are used as subcommands and\n  cannot be used as the first word of your log's content:\n  - `workedon`\n  - `what`\n\n  You can use double quotes here as well to get around this.\n\n  For example, this will not work:\n\n  ``` {.bash}\n  workedon what my wife asked me to do @ 3pm 3 days ago\n  ```\n\n  This is fine:\n\n  ``` {.bash}\n  workedon \"what my wife asked me to do\" @ 3pm 3 days ago\n  ```\n\nCredits\n-------\n\n- [dateparser](https://github.com/scrapinghub/dateparser), for an\n    amazing date parser. This project would not be possible without it.\n- [peewee](https://github.com/coleifer/peewee), for a nice and\n   tiny ORM to interact with SQLite.\n- [Click](https://click.palletsprojects.com), for making writing CLI\n    tools a complete pleasure.\n- [jrnl](https://github.com/jrnl-org/jrnl),\n    [fck](https://github.com/nvbn/thefuck) and\n    [Simon Willison](https://github.com/simonw/sqlite-utils/) for some\n    inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviseshrp%2Fworkedon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviseshrp%2Fworkedon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviseshrp%2Fworkedon/lists"}