Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Using Web Technologies to Print a Book.
system("multimarkdown -s ../#{part}/story.md | sed -E 's/_([^_]+)_/<em>\\1<\\/em>/g' | sed -E 's/<h1 .+<\\/h1>//g' | sed 's/<p>%<\\/p>/<p class=\"section-break\">%<\\/p>/g' > output-#{part}.html")
s_<p>%</p>_<p class="section-break">%</p>_g
s/<p>%<\\/p>/<p class=\"section-break\">%<\\/p>/g
Those sed commands could probably be reduced to one invocation of sed(1) instead of three.
system("cat #{htmls} | #{wkhtmltopdf_cmd} --footer-html footer.html - body.pdf")
Those sed commands could probably be reduced to one invocation of sed(1) instead of three.
No need to use cat.