Pixela is kind of a tracking your activities. This post is noted how I manage token, graphs and webhooks such as a reference.
Pixela | Record and Track your habits or effort. All by API.
Where you want to put it on.
$ cat ~/.config/pixela/config.json
{
"username": "[YOUR-USERNAME]",
"token": "[YOUR-PIXELA-TOKEN]"
}
I also save the username and token into iCloud Keychain.
You need to install jq
for parsing ~/.config/pixela/config.json.
gof
is kind of an interactive filtering tool. If you don't want to install it, gof
exec shall be replaced with things what you want to run.
Sorry for the inconvenience regarding the preparation. This document is for me, however.
You need to build send data to request.
$ curl -X POST <https://pixe.la/v1/users/$>(cat ~/.config/pixela/config.json | jq -r ".username")/graphs \\
-H "X-USER-TOKEN: $(cat ~/.config/pixela/config.json | jq -r ".token")" \\
-d '{"id":"test-graph","name":"graph-name","unit":"commit","type":"int","color":"shibafu","timezone":"Asia/Tokyo"}'