MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / build_epub

Function build_epub

build_ebook.py:198–215  ·  view source on GitHub ↗
(markdown_file: Path, epub_file: Path)

Source from the content-addressed store, hash-verified

196
197
198def build_epub(markdown_file: Path, epub_file: Path) -> Path:
199 try:
200 subprocess.check_output(
201 [
202 "pandoc",
203 markdown_file.as_posix(),
204 "--toc",
205 "-o",
206 epub_file.as_posix(),
207 "--epub-cover-image=ebook/cover.png",
208 ]
209 )
210 except CalledProcessError as e:
211 raise RuntimeError(
212 f"failed to build {epub_file}: pandoc failed: {e.output.decode()}"
213 )
214
215 return epub_file
216
217def main() -> None:
218 parser = make_parser()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected