- sample=sample, cover=None, flags=flags, style=get_resource('mobi/style.css'))
- subprocess.check_call(['ebook-convert', epub_file.name, output_file])
+ sample=sample, html_toc=True, cover=cover, flags=flags, style=get_resource('mobi/style.css'))
+
+ if verbose:
+ kwargs = {}
+ else:
+ devnull = open("/dev/null", 'w')
+ kwargs = {"stdout": devnull, "stderr": devnull}
+ subprocess.check_call(['ebook-convert', epub_file.name, output_file,
+ '--no-inline-toc'], **kwargs)