Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvladislav/vm-clockify
lazy:: only done because of logging time in clockify and too lazy to manually copy and paste them into youtrack
https://github.com/mvladislav/vm-clockify
clockify python3 youtrack-api
Last synced: about 2 months ago
JSON representation
lazy:: only done because of logging time in clockify and too lazy to manually copy and paste them into youtrack
- Host: GitHub
- URL: https://github.com/mvladislav/vm-clockify
- Owner: MVladislav
- License: mit
- Created: 2021-11-05T18:23:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-06T15:49:59.000Z (4 months ago)
- Last Synced: 2024-09-06T18:53:21.040Z (4 months ago)
- Topics: clockify, python3, youtrack-api
- Language: Python
- Homepage:
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Python CLI Clockify API
```sh
MVladislav
```[![Python DEV CI](https://github.com/MVladislav/vm-clockify/actions/workflows/python-dev.yml/badge.svg)](https://github.com/MVladislav/vm-clockify/actions/workflows/python-dev.yml)
[![Create Release](https://github.com/MVladislav/vm-clockify/actions/workflows/python-release.yml/badge.svg)](https://github.com/MVladislav/vm-clockify/actions/workflows/python-release.yml)---
- [Python CLI Clockify API](#python-cli-clockify-api)
- [information](#information)
- [example usage](#example-usage)
- [clockify task-name and project-name usage](#clockify-task-name-and-project-name-usage)
- [config](#config)
- [install](#install)---
project to use api from [clockify](https://clockify.me/developers-api) to collect work-time
in a combined way by `[day, project, task]`
## information
### example usage
get 2-days of work from clockify with start day `2023-02-07`
- `-d 1` => will return 2 days, the requested day + the day before
- `-p 1000` => allow to include 1000 entries from clockify over 2 days
- `-sp '2023-02-07'` => the start day to collect work from```sh
$vm-clockify clockify times -d 1 -p 1000 -sp '2023-02-07'
```upload the gathered work from command above into youtrack
```sh
$vm-clockify youtrack upload
```### clockify task-name and project-name usage
this script will parse the **task**-name and **project**-name usage and search for brackets like ` []`
where you can write **issue-id** in it, for example:> only the last bracket in a description will be checked
- `i` => issue-id
- `t` => issue-type-name```txt
some description task [i=ISSUE-666]
```or
```txt
some description task [i=ISSUE-666&t=Training]
```This **issue-id** can than be used to import the time into services like youtrack, and **issue-type-name** to mark the issue in youtrack with an type.
### config
setup `.env` file with following possible params:
```env
# optional
LOGGING_LEVEL=DEBUG
LOGGING_VERBOSE=3# need to be correct set, to work with youtrack correct
TIME_ZONE=Europe/Berlin# optional
WORK_TIME_DEFAULT_ISSUE=
WORK_TIME_DEFAULT_COMMENT=# -> if get worktime from clockify is used
# https://clockify.me/user/settings
CLOCKIFY_API_KEY=
# get by use command 'api user'
CLOCKIFY_API_WORKSPACE_ID=
CLOCKIFY_API_USER_ID=# -> if upload to youtrack is used
# https://www.jetbrains.com/help/youtrack/devportal/Manage-Permanent-Token.html#obtain-permanent-token
YOUTRACK_API_KEY=
YOUTRACK_API_ENDPOINT=# -> if upload to landwehr is used
LANDWEHR_API_URL=
LANDWEHR_API_ENDPOINT=/index.php
LANDWEHR_COMPANY=
LANDWEHR_MAND_NR=
LANDWEHR_USERNAME=
LANDWEHR_PASSWORD=
```## install
```sh
$python3 -m pip install .
```or
```sh
$python3 -m pip install virtualenv --break-system-packages
$python3 -m venv venv
$source ./venv/bin/activate
$python3 -m pip install -v --editable .
```