Script for pulling posts out of Tumblr and creating content for Jekyll.
- Go to Tumblr and request an API key.
- Paste the OAuth Consumer Key into the script as
API_KEY
. - Enter your site's root Tumblr URL as
TUMBLR_ROOT
. - [Optional] Change the
TEXT_ONLY
setting to False if you want more than just your text posts. - [Optional] Add/remove tuples from the
CUSTOM_FIELDS
dictionary. More info. - In the terminal:
python tumblr2jekyll.py
-- the directory structure for Jekyll will be created wherever the script is run from.
- You have Python installed
- The Tumblr V2 API stil exists.
- You are using a traditional Jekyll structure (eg.
_posts/
andimages/
). If not, the script is easy enough to edit on your own. - You don't really care about the
description
field in the posts, since Tumblr doesn't have one (I just re-write the title there).
You can add any custom fields using the CUSTOM_FIELDS
dictionaty at the beginning of the script. I have that setting pre-populated with the standard layout: post
as a default. You should always at least specify a layout
here, and can add whatever other pairs you need or want.
That should do it. No need really to set up a virtualenv, as there are no requirement modules outside of core Python libraries.