X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/cf207455f6840e0634e84e6e195a282c16555ad2..a8104c5bdc5f52ba17176e0beb18c59f89d19097:/fixup-docbook-translated.rb
diff --git a/fixup-docbook-translated.rb b/fixup-docbook-translated.rb
index 405a094..1d7e3a0 100644
--- a/fixup-docbook-translated.rb
+++ b/fixup-docbook-translated.rb
@@ -43,6 +43,21 @@ xml.search('imagedata').each do |img|
end
end
+log 0, 'Final editorial requests: Attributions on top, as in other chapters, also for prefaces'
+xml.search('preface').each do |pref|
+ title = pref.search('title').first
+ attrib = pref.search('blockquote').last
+ attrib_text = attrib.inner_text.gsub(/\s+/,' ')
+
+ # Some formatting issues we need to modify
+ attrib_text.gsub!(/Paul y Sarah/, 'Paul y Sarah')
+ attrib_text.gsub!(/Merkley (CEO.*)/, 'Merkley
' % attrib_text) + log 1, 'Moved: %s' % attrib_text +end + log 0, 'Writing processed file' # Unable to figure out API way to replace DOCTYPE data = xml.to_xml()%s