From: Petter Reinholdtsen Date: Sun, 4 Feb 2018 20:43:58 +0000 (+0100) Subject: Add code in fixup-docbook.rb to make CC logo images informalfigure. X-Git-Tag: es-printed~508 X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/commitdiff_plain/a1b81d33ad254c859389be8256ab50bd563b2155 Add code in fixup-docbook.rb to make CC logo images informalfigure. --- diff --git a/fixup-docbook.rb b/fixup-docbook.rb index 1fe55d0..e26abe5 100755 --- a/fixup-docbook.rb +++ b/fixup-docbook.rb @@ -80,6 +80,12 @@ xml.css('para').each do |para| end end +log 0, 'change CC logo images to informalfigure' +xml.css('figure mediaobject imageobject imagedata[width="40.0%"]').each do |id| + f = id.parent.parent.parent + f.name = 'informalfigure' +end + log 0, 'Writing processed file' # Unable to figure out API way to replace DOCTYPE data = xml.to_xml().gsub!(/DOCTYPE article/, 'DOCTYPE book')