Script for scheduling break across all goals?

GitHub - matkoniecz/beeminder_break has repo with the first usable version. For now it only lists goals that need to be modified.

Now the next step, an automatic road editing.

Beeminder API Reference has

road (array): Array of tuples that can be used to construct the Yellow Brick Road. This field is also known as the road matrix. Each tuple specifies 2 out of 3 of [time, goal, rate]. To construct the road, start with a known starting point (time, value) and then each row of the road matrix specifies 2 out of 3 of {t,v,r} which gives the segment ending at time t. You can walk forward filling in the missing 1-out-of-3 from the (time, value) in the previous row.

“Yellow Brick Road” is unclear to me, I assume for now that it is a line that divides “derail” and “no derail” graph areas. Not sure about the input format, but Arbitrary break scheduling script should be helpful here.

I think that I will assume for now that time and rate is used, set rate to 0 at start of the break and restore value later.

Things to get:

  • get current goal rate
  • detect planned date changes between now and break start, if any - get last goal rate before break
  • detect planned date changes between break start and break end, crash loudly in case of detecting them (ends inclusive, to avoid scheduling break multiple times - not sure what would happen)

And based on that output planned break schedule. For now without any API calls modifying goals.

Maybe I will write also code making some trivial edit to a goal.

1 Like