3 ms·
I use pandoc to turn html into epub. Something like the following script could be used. #!/bin/sh curl -- $@ | pandoc --standalone --smart -T '' -o - -f html
by black_knight 11y ago
I use pandoc to turn html into epub. Something like the following script could be used.
#!/bin/sh
curl -- $@ | pandoc --standalone --smart -T '' -o - -f html -t epub
- cobweb 11y agoWhat does the $@ stand for? Readability strips sidebars, comments etc from web pages. But I'm sure it's leaning on free libraries. I assume pandoc doesn't do that?
- black_knight 11y ago$@ is the command line argument for the script. That is the URL you pass to the script. Pandoc parses the html, converts the parts it can to its internal document model and converts this into EPUB. It doesn't do any intentional stripping, but some things get thrown out because it is not part of its document model. Pandoc is not a single purpose application, but rather the document format swiss-army knife. [0] [0] http://pandoc.org/ http://pandoc.org/