Year in review graph option


Inspired by @chelsea 's blog post (, I would like to do a review of my year as many of my goals have been running for longer than that.
Still, that means changing settings to 15-20 goals and then changing them back.

Would be nice if something could be hacked in in the next few days :slight_smile:


Your wish is my challenge… :slight_smile:


# from

for GOAL in $( curl$USER.json?auth_token=$AUTH_TOKEN | sed -e 's/[^[]*//; s/^.//; s/].*//; s/[",]/ /g' )
  echo $GOAL
  curl -X PUT -d '{"tmin":"2016-01-01"}'$USER/goals/$GOAL.json?auth_token=$AUTH_TOKEN --header "Content-Type: application/json" > /dev/null

Using the undocumented tmin field in the API.


Thank you, will try it out!!

This seems like something I can use instead of my requested featured for a relative X-min value


This sounds so awesome, but I have no idea how to use it. Can you give me a place to start? Like what is this written in and what do I do with it to make it run?


Hey there tall girl. That’s a hard question to answer without knowing what you know, so what follows is going to be a really lousy answer. Apologies in advance. Hope it gives you a place to start, and maybe sparks a whole new learning quest for 2017.

That’s a unix shell script, a little program that I wrote on my Mac using a text editor (vim) in the Terminal app. If that sentence is mostly gibberish, there’s a learning curve ahead.

If you’re on a Mac, the simplest way to run it is probably to copy it into a plain text file in your home folder, replace the your_token and your_username bits, and then, in Terminal, type sh my_text_file.txt and press return.

If you’re not on a Mac, then that’s probably not very helpful, sorry. But you’re an old hand at setting up Beeminder goals, so if learning to program using the command line is important, you know what to do… :slight_smile:

Of course, running random bits of code from the internet without understanding what it’s going to do can be super dangerous. This script asks Beeminder for a list of all of your goal names, then for each one, asks Beeminder to change the graph’s start date. But you shouldn’t take my word for that.


Ah, yes. The embarrassing email addresses we chose at the age of 12.

Those words make sense to me, and I think I could totally follow your further instructions, if I only had a Mac.

I’ll see if I can get a virtual machine version of Linux running on my Windows computer and go from there. Thanks for the help!


So glad to hear that it was at least vaguely helpful. I never know how much egg-sucking to include without inadvertently crossing into patronising.

There must be better ways on Windows to use our API. I just don’t know what they are. But someone here probably does.

15+ years ago, I would have suggested trying ‘cygwin’, which provided a unix shell-like layer overtop of w2k. There might be a modern equivalent, something that makes it easy to use the same script (even though it’s a quick and dirty hack). But a VM will do the trick if it’s easy.

PS: one of my brothers still has an elvish email address that dates from when he was around the same age…


You were remarkably helpful, given that my question was extremely vague and I gave little to no indication of my prior experience. Thanks for being patient with me.


Script worked like a charm! :slight_smile: