X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/0e4ffbbe97ffd0f9f10228625e29627552c416f0..19e6565733bdd7366a5b7124950eb5433f2f0b62:/fixup-docbook-translated.rb diff --git a/fixup-docbook-translated.rb b/fixup-docbook-translated.rb index 696c0dd..38ec06e 100644 --- a/fixup-docbook-translated.rb +++ b/fixup-docbook-translated.rb @@ -59,11 +59,23 @@ xml.search('preface').each do |pref| log 1, 'Moved: %s' % attrib_text end -log 0, 'Replace colophon + legalinfo by the information assembled by our publisher' +log 0, 'Replace legal info 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, 'Add a colophon at the end' +# Doing this the dirty, non-DocBooky way: I'm adding a large section to the last appendix. This should probably go in the +# section, but it's already used. +# +# A cleaner way would be to replace the section in pdf_es.xsl — But it gets +# trickier :-Þ +if colophon = File.open('extra/es/colophon.tex', 'r').read rescue nil + xml.search('appendix').last.search('para').last.after('' % colophon) +end + log 0, 'Writing processed file' # Unable to figure out API way to replace DOCTYPE