Themer is a project mainly written in ..., based on the MIT license.
A Tumblr theme parser for local development.
Themer is a Tumblr template parser for local development written in PHP. This library is inspired by, and uses code from, Thimble by mwunsch. It's goals are simple: make setup a complete breeze; be able to parse all possible tumblr.com scenarios; and enable easy, seamless customizations to theme processing.
Contributions, suggestions, comments and forks are needed and will be welcomed happily.
Right now, Themer supports these Tumblr template features, all configurable in a YAML file:
...and much more will come as it happens.
Create an index.php that looks like this in your project directory:
<?php
require 'path/to/themer/themer.php';
Themer::$theme_file = 'my_theme.html'; // the default is 'theme.html';
Themer::run(__DIR__);
Let your server know how to treat this directory. A simple .htaccess
example for Apache/MAMP would look like this:
RewriteEngine on
RewriteBase /
# Standard rewrite
RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
# If you're running Themer as a PEAR package (future), expose the
# PEAR path (it may differ from system)
php_value include_path ".:/usr/lib/php"
# Logging is really optional but recommended so you can `tail -f` it
# if you would like to help with developing the project
php_flag log_errors on
php_value error_log /path/to/project/themer.log
Point your server to your project directory and go...
Themer is Copyright © 2011 Braden Schaeffer. It is free software, and may be redistributed under the terms specified in the LICENSE file.