Skip to content
Sinatra app(s) that use the WordPress database structure to serve a blog
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


this isn't being maintained anymore - it was just an experiment
feel free to poke around if you're curious, though!

# installation
gem install # everything in .gems

# local development
gem install shotgun racksh
shotgun # to run app

# get remote mysql db locally
mysqldump -u USERNAME -p -h HOST DATABASE > dumpfile
mysql -u USERNAME -p DATABASE < dumpfile

# send remote mysql db to heroku to convert to postgres
# consider the following possible cleanup steps first:
mysql> delete from wp_posts where post_status != 'publish';
mysql> update wp_comments set comment_date_gmt = comment_date where comment_date_gmt is null;
mysql> delete from wp_posts where post_type = 'revision';
mysql> delete from wp_comments where comment_approved = 'spam';
# make db point to local mysql db
heroku db:push
# if the encoding is messed up check out the "taps" gem docs, maybe you need to use "latin1"

# todo
give up on wordpress database structure?
allow new comments (w/ akismet)
about, search, archive, recent, buddies, postrank
auto escape with erubis
serve 404 for not found
improve will_paginate helper
come up with something better for is_single? and add more
move feed outside of theme
get post comments going through active record associations (table capitalization problem?)
deny access to erb files in public
auto link urls in comments?
prefer, for example, single.erb to index.erb if available for posts/show
catch common wp post routes (/?p=123 etc) and legacy page routes /page/2/
gemify presto
Something went wrong with that request. Please try again.