def transform(wldoc, verbose=False,
style=None, html_toc=False,
- sample=None, cover=None, flags=None):
+ sample=None, cover=None, flags=None, hyphenate=False):
""" produces a EPUB file
sample=n: generate sample e-book (with at least n paragraphs)
replace_characters(wldoc.edoc.getroot())
- hyphenator = set_hyph_language(wldoc.edoc.getroot())
- hyphenate_and_fix_conjunctions(wldoc.edoc.getroot(), hyphenator)
+ if hyphenate:
+ hyphenator = set_hyph_language(wldoc.edoc.getroot())
+ hyphenate_and_fix_conjunctions(wldoc.edoc.getroot(), hyphenator)
# every input file will have a TOC entry,
# pointing to starting chunk
def transform(wldoc, verbose=False, sample=None, cover=None,
- use_kindlegen=False, flags=None):
+ use_kindlegen=False, flags=None, hyphenate=True):
""" produces a MOBI file
wldoc: a WLDocument
del wldoc
epub = document.as_epub(verbose=verbose, sample=sample,
- html_toc=True, cover=cover or True, flags=flags)
+ html_toc=True, cover=cover or True, flags=flags,
+ hyphenate=hyphenate)
if verbose:
kwargs = {}
else: