# timecount
Work time tracking for hackers.
## Requirements
Python `>= 3.8`
## Install
Install the `timecount` python package via pip from pypi.org:
```
pip install --user timecount
```
## Getting Started
Simply create an executable file `~/timelog` (it doesn't matter where you put it) with the following example content:
```python
#!/usr/bin/env python3
from timecount import process
from timecount.tctypes import (
EmploymentContract,
Balance,
Day,
HoliDay,
SickDay,
VacationDay,
)
# fmt: off
entries = [
EmploymentContract(begin="01-04-2020", hours_per_week=30, vacation_days_per_year=23),
Balance(remove_vacation_days=7, note="Contract starts with April, thus remove 3 Month."),
Balance(reduce_week_target_by_days=2, note="You need to balance for two work days here, because you start in the middle of the week."),
Day("01-04-2020", (12.30, 20.00), (20.30, 01.15), "Configure Workstation"),
Day("02-04-2020", (14.30, 00.30), "Configure Workstation"),
Day("03-04-2020", (10.30, 15.00), "Configure Workstation"),
Day("06-04-2020", (10.00, 14.30), (17.00, 22.15) , "Pair Programming Daniel."),
Day("07-04-2020", (10.30, 14.30), (15.30, 21.45) , "Pair Programming Daniel."),
SickDay("08-04-2020", "Covid19")
Day("09-04-2020", (11.00, 15.00), (19.30, 22.00) , "Meeting; Try test automation."),
HoliDay("10-04-2020", (12.00, 13.00), "Karfreitag; Tooling"), # I worked on this holiday..
Day("11-04-2020", (11.00, 14.00), (21.15, 00.00), "Tooling, Testing."),
Day("12-04-2020", (11.15, 13.15), "Configure Workstation; Tooling;"),
HoliDay("13-04-2020", (11.00, 16.00), "Ostermontag; Slack Channel Catchup; System Setup; Tooling"),
Day("14-04-2020", (11.00, 14.00), (15.30, 18.30), "Tooling; SlackMeetings;"),
# Continue with your logs ...
]
process(entries)
```
Now run `~/timelog` in your terminal to see the results.
For convenience I suggest creating a symlink for the `timelog` file in your `~/bin` directory, so you can call `timelog` from anywhere in your terminal:
```bash
ln -s ~/timelog ~/bin/timelog
```
## Entry Types
For a list of EntryTypes and their arguments, see `tctypes.py`.
## Examples
Look in `./tests` for a more complete example.
Raw data
{
"_id": null,
"home_page": "https://github.com/feluxe/timecount",
"name": "timecount",
"maintainer": "Felix Meyer-Wolters",
"docs_url": null,
"requires_python": "",
"maintainer_email": "felix@meyerwolters.de",
"keywords": "time,count",
"author": "Felix Meyer-Wolters",
"author_email": "felix@meyerwolters.de",
"download_url": "https://github.com/feluxe/timecount/tarball/0.2.1",
"platform": "",
"description": "# timecount\n\nWork time tracking for hackers.\n\n## Requirements\n\nPython `>= 3.8`\n\n## Install\n\nInstall the `timecount` python package via pip from pypi.org:\n\n```\npip install --user timecount\n```\n\n## Getting Started\n\nSimply create an executable file `~/timelog` (it doesn't matter where you put it) with the following example content:\n\n```python\n#!/usr/bin/env python3\nfrom timecount import process\nfrom timecount.tctypes import (\n EmploymentContract,\n Balance,\n Day,\n HoliDay,\n SickDay,\n VacationDay,\n)\n\n# fmt: off\nentries = [\n\n EmploymentContract(begin=\"01-04-2020\", hours_per_week=30, vacation_days_per_year=23),\n Balance(remove_vacation_days=7, note=\"Contract starts with April, thus remove 3 Month.\"),\n Balance(reduce_week_target_by_days=2, note=\"You need to balance for two work days here, because you start in the middle of the week.\"),\n\n Day(\"01-04-2020\", (12.30, 20.00), (20.30, 01.15), \"Configure Workstation\"),\n Day(\"02-04-2020\", (14.30, 00.30), \"Configure Workstation\"),\n Day(\"03-04-2020\", (10.30, 15.00), \"Configure Workstation\"),\n Day(\"06-04-2020\", (10.00, 14.30), (17.00, 22.15) , \"Pair Programming Daniel.\"),\n\n Day(\"07-04-2020\", (10.30, 14.30), (15.30, 21.45) , \"Pair Programming Daniel.\"),\n SickDay(\"08-04-2020\", \"Covid19\")\n Day(\"09-04-2020\", (11.00, 15.00), (19.30, 22.00) , \"Meeting; Try test automation.\"),\n\n HoliDay(\"10-04-2020\", (12.00, 13.00), \"Karfreitag; Tooling\"), # I worked on this holiday..\n Day(\"11-04-2020\", (11.00, 14.00), (21.15, 00.00), \"Tooling, Testing.\"),\n Day(\"12-04-2020\", (11.15, 13.15), \"Configure Workstation; Tooling;\"),\n\n HoliDay(\"13-04-2020\", (11.00, 16.00), \"Ostermontag; Slack Channel Catchup; System Setup; Tooling\"),\n Day(\"14-04-2020\", (11.00, 14.00), (15.30, 18.30), \"Tooling; SlackMeetings;\"),\n\n # Continue with your logs ...\n]\n\nprocess(entries)\n```\n\nNow run `~/timelog` in your terminal to see the results.\n\nFor convenience I suggest creating a symlink for the `timelog` file in your `~/bin` directory, so you can call `timelog` from anywhere in your terminal:\n\n```bash\nln -s ~/timelog ~/bin/timelog\n```\n\n## Entry Types\n\nFor a list of EntryTypes and their arguments, see `tctypes.py`.\n\n## Examples\n\nLook in `./tests` for a more complete example.\n\n\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "",
"version": "0.2.1",
"split_keywords": [
"time",
"count"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "df29edc9533aae03dd1044e29d869db6",
"sha256": "2fb09527223d88ca97aeb57d616f5d12dcdaad9d343e00f0efa12e325614eb78"
},
"downloads": -1,
"filename": "timecount-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "df29edc9533aae03dd1044e29d869db6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6846,
"upload_time": "2020-11-25T19:08:19",
"upload_time_iso_8601": "2020-11-25T19:08:19.672693Z",
"url": "https://files.pythonhosted.org/packages/4c/fd/ff50ab7e81523a616e0776c12b09448b16d28831f06952bb4140be580b63/timecount-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-11-25 19:08:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": null,
"github_project": "feluxe",
"error": "Could not fetch GitHub repository",
"lcname": "timecount"
}