]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Make all figure sizes relative.
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 2 Feb 2018 05:23:56 +0000 (05:23 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
fixup.rb

index 17bf82b34724ecef667256acf3ec9e3a766e3271..ba204c28abd07db72869fce4190b61972c685fd8 100644 (file)
--- a/fixup.rb
+++ b/fixup.rb
@@ -298,5 +298,11 @@ end
 log 0, 'emphesize keywords'
 data.map {|lin| lin.gsub!(/^(>\s*)(Revenue model|Interview date|Interviewees?):/, '\\1**\\2**:')}
 
+log 0, 'make figure sizes relative to text body width while keeping aspect ratio'
+data.map {|lin| lin.gsub!(/width="6.5in"/, 'width="100%"')}
+data.map {|lin| lin.gsub!(/width="4.198in"/, 'width="40%"')}
+data.map {|lin| lin.gsub!(/width="4.1665in"/, 'width="40%"')}
+data.map {|lin| lin.gsub!(/height="[0-9.]+in"/, '')}
+
 log 0, 'Writing processed file'
 File.open(dstfile, 'w') {|f| f.puts data.join("\n")}