Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Beeminder writing check
#!/usr/bin/env python
import envoy
import requests
import time
r ="find /Users/mike/Dropbox/writing | grep -v DS_Store | xargs wc -c")
count = r.std_out.split()[-2]
kb_written = int(count) // 1024
url = ""
r =,
{'auth_token': BEEMINDER_TOKEN
,'timestamp': time.time()
,'value': kb_written
with open('/Users/mike/.logs/writing_outputs', 'a') as f:
f.write('kb written: ')
f.write('excess bytes: ')
f.write(str(int(count) % 1024))

This comment has been minimized.

Copy link
Owner Author

commented Oct 27, 2012

Little script I keep in cron to track the size of my writing folder in my dropbox. I write to text files (from any computer connected to my dropbox) and it tells me if I'm not writing enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.