public
Fork of rubys/mars
Description: Yet Another Planet Refactoring
Homepage: http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring
Clone URL: git://github.com/technomancy/mars.git
mars / bin / reconstitute
100644 16 lines (11 sloc) 0.284 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env ruby
 
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
 
require 'open-uri'
 
require 'planet/sift'
require 'planet/transmogrify'
 
ARGV.each do |arg|
  doc = Planet::Transmogrify.parse(open(arg))
  doc.attributes['xml:base'] = arg
  Planet.sift(doc)
  puts doc
end