Commit 99724152 authored by Michael Witrant's avatar Michael Witrant

dump xml

parent 356222eb
......@@ -3,3 +3,4 @@ source "http://rubygems.org"
gem "nokogiri"
gem "htmldiff"
gem "zippy"
gem "clik"
GEM
remote: http://rubygems.org/
specs:
clik (0.1.0)
htmldiff (0.0.1)
nokogiri (1.5.9)
rubyzip (0.9.9)
......@@ -11,6 +12,7 @@ PLATFORMS
ruby
DEPENDENCIES
clik
htmldiff
nokogiri
zippy
......@@ -3,7 +3,11 @@
require 'rubygems'
require 'bundler/setup'
require 'zippy'
require 'clik'
xml_dump_path = nil
cli '--xml-dump' => lambda { |path| xml_dump_path = path }
opendocument_path = ARGV.first
raise "usage: #$0 <OpenDocument file>" unless opendocument_path
......@@ -13,4 +17,8 @@ Zippy.open(opendocument_path) do |zip|
xml = zip['content.xml']
end
if xml_dump_path
File.open(xml_dump_path, "w") { |f| f.write xml }
end
puts xml.size
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment