Last active
August 29, 2015 14:01
-
-
Save gdamjan/79f346db1a5b20f6e17f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from lxml import html, etree | |
from lxml.html import builder as E | |
... | |
Moved to https://github.com/gdamjan/polaris-to-html |
- автор, наслов - средено
- chapter breaks - може во калибре да се среди ако се одбере h2 и h3 да ги третира, може и тука да ги свичнам сите h2 во h1, а h3 во h2
- center chapter number - css го средува ова, исто во calibre
останува cover image-от
плус TODO
автоматизирана конверзија html во azw3серија и индекс во серијата на книги (на пр „Roboti-Carstvo-Zadužbina“) - series и series_index во meta tag-овитеmeta/pubdate и meta/publisher
to run it on the whole collection:
find polaris_sf_complete/html/* -type d -print0 |
xargs -0 --verbose -P3 -I{} sh -c "cd {}; polaris-to-ebook.py --epub" &> out.log
kind of ugly with the sh -c "cd {}; ...
but I'm lazy to implement chdir in the program itself.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO:
евентуално мета информации да се извлечат и форматираат да ги најде calibre (автор, наслов, слика)chapter breaks