Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,15 @@ Ouput is provided either to a file using the -o flag or to stdout.
By default, all output is the raw CSV format provided by the API. Some types support a json output that can be enabled via the -f flag.

`-f, --format string The output format. (raw | json) (Only available on the servings type.) (default "raw")`

## Uploading to Google Drive

1. Download `gdrive` from https://github.com/prasmussen/gdrive/releases.
1. Make sure the `gdrive` and `cronometer-export` binaries are in the same directory as the `to-gdrive.bash` script.
1. Fill in your information in `to-gdrive.bash`.
1. Execute `to-gdrive.bash` once to test, and to provide the `gdrive` with
permissions to your Google Drive.
1. Use `echo "0 20 * * * ~/to-gdrive"| crontab -` to have the script run every
day.
**This overwrites your crontab.** Use `(crontab -l ; echo ""0 20 * * *
~/to-gdrive")| crontab -` to append instead
4 changes: 4 additions & 0 deletions to-gdrive.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

./cronometer-export -u <USERNAME> -p <PASSWORD> -e -0d -s -100m > cronometer.csv
./gdrive upload -p <FOLDER-ID> cronometer.csv