From 86fb8749e3c6fadd1571d2a5c8c42a7b1d67eca4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 3 Mar 2024 22:56:09 +0100 Subject: [PATCH] build/shrink --- build.py | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/build.py b/build.py index d172db8..24f4901 100755 --- a/build.py +++ b/build.py @@ -1,37 +1,7 @@ -#! /usr/bin/python3 -B - -import os -import shutil - -import sphinx.cmd.build +#! /usr/bin/env -S python3 -B from rwx.prj.sphinx import SphinxProject -INPUT = ["rtfd"] -OUTPUT = "out" - - -def main(): - file = os.path.realpath(__file__) - directory = os.path.dirname(file) - output_directory = os.path.join(directory, OUTPUT) - shutil.rmtree(output_directory, ignore_errors=True) - for doc in INPUT: - arguments = [ - "-E", - "-j", "2", - "-b", "html", - "-D", "project={}".format(doc), - "-D", "master_doc={}".format("index"), - "-D", "html_theme={}".format("sphinx_rtd_theme"), - # "-C", - "-c", directory, - os.path.join(directory, doc), - os.path.join(output_directory, doc), - ] - sphinx.cmd.build.build_main(arguments) - if __name__ == "__main__": - project = SphinxProject(__file__) - project.build() + SphinxProject(__file__).build()