shell script based compilation
This commit is contained in:
parent
a3f3b3410f
commit
8249280b03
14
compile.py
14
compile.py
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from os import walk
|
||||
import subprocess
|
||||
|
||||
subprocess.run("./tools/main_page_generator.py ./articles | ./tools/mmd/build/multimarkdown > ./html/index.html", shell=True)
|
||||
subprocess.run("mkdir -p ./html/articles", shell=True)
|
||||
|
||||
for root, dirs, _ in walk("./articles"):
|
||||
for d in dirs:
|
||||
subprocess.run(
|
||||
f"""./tools/article_wrapper.py ./articles/{d}/page.mmd | ./tools/mmd/build/multimarkdown > ./html/articles/{d}.html""",
|
||||
shell=True
|
||||
)
|
11
compile.sh
Executable file
11
compile.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ./html/articles
|
||||
|
||||
./tools/main_page_generator.py ./articles | ./tools/mmd/build/multimarkdown > ./html/index.html
|
||||
|
||||
for d in ./articles/*; do
|
||||
if [ -d "$d" ]; then
|
||||
./tools/article_wrapper.py "$d/page.mmd" | ./tools/mmd/build/multimarkdown > "./html/articles/$(basename -- $d).html"
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user