Report working time from the command line.
Project description
timereporter
Report working time from the command line.
Requirements
Python 3.6+, Windows/Linux/Mac.
Installation
Clone the repo and run python setup.py install in the root folder.
Yaml file path
The default path of the timereporter.yaml file that stores the calendar data
is %USERPROFILE%\Dropbox\timereporter.yaml. To change this, set the
TIMEREPORTER_FILE environment variable to the new path, e.g.
setx TIMEREPORTER_FILE "C:\mypath\timereporter.yaml"
Alias
It is recommended to set an alias for python -m timereporter, e.g. in .bashrc:
alias t='python -m timereporter'
The usage documentation below assumes that the above alias is set.
Customization
After running once, the timereporter.yaml file will be created. In this file, the following options can be set:
Default project name
To set another name for the default project, change the default_project_name variable. The default value is EPG Program.
Target hours per day
To set the target hours per day, edit the target_hours_per_day variable. The
default value is 27900 seconds.
Usage
Report time on default project
t [<day> | [last | next] <weekday>] [came <time>] [left <time>] [lunch
<time>]
<time> must be in one of the following formats: 9, 9:00, 0900...
Additionally, lunch times can also be in one of the following formats: 45m, 45 min, ...
<day> must be one or more of
yesterday,monday,Tuesday, ..., or- an ISO 8601 date, e.g.
2017-04-01.
If <day> is not set, today's date will be used.
<weekday> must be one or more of monday, Tuesday, ...,
Create a new project
t project new [--no-work] <project-name>
If <project-name> is multiple words, enclose them in quotation marks, e.g.
"My new project".
Time reported on projects tagged with --no-work reduces the required
working time for that day. This can be used e.g. for part-time parental leave.
Report time on a project
t project (<project-name> | <project-number>) [<day>] <time>
There is no need to spell out the entire <project-name>, a part of it is
enough. imp for My important project, for example.
See also Report time on default project.
Show reported time
t show [last | next] week [html] [--show-weekend]
t show <month> [html] [--show-weekend]
t
html shows the specified week in a browser windows instead of in the console.
By default, Saturday and Sunday are not shown, but this can be changed by adding --show-weekend.
<month> must be one of january, february, ...
t is an alias for t show week.
Show flex time
t show flex [--from=<date>] [--to=<date>]
Undo/redo
t (undo | redo)
Show help text
t (help | --help | -h)
Examples
t last friday came 9 left 17 lunch 45m
Reports a working time from 09:00 to 17:00 last Friday.
t yesterday left 17:15
Changes yesterday's leave time to 17:15.
t project new --no-work My new project
Creates a new non-working project called My new project.
t project My new project 2017-09-23 04:00
Reports four hours worked on My new project the 23rd of September.
t show last week html
Shows Monday-Friday of last week in the browser.
t show october --show-weekend
Shows all days of October in the console.
Running tests
pytest test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timereporter-0.1.2.tar.gz.
File metadata
- Download URL: timereporter-0.1.2.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f283a6df78609f1971cb1549d13fea65482e6f379961ef71a5cdf414cfa5ad7
|
|
| MD5 |
855b3d1b3a4700e193ca442b031d0aa8
|
|
| BLAKE2b-256 |
fbd6a4e3f2bf0ae99361f5ae175b4899147284e78c7cbbe5df1c59b2b0bafeb7
|
File details
Details for the file timereporter-0.1.2-py3-none-any.whl.
File metadata
- Download URL: timereporter-0.1.2-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7d2e00f562d73cfd58ae1d6e7dd0a15c823d9e514e1241bae9c9b65a0336cd6
|
|
| MD5 |
cfcb50758da6dabd4a2c35d4234f79eb
|
|
| BLAKE2b-256 |
74deaae0c7bcd17f83a1ba639a3afdc0861165107f078cdb59bdddad4f9f6248
|