I just released a medium-sized update to the Tumblr Gem. Go get it:
gem update tumblr-rb
Or if you haven’t installed it yet:
gem install tumblr-rb
Some new options for the CLI:
-dwill save the post as a draft, regardless of the
stateparameter in the YAML frontmatter.
-qwill save the post to your queue.
-pwill publish the post immediately.
--group=GROUPwill publish the post to a group blog.
--credentials FILE. This one is kind of cool and requires some further explanation. In order to provide your credentials, you can either provide them inline in the script with
-a or you will be prompted for them. With
--credentials, you give the flag a path to a YAML-esque file. The file should look like this:
email: email@example.com password: myvoiceismypassport
tumblr will authenticate with these parameters. This allows you to create a dotfile or something like that to store your credentials so you don’t have to enter it every time. This one’s for inky.
There’s also some new methods for the Ruby library itself. A Tumblr::Post object can now like and unlike itself (and has a
A new, significant method is the Tumblr::Reader#get_all_posts method. This will actually perform multiple authenticated reads and transform every post of the user to a Tumblr::Post object. This method has quite a bit of overhead, and performs multiple blocking HTTP requests, synchronously, until it has all the posts or until a response is not successful. I have a few ideas for using this method in practice but YMMV.