Send personal feeds to Day One
This is my first Pythonista script but it is quite possible that I will do some more [Day One] automation in the future.
Of course, there are [slogger] and [sifttter], which are great but it's much more convenient for me to do these logging tasks from my iPhone.
This script takes your [letterboxd.com] RSS feed which contains personal reviews/ logs from the site, asks which item (→ movie) to use, parses that item and sends it to Day One.
Before using it, you have to fill in your username.
The script also allows for customisation of the text that is added to the end of the entry.
I also tried to do a version of the script that automatically uses items from the last 24 hours but I couldn't figure out the datetime stuff. Please let me know if you'd like to help with that!
Edit: thanks for the tips; I'll try to implement auto-selection for letterboxd in the near future.
In the meantime, I've created five other scripts that use data from
Notes for people in the iOS contacts: [contacts-script],
reporter-app.com (via Dropbox sync): [reporter-script]
and pinboard.in: [pinboard-script]
format it the way I want the entry to look and send it to Day One.
I could reuse much of the code but the reporter script took me relatively long because of the Dropbox authentication and JSON parsing. Thanks to omz and wrenoud for making this as painless as possible!
Let me know if you have any questions or comments!
import time t = time.localtime() second = t.tm_sec
I added some comments to luk's gist.
I updated all of the scripts with improvements suggested by @ccc.
I made several improvements regarding post formatting and added time support to reporter entries.
Still, I'm not that happy with the layout of the resulting posts so I'd appreciate if someone would come up with a better markdown template.
reporter script now updated with formatting as a table and numericalResponse support.
More comments added to the gists...
I updated the pinboard and letterboxd scripts to use Markdown formatted tables instead of the raw entries and made some improvements to the last.fm script. (special characters in the data cannot break the formatting anymore)
I implemented sys.argv options for URL-scheme use. You can now run the scripts silently which will create the entries without user confirmation and also pass the entry comments via the URL.
These are some pretty sweet scripts. Thanks for sharing. I use Day One as a journal but I think it's great as a personal log. It's a fun way to get a picture of yourself and your interests and personality at a given time, and tweets, articles, bookmarks are all a part of that picture.
I already backup my pinboard bookmarks to Dropbox via IFTTT and I made a Drafts action that can be called from a Bookmarklet or from something like Mr Reader and will send title and url to Pinswift then append to an Evernote note (with an IFTTT action for bookmarks not added that way). But there are limitations there. Having it in a table is nice and using the rss opens more doors (IFTTT only works with public bookmarks). Well done.
To be clear, the Instapaper one takes only stuff added to the list today, is that right? Not the full reading list. Thanks.
Yes, I only use articles from the past day. the problem is though that Instapaper only provides RSS for articles that are currently in the reading list which means that the ones you already read and archived or deleted will not appear. I worked around this by using an IFTTT script that takes all articles from the Instapaper RSS and adds them to Pinboard. (I don't recommend Pinboard's built in option; it's too slow.) that way, by the time I remove them from the Instapaper reading list, they are all saved in Pinboard. I now just run the Pinboard script at the end of the day and it gives my a summary of all pins and reads.
I think that the Instapaper script is rather useless with their RSS implementation so I probably won't work on that anymore.
Are you referring to Pinboard when stating that you can only access public bookmarks via RSS? That's not the case; you can get a private RSS link from your Pinboard account page and it shows all of the recent pins.
No I was referring to IFTTT and Pinboard, where IFTTT only handles public ones. I use Instapaper's setting in-app to save liked articles to Pinboard. Some may slip through the cracks but the ones I enjoyed, at least, make it. Most my bookmarking is done via iPhone or iPad so I use my bookmarklet, drafts, or mr reader, or a combination of, so they're backed up to evernote, and then for ones from Instapaper, where I can't do that, I use a special tag for IFTTT to append to same list. And if they're public they're all added to a file in Dropbox also via IFTTT. That's why I like your script though, is it uses the RSS and thus I can get my private ones too. And I've been using Day One a lot lately for logging things about my life, in addition to traditional journaling, so it's good. I probably don't need 3 copies of my bookmarks, but it can be done, so why not? Plus, the table format is nice.
Though I am curious, and maybe you can direct me to, how the times are done in the Twitter one. Looking at my output, I'm thinking it's to do with time zones maybe? Because they're way off from my time, but date/time in Python is something I'm really still learning.
I'm glad to hear that my scripts help you! Actually, I couldn't figure out time maths myself. I already tried figuring it out early on in the process of writing the scripts but eventually gave up. Maybe I'll be able to wrap my head around the timezone conversion later this week. Timezones I may be able to implement but please don't ask me to do DST conversion...
Haha. Fair enough. I'll look into some more myself too. As long as I keep in mind not to rely on the times specifically, it still serves it's purpose, and that's great.
I rewrote the time-extraction code to do timezone conversion. The scripts should now automatically convert the times to your local timezone. Another advantage is that I now use entries of the last 24 hours instead of only the past day. Please test and report back if it works correctly!
Awesome. I'll try then in a few. Thanks.