Adding Beeminder datapoints from the Timesheet Android app's XML backups stored in a Dropbox folder.
- Docker installed and running.
- Create a new "Do Less" goal with a maximum of 40 hours or so per weekat https://www.beeminder.com/new and call it "work".
- Get your auth token by visiting (need to be logged in): https://www.beeminder.com/api/v1/auth_token.json
- Go to: https://www.dropbox.com/developers/apps/create
- Choose "Dropbox API"
- Choose "Full Dropbox"
- Name your app, for example: "timesheet-beeminder-sync"
- Agree to conditions and click "Create app"
- Generate an access token as explained in this Dropbox blog post.
- Use the token to populate
.env
-
Copy the
.env.template
file to.env
and fill in the variables.make dev
The dev
target creates a Docker image and runs it in dev mode, meaning the source directory is mounted inside the container. So, any changes will be reflected - just run make run-dev
afterwards, no need to build the image again.
Create a heroku account, then:
heroku login
heroku create
heroku config:set DROPBOX_ACCESS_TOKEN=
heroku config:set DROPBOX_FOLDER=/timesheet/backup
heroku config:set BM_USERNAME=username
heroku config:set BM_AUTH_TOKEN=auth-token
heroku config:set BM_GOAL=work
Deploy the app:
git push heroku master
Look at the logs:
heroku logs --tail
Then, open the scheduler add-on:
heroku addons:open scheduler
And create a new job with the command: python src/main.py
and a frequency of hourly
.