Beeminder Forum

InsightTimer.com - API python script (meditation tracking)


#25

I have started to get a new error that I think spawns from me moving from China back to the US. When I run the script I see this in cmd:

Any ideas?


#26

Does your config.ini look like this? Based on the error, it looks like your missing the “utc_timezone” parameter that was added to the script.

[insight]
username=username
password=p@ssword
# This should be your UTC offset. I'm in the pacific U.S. timezone, so that's -8.
utc_timezone=-8 

[beeminder]
username=username
auth_token=123abc123abc
goal_name=some_goal
```

#27

That did it.

Thank you very much.


#29

I started trying to use this today and found that it broke when trying to call the function csv_to_todays_minutes, because it was expecting the duration entries in the csv to just be integers representing minutes, when the csv I get from Insight timer uses the format hh:mm:ss.

I have fixed this in my fork of this code, which can be found at https://github.com/benkloester/beesight

I can think of a couple of other useful additions to this code, if anyone else out ther is using it I’d be more motivated to make them:

  • better timezone support (eg dealing with daylight savings)
  • rather than just scanning the last 4 log entries and adding the minutes from today, you could actually do full-blown sync of the insight timer entries to beeminder. That is, keep track of whatever the last log entry submitted was, and submit one beeminder datapoint for each new entry since that, with the timestamps set to match.

#30

Ah, nice work. I could definitely use this. I would love it to do real syncing, but I bet this will work good enough for me.

You know what would be mediumly-slick? Is if this was rejiggered to work with Beeminder’s autofetch API. I have a few examples using Python on Glitch, like my Marvin integration: glitch.com/edit/#!/beemind-marvin3 . I haven’t yet made one that supports multiple users, but each user could always “remix it”.

(Have you used Glitch before? For things like this, it’s one of my favorite ways to get something running online.)

Let me know what you think.


#31

I accidentally did this. https://github.com/adamwolf/beesight


#32

Nice work!

I also made a Java version that is slicker (handles duplicates very well) if you check my other repos.


#33

Haha, now I’m gonna have to go and look at what Glitch is.