Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Tumblr template parser for PHP 5.4+.
PHP JavaScript CSS
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
composer
data/generators
lib
scripts
test
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist
phpunit.xml.travis
themer-logo.txt

README.md

Themer

Build Status

Themer is a Tumblr template parser for PHP 5.4+. Just add it to your composer.json file and run:

$ composer install
$ vendor/bin/themer authorize
$ vendor/bin/themer init
$ vendor/bin/themer start

PHP 5.4+ is required.

Getting Started

Get some template data

Themer uses data pulled from the Tumblr v2 API as placeholder data when rendering your theme. As a result, you must register an application and obtain an api key (referred to as your OAuth Consumer Key). You can do that here: http://www.tumblr.com/oauth/apps

After that, use the authorize command to authorize your Themer installation to interact with the API:

$ themer authorize

Initialize your project directory

After authorizing Themer, you can use the command line tool to setup your theme directory like so:

$ themer init

Configuration

Read the themer.yml configuration file generated by the init command. All of the available options in that file are accompanied by a description of what they do.

Take note of the themes key, an array of paths to theme files relative to the project directory. The init command attempts to discover any .html files at the root and stores them in this key. A typical configuration might look like this:

themes:
  - mycooltheme.html
  - mycooltheme-mobile.html

The first one is always the considered the default, but you can easily switch between any theme specified in this file via the Themer web UI.

Loading data

Run the data:load command and follow the instructions:

$ themer data:load [--blog BLOG]

TODO

  • Post Parsing
    • Panorama: Everything.
    • Photoset: {JSPhotosetLayout}, {PhotosetLayout}, {Photoset-SIZE}.
  • Improve documentation.
  • Test the Themer\Console classes.
  • Refactor the Themer\Tumblr\Templatize class (maybe as part of Themer\Data).
  • Improve API key storage & security.
  • Add Notes parsing.
  • Improve this README.

License

Themer is Copyright © 2011 Braden Schaeffer. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Something went wrong with that request. Please try again.