Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created July 31, 2010 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rummelonp/502168 to your computer and use it in GitHub Desktop.
Save rummelonp/502168 to your computer and use it in GitHub Desktop.
load 'Tumblr2epub.rb'
tumblr = Tumblr2epub.read('mitukiii', 2000, nil, true)
page = 200
tumblelog = tumblr[:tumblelog]
title = tumblelog['title']
posts = tumblr[:posts].reverse
(posts.length / page).times do |i|
_tumblr = {}
_tumblr[:tumblelog] = tumblelog
_tumblr[:tumblelog]['title'] = "#{title} #{(i + 1).roman}"
_tumblr[:posts] = posts.slice(i * page, page)
Tumblr2epub.make(_tumblr, '~/Downloads', true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment