Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b9c7335315
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.696 kB
#!/usr/bin/ruby
# encoding: utf-8
# Pass this script the URI of your microblog
# It will print out an HTML gallery of photos
$: << File.dirname(__FILE__) + '/lib'
require 'util'
require 'paginated_hatom_imgs'
# XXX: Maybe use a real templating engine?
puts '<!DOCTYPE html>'
puts '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>µalbum</title>'
puts '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'
puts '<style type="text/css">'
puts open('style.css').read
puts '</style>'
puts '</head><body>'
puts '<h1>µalbum</h1>'
puts '<ol>'
paginated_hatom_imgs(ARGV[0]).each do |img|
puts "<li><img src='#{h img}' alt='' /></li>"
end
puts '</ol>'
puts '</body></html>'
Jump to Line
Something went wrong with that request. Please try again.