Quote:
Originally Posted by gummihuhn
If I can figure out how to grab the "Printer Friendly Format" link from sites where images are important and pass that URL to Pandoc, that should solve the problem. This probably requires site-specific configurations or "recipes", which I may play with at some point, but this isn't a huge priority for me at the moment.
|
I've figured out how to make the output of Pandoc much nicer, including easy per-site configuration settings.
An example of the current output is attached. To customize output content for the source website of that epub, here is all I needed:
Code:
.date {display:none;}
.tophat {display:none;}
.persistent-header-placeholder {display:none;}
.lede-headline {display:none;}
.social-share {display:none;}
.article-rail {display:none;}
.terminal-tout {display:none;}
.read-this-next {display:none;}
.article-tags__tag {display:none;}
.article-tags__tag-link {display:none;}
.unsupported-browser {display:none;}
.footer {display:none;}
.footer__container {display:none;}
This is representative of the number of lines necessary for most other websites I've set up. Those settings won't change until the website gets redesigned (a fairly rare occurrence), so once a site is set up should just work. Getting the relevant CSS classes is pretty easy in any modern browser, even if you don't know CSS. And of course those per-site settings can be shared between people.
There are still some obvious improvements to be made, but I like the progress. After I've had some time to clean up my script and write up a how-to (probably this weekend), I'll post the updated script with instructions in case anyone is interested in trying it.