X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/e44769359a308ee4f407ad396f0ae4bc3c28a16d..a1b81d33ad254c859389be8256ab50bd563b2155:/fixup-docbook.rb 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')