Simple and quickly made Python2 app to enhance my Tumblr blog with features Tumblr itself doesn't provide. The main thing this app does is to bake useful data files (JSON for now) for a Tumblr blog. It does this by fetching the data from the Tumblr API and then doing all sorts of magic things.
It's made to be run as a cronjob and it can handle multiple blogs through multiple configuration files.
Open a text-editor and copy + paste the following example configuration.
Alternatively you can also get this from the
example.json file inside the
Now edit it so it fits your needs. When done, save it in the
conf directory or any other directory you want with any name you like. Lets save it in
conf/myconf.json for now. See these descriptions below if your unsure when adjusting the values:
blog_id = Basically your blog domain. Could also be just
myblog.com if you've routed Tumblr to your domain.
consumer_key + secret_key = Your API keys. Register an application on https://www.tumblr.com/oauth/apps if you don't have these two keys already. Once you did that, you can copy + paste your keys from the same page.
output_dir = Where the app will save the baked files. Must exist. On Windows, don't use back-slashes, use forward-slashes... e.g.
C:/Users/You/Desktop instead of
true to sort tags alphabethically or
false for unsorted.
true to sort tags in descending order or
ascending. Only applied if
sort_tags is set to
true to sort tags in random order or
false for whatever defined with
sort_tags_rev. Only applied if
sort_tags is set to
exclude_tags = list of tags to exclude in the output.
hilite_tags = tags in this list will have their
hilite attribute set to
Open a terminal and enter the
tumblrtools directory. Then...
./tt.py --conf conf/myconf.json
tt.py --conf conf/myconf.json
There is also a help command
--help if you forget the above.
Give it a few seconds. The more posts you have, the longer it takes.
If you don't see any errors, it should have created the file in the
output_dir you've configured.
Example files can be found in the
*.json files are the ones created by this app.
*.html files are simple demonstrations of how you could use those
jquery.js is just needed for the
*.html files, but I guess most people would use this too.
That's all folks!