]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Add code in fixup-docbook.rb to make CC logo images informalfigure.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 4 Feb 2018 20:43:58 +0000 (21:43 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
fixup-docbook.rb

index 1fe55d0de9ee6c3b00353dc12c89729ae4d26d63..e26abe503279eedc9892cf02472f0766a0d3d8a5 100755 (executable)
@@ -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')