https://github.com/marvincaspar/clockify2cats
CLI for exporting clockify data and generate a SAP CATS report as csv
https://github.com/marvincaspar/clockify2cats
cats clockify sap
Last synced: 12 months ago
JSON representation
CLI for exporting clockify data and generate a SAP CATS report as csv
- Host: GitHub
- URL: https://github.com/marvincaspar/clockify2cats
- Owner: marvincaspar
- License: apache-2.0
- Created: 2022-01-13T06:32:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T14:03:43.000Z (over 1 year ago)
- Last Synced: 2025-03-28T04:28:36.657Z (about 1 year ago)
- Topics: cats, clockify, sap
- Language: Go
- Homepage:
- Size: 7.77 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/marvincaspar/clockify-cats-reporter/actions/workflows/ci.yml)
[](https://coveralls.io/github/marvincaspar/clockify2cats?branch=main)
[](https://goreportcard.com/report/github.com/marvincaspar/clockify2cats)
# Clockify2Cats
`clockify2cats` is a tool which exports your time from clockify and prints a report into a format that you can capy and paste into SAP CATS (Cross-Application Time Sheet).

## Installation
Download the latest binary for your system from the [GitHub release page](https://github.com/marvincaspar/clockify-cats-reporter/releases/latest/).
```sh
curl -o clockify2cats.tar.gz -L https://github.com/marvincaspar/clockify-cats-reporter/releases/latest/download/clockify2cats_$(uname -s)_$(uname -m).tar.gz
tar -xvzf clockify2cats.tar.gz
sudo mv clockify2cats /usr/local/bin
rm clockify2cats.tar.gz
```
## Usage
First you need to set up your local configuration. Run `clockify2cats init --workspace --user --api-key --description-delimiter "#"`. The configuration is stored in `~/.clockify2cats.yaml`.
Then you can use `clockify2cats` to generate a report. Run `clockify2cats generate [flags]`.
Flags:
```
--category string Category identifyer (default "ID")
-C, --copy Copy report to clipboard
-c, --current Current week
-h, --help help for generate
-l, --last Last week
-t, --text Print with text
-w, --week int Week number
```
Example:
```
$ clockify2cats generate --current
CATSID-1 ID 8.06 4.68 1.26 2.34 7.62 0.00 0.00
CATSID-2 ID 0.00 0.47 6.02 5.13 0.73 0.00 0.00
CATSID-3 ID 0.00 2.93 0.00 0.53 0.00 0.00 0.00
```
This report is build for the CATS columns:
- Rec. order
- Description - empty
- Text - use flag `-t` to use it
- Text 2 - use flag `-t` to use it
- Text External - use flag `-t` to use it
- Category - default `ID`, can be set with flag `--category `
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Sunday
## Clockify setup
Create projects and name it like ` ()`. Track your time for the projects. Use the clockify description field to add additional information for the CATS text fields. You can also use a
shared
project to split time between multiple CATS projects. The project name should be ` (,,...)`. The clockify description is used for the CATS text fields and is split by a
defined
delimiter, default is `#`. The rules for the split are:
- no delimiter found: the whole description is used for the CATS text 2 field
- one delimiter found: the description before the delimiter is used for the CATS text field, the description after the delimiter is used for the CATS text 2 field
- two delimiters found: the description before the first delimiter is used for the CATS text field, the description between the first and the second delimiter is used for the CATS text 2 field, the description
after the second delimiter is used for the CATS text external field
This is only relevant if you use the `-t` or `--text` flag.
Generate an API for clockify. It can be found in your profile settings.
Fetch your user id and your default workspace id from the api `curl -H 'X-Api-Key: ' https://api.clockify.me/api/v1/user | jq ". | {id, defaultWorkspace}"`.
## Release
```sh
brew install goreleaser
goreleaser init
```
Update the version in `version.txt` and run `make release`.
This will create a new git tag, build all binaries and publish it to GitHub.