]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup-docbook-translated.rb
Forming the legal information file for the Spanish edition (outside of the translatio...
[text-madewithcc.git] / fixup-docbook-translated.rb
index 1d7e3a042e4776fcdcac94e5c1a10f2d4456f26a..696c0dd97874f67d90a55840af4502f09419abd8 100644 (file)
@@ -52,12 +52,19 @@ xml.search('preface').each do |pref|
   # Some formatting issues we need to modify
   attrib_text.gsub!(/Paul y Sarah/, 'Paul <?latex \textup{>y<?latex } > Sarah')
   attrib_text.gsub!(/Merkley (CEO.*)/, 'Merkley <citetitle>\1</citetitle>')
+  attrib_text.gsub!(/Wolf (Ins.*)/, 'Wolf <citetitle>\1</citetitle>')
 
   attrib.remove
   title.after('<blockquote><attribution>%s</attribution></blockquote>' % 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()