Combine Markdown source files into one large file.
(
markdown_dir: Path, markdown_file: Path, converted_image_dir: Path
)
| 135 | |
| 136 | |
| 137 | def compile_full_markdown( |
| 138 | markdown_dir: Path, markdown_file: Path, converted_image_dir: Path |
| 139 | ) -> Path: |
| 140 | """Combine Markdown source files into one large file.""" |
| 141 | |
| 142 | markdown_fragments = [generate_markdown_preface()] |
| 143 | |
| 144 | for chapter in find_markdown_chapters(markdown_dir): |
| 145 | markdown_fragments.append( |
| 146 | generate_markdown_chapter(chapter, converted_image_dir) |
| 147 | ) |
| 148 | |
| 149 | markdown_file.write_text("\n\n".join(markdown_fragments)) |
| 150 | |
| 151 | return markdown_file |
| 152 | |
| 153 | |
| 154 | def build_pdf(markdown_file: Path, pdf_file: Path, args: argparse.Namespace) -> Path: |
no test coverage detected