2025-05-25 13:07:10 +02:00
|
|
|
#! /usr/bin/env -S python3 -B
|
2019-09-08 20:15:32 +02:00
|
|
|
|
|
|
|
import os
|
|
|
|
import shutil
|
2020-04-27 22:42:53 +02:00
|
|
|
import subprocess
|
2025-05-25 13:07:10 +02:00
|
|
|
import sys
|
2019-09-08 20:15:32 +02:00
|
|
|
|
2025-05-25 13:07:10 +02:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
from rwx.prj.sphinx import SphinxProject
|
2019-09-08 20:15:32 +02:00
|
|
|
|
2023-01-05 22:40:10 +01:00
|
|
|
TRAVAUX = [
|
2025-05-25 13:07:10 +02:00
|
|
|
# "thesis",
|
2023-01-05 22:40:10 +01:00
|
|
|
]
|
2025-05-25 13:07:10 +02:00
|
|
|
OUTPUT = "out"
|
2019-09-08 20:15:32 +02:00
|
|
|
|
|
|
|
|
2020-04-27 12:46:18 +02:00
|
|
|
def others():
|
2025-05-25 13:07:10 +02:00
|
|
|
travaux = os.path.join("cnam")
|
2020-04-27 22:42:53 +02:00
|
|
|
for travail in TRAVAUX:
|
2025-05-25 13:07:10 +02:00
|
|
|
subprocess.call([os.path.join(travaux, travail, "build.py")])
|
2020-04-27 12:46:18 +02:00
|
|
|
|
|
|
|
|
2019-09-08 20:15:32 +02:00
|
|
|
def main():
|
|
|
|
file = os.path.realpath(__file__)
|
|
|
|
directory = os.path.dirname(file)
|
2020-04-27 22:42:53 +02:00
|
|
|
os.chdir(directory)
|
2025-05-25 13:07:10 +02:00
|
|
|
# projects
|
2020-04-27 22:42:53 +02:00
|
|
|
others()
|
2025-05-25 13:07:10 +02:00
|
|
|
# project
|
|
|
|
sys.exit(SphinxProject(Path(__file__)).build())
|
2019-09-08 20:15:32 +02:00
|
|
|
output_directory = os.path.join(directory, OUTPUT)
|
|
|
|
shutil.rmtree(output_directory, ignore_errors=True)
|
2025-05-25 13:07:10 +02:00
|
|
|
sphinx.cmd.build.build_main(arguments)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2019-09-08 20:15:32 +02:00
|
|
|
main()
|