I want to beemind not using my computer late at night, say after 10 p.m. Do-Zero Goals Considered Harmful advises making a Do-More goal with a rate of one per day. How can I automatically supply the data to Beeminder for this?
Here is one idea. Make the deadline for the goal 5 a.m. and create a startup script that (1) schedules shutdown at 10 p.m. and (2) tells Beeminder I have failed if the time is between 10 p.m. and 4 a.m. That way my computer will automatically switch off at 10 p.m. and will alert Beeminder if I switch it back on before the next day.
Is there a better way to automate this goal? If not what would a script to tell Beeminder I have failed for that day look like?
5 Likes
What you suggest sounds perfect.
1 Like
I agree, what you suggest sounds great. For sending data points to beeminder via a script, I use GitHub - lydgate/bmndr: Simple python CLI for beeminder.com which hasn’t been updated in a long time but still works perfectly for me. (Since you mention writing a script, I am assuming that you will know what to do with the above link, but if that assumption is unwarranted, I or others would be very willing to help answer questions or walk you through getting it set up.) I think there are a few other such tools floating around, maybe someone else will chime in if they have another suggestion.
6 Likes
I use pyminder! Definitely recommended if you are comfortable with python.
4 Likes
Thank you for your suggestions. I think bmndr
and pyminder
would be overkill; instead, I am using the following script.
#!/usr/bin/env python3
"""If the time is after the curfew derail the Beeminder goal therefor."""
import datetime
import requests
now = datetime.datetime.now()
if 19 <= now.hour or now.hour < 3:
requests.post(
"https://www.beeminder.com/api/v1/users/me/goals/curfew/datapoints.json",
{"auth_token": "<redacted>", "value": -1},
)
I hope this is the last time I comment at this hour (after 9 p.m. where I am)!
8 Likes