Idiograffiti

Just testing out tumblr-rb gem

Just testing out that new tumblr-rb gem I linked to a minute ago.

Update: From digging around in the gem, it looks like if you put the post-id in the YAML front matter of the file, it will update an existing post. So…did it?

Another Update: It worked! Here’s why this is cool: you can do all of your writing locally in text files and a text editor and just push it to tumblr when it’s ready. And because you can easily update posts this way too, you can edit the files locally too, keeping your master copies in local text files. Basically all the things I love about my jekyll blog for longer posts combined with the ease of posting Tumblr provides for shorter posts. The next step is to write a wrapper script around the tumblr-rb gem that adds the post-id to the YAML of a file after a successful new post.

Even more cool: since I wrote a Tumblr backup script script awhile back that uses this same data format (plain text files with YAML front matter), I should be able to make just a few modifications to that script to provide a local copy of my Tumblr blog stored in the format tumblr-rb expects for adding and updating posts. Posts made through the web would get backed up, and posts originating locally would get pushed with the tumblr CLI.

Back Again: The backup script was updated to use “post-id:” instead of “id:” in the YAML, which means you can now edit one of the regular posts backed up by my script and save your changes to tumblr with the tumblr-rb CLI. Pretty sweet! It only works with regular posts though. I’ll have to change the format of my backup scripts files to make it work for other post types, which I hope to do. (Especially for link posts as I use those a lot. I’m less concerned about a good CLI for editing, say, photo or video posts.)