bryanwoods / disintegration

Disintegration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a Ruby on Rails application I built in support of “Disintegrations”, published on December 3, 2015 on Queen Mob’s Tea House queenmobs.com/2015/12/poem-bryan-woods/

Initially the poems were delivered as a code snippet of HTML and JavaScript, which were styled to match Queen Mob’s look and feel and were intended to be inserted into the content area in an iframe. This is what is rendered by ProjectsController#index.

We had some difficulty getting this solution to work (their CMS was configured to disallow inserting code for security reasons), so I thought of a hack: the CMS might block code snippets, but nobody’s preventing me from inserting images!

So I wrote ProjectsController#poems, which reads the text of the poems out of the database and draws them to a PNG image before deleting another character. This allowed the project to exist within an <img> tag.

A Clojure version exists as well, if you prefer a CLI interface and provide some poems of your own in a file called “disintegration.txt” gist.github.com/bryanwoods/d09c38ea0585c0526c37

About

Disintegration


Languages

Language:Ruby 74.8%Language:HTML 17.0%Language:CSS 4.8%Language:JavaScript 2.7%Language:CoffeeScript 0.7%