Creating an EPUB from a Wordpress blog

toc_url: https://practicalguidetoevil.wordpress.com/table-of-contents/
toc_parser: |
[x.get('href') for x in soup.select('div.entry-content a') if 'class' not in x.attrs]
$ ./trivialpub.py -c practicalguide.yaml 
Processing chapter https://practicalguidetoevil.wordpress.com/2015/03/25/prologue/
Processing chapter https://practicalguidetoevil.wordpress.com/2015/04/01/chapter-1-knife/
Processing chapter https://practicalguidetoevil.wordpress.com/2015/04/08/chapter-2-invitation/
Processing chapter https://practicalguidetoevil.wordpress.com/2015/04/16/chapter-3-squire/
[...]
$ ls -l build/
total 9216
-rw-r--r-- 1 acompton admin 2004507 Nov 26 15:05 practicalguide.epub

 by the author.

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store