Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
amendments
Commits
99724152
Commit
99724152
authored
Mar 31, 2013
by
Michael Witrant
Browse files
dump xml
parent
356222eb
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Gemfile
View file @
99724152
...
...
@@ -3,3 +3,4 @@ source "http://rubygems.org"
gem
"
nokogiri
"
gem
"
htmldiff
"
gem
"
zippy
"
gem
"
clik
"
Gemfile.lock
View file @
99724152
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
extract_amendments.rb
View file @
99724152
...
...
@@ -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
sample.xml
0 → 100644
View file @
99724152
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment