X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/d593f4a583ca43c2fdf0f966447f8d286e425e15..c5bf0c01c996fbee49b8890f7bf9845a08dd5be0:/fixup-docbook-translated.rb
diff --git a/fixup-docbook-translated.rb b/fixup-docbook-translated.rb
index 405a094..696c0dd 100644
--- a/fixup-docbook-translated.rb
+++ b/fixup-docbook-translated.rb
@@ -43,6 +43,28 @@ 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, 'Replace colophon + legalinfo by the information assembled by our publisher' +if legal = File.open('extra/es/legal_info.xml', 'r').read rescue nil + xml.search('colophon').first.inner_html = legal +end + + log 0, 'Writing processed file' # Unable to figure out API way to replace DOCTYPE data = xml.to_xml()%s