Purpose of this project is to have a command line utility to communicate with Targetprocess API.
There is no install script prepared yet.
Compile and create application:
./gradlew clean build installDist
Link the launcher to a place in your PATH:
ln -s tp/build/install/tp/bin/tp ~/.local/bin/tp
Create file ~/.config/tp/tp.yaml
Minimal content:
targetprocess:
api:
url: https://<< company >>.tpondemand.com/api
username: << targetprocess username >>
token: << your token here >>
Presets for tp time add
:
time:
presets:
<< preset name >>:
task: << task id >>
spent: 8
remain: 0
...
Log time against a task:
tp time add \
--task <task id> --date <date> --spent <hours> --remain <hours>
Log time using a preset: (missing parameters are taken from configured preset. See above)
tp time add \
--preset my-dev-work --date <date>
Accepted date formats:
YYYY-MM-DD
or anything parseable byLocalDate.parse()
- aliases: (single for now)
today
- means today
- single number - means day of current month
- range of dates
2021-12-10..23
- 10th to 23rd of December 202110..23
- 10th to 23rd of current month