zeit/README.md

197 lines
4.3 KiB
Markdown
Raw Normal View History

2020-10-14 23:50:05 +00:00
zeit
----
2020-10-16 00:33:21 +00:00
```
███████╗███████╗██╗████████╗
╚══███╔╝██╔════╝██║╚══██╔══╝
███╔╝ █████╗ ██║ ██║
███╔╝ ██╔══╝ ██║ ██║
███████╗███████╗██║ ██║
╚══════╝╚══════╝╚═╝ ╚═╝
```
2020-10-14 23:50:05 +00:00
Zeit erfassen. A command line tool for tracking time spent on tasks & projects.
2020-10-16 00:55:36 +00:00
![zeit](documentation/header.jpg)
2020-10-17 13:02:56 +00:00
2020-10-14 23:50:05 +00:00
## Build
2020-10-16 00:04:42 +00:00
```sh
2020-10-14 23:50:05 +00:00
make
```
2020-10-17 13:02:56 +00:00
**Info**: This will build using the version 0.0.0. You can prefix the `make`
command with `VERSION=x.y.z` and set `x`, `y` and `z` accordingly if you want
the version in `zeit --help` to be a different one.
2020-10-14 23:50:05 +00:00
## Usage
2020-10-16 00:30:08 +00:00
Please make sure to `export ZEIT_DB=~/.config/zeit.db` (or whatever location
you would like to have the zeit database at).
2020-10-14 23:51:12 +00:00
2020-10-17 13:02:56 +00:00
*zeit*'s data structure contains of the following key entities: `project`,
`task` and `entry`. An `entry` consists of a `project` and a `task`. These
don't have to pre-exist and can be created on-the-fly inside a new `entry` using
e.g. `zeit track --project "New Project" --task "New Task"`. In order to
configure them, the `zeit project` and the `zeit task` commands can be utilised.
### Projects
A project can be configured using `zeit project`:
```sh
zeit project --help
```
#### Examples:
Set the project color to a hex color code, allowing `zeit stats` to display
information in that color (if your terminal supports colours):
```sh
zeit project --color '#d3d3d3' "cool project"
```
### Task
A task can be configured using `zeit task`:
```sh
zeit task --help
```
#### Examples:
Setting up a Git repository to have commit messages automatically imported
into the activity notes when an activity is finished:
```sh
zeit task --git ~/my/git/repository "development"
```
**Info:** You will have to have the `git` binary available in your `PATH` for
this to work. *zeit* automatically limits the commit log to the exact time of
the activity's beginning- and finish-time. Commit messages before or after these
times won't be imported.
2020-10-15 21:46:57 +00:00
### Track activity
2020-10-14 23:50:05 +00:00
2020-10-16 00:04:42 +00:00
```sh
2020-10-14 23:50:05 +00:00
zeit track --help
```
2020-10-17 13:02:56 +00:00
#### Examples:
Begin tracking a new activity and reset the start time to 15 minutes ago:
2020-10-14 23:50:05 +00:00
2020-10-16 00:04:42 +00:00
```sh
2020-10-14 23:50:05 +00:00
zeit track --project project --task task --begin -0:15
```
2020-10-17 13:02:56 +00:00
2020-10-15 21:46:57 +00:00
### Show current activity
2020-10-15 20:56:13 +00:00
2020-10-16 00:04:42 +00:00
```sh
2020-10-15 20:56:13 +00:00
zeit tracking
```
2020-10-17 13:02:56 +00:00
2020-10-15 21:46:57 +00:00
### Finish tracking activity
2020-10-14 23:50:05 +00:00
2020-10-16 00:04:42 +00:00
```sh
2020-10-14 23:50:05 +00:00
zeit finish --help
```
2020-10-17 13:02:56 +00:00
#### Examples:
Finish tracking the currently tracked activity without adding any further info:
2020-10-14 23:50:05 +00:00
2020-10-16 00:04:42 +00:00
```sh
2020-10-14 23:50:05 +00:00
zeit finish
```
2020-10-17 13:02:56 +00:00
Finish tracking the currently tracked activity and change its task:
```sh
zeit finish --task other-task
```
Finish tracking the currently tracked activity and adjust its start time to
4 PM:
```sh
zeit finish --begin 16:00
```
2020-10-15 21:46:57 +00:00
### List tracked activity
2020-10-16 00:04:42 +00:00
```sh
2020-10-15 21:46:57 +00:00
zeit list
```
2020-10-16 00:04:42 +00:00
2020-10-17 13:02:56 +00:00
2020-10-16 00:21:51 +00:00
### Erase tracked activity
```sh
zeit erase --help
```
2020-10-17 13:02:56 +00:00
#### Examples:
Erase a tracked activity by its internal ID:
2020-10-16 00:21:51 +00:00
```sh
zeit erase 14037730-5c2d-44ff-b70e-81f1dcd4eb5f
```
2020-10-17 13:02:56 +00:00
### Display statistics
![zeit stats](documentation/zeit_stats.png)
```sh
zeit stats
```
2020-10-16 00:04:42 +00:00
### Import tracked activities
```sh
zeit import --help
```
2020-10-17 13:02:56 +00:00
The following formats are supported as of right now:
2020-10-16 00:30:08 +00:00
#### Tyme 3 JSON
It's possible to import JSON exports from [Tyme 3](https://www.tyme-app.com).
It is important that the JSON is exported with the following options set/unset:
![Tyme 3 JSON export](documentation/tyme3json.png)
- `Start`/`End` can be set as required
- `Format` has to be `JSON`
- `Export only unbilled entries` can be set as required
- `Mark exported entries as billed` can be set as required
- `Include non-billable tasks` can be set as required
- `Filter Projects & Tasks` can be set as required
- `Combine times by day & task` **must** be unchecked
During import, *zeit* will create SHA1 sums for every Tyme 3 entry, which
allows it to identify every imported activity. This way *zeit* won't import the
exact same entry twice. Keep this in mind if you change entries in Tyme and
then import them again into *zeit*.
2020-10-17 13:02:56 +00:00
#### Examples:
Import a Tyme 3 JSON export:
2020-10-16 00:04:42 +00:00
```sh
zeit import --tyme ./tyme.export.json
```