Browse Source

Génération des pdf dans build/

master
Dimitri Merejkowsky 5 years ago
parent
commit
de6a21cafd
2 changed files with 1 additions and 2 deletions
  1. +0
    -1
      cours/.gitignore
  2. +1
    -1
      cours/build.py

+ 0
- 1
cours/.gitignore View File

@@ -1,2 +1 @@
*.pdf
build/ build/

+ 1
- 1
cours/build.py View File

@@ -7,7 +7,7 @@ def main():
template = Path("build.in.ninja").text() template = Path("build.in.ninja").text()
to_write = template to_write = template
for md_file in Path(".").files("*.md"): for md_file in Path(".").files("*.md"):
to_write += f"build ../{md_file.with_suffix('.pdf')}: pandoc ../{md_file}\n"
to_write += f"build {md_file.with_suffix('.pdf')}: pandoc ../{md_file}\n"
build_path = Path("build") build_path = Path("build")
build_path.mkdir_p() build_path.mkdir_p()
out = build_path / "build.ninja" out = build_path / "build.ninja"