diff options
Diffstat (limited to 'repo/www')
| -rw-r--r-- | repo/www/Makefile | 8 | ||||
| -rwxr-xr-x | repo/www/generate-deps.py (renamed from repo/www/make-deps.py) | 0 | ||||
| -rwxr-xr-x | repo/www/generate-index.py (renamed from repo/www/make-index.py) | 8 |
3 files changed, 6 insertions, 10 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile index fc25ddb..7ba566c 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -15,7 +15,7 @@ all: site dependencies = deps.mk include $(dependencies) -$(dependencies): make-deps.py $(text_folders) +$(dependencies): generate-deps.py $(text_folders) python3 $< "$(TEXT_FILES)" $(OUT_DIR) site: $(pages) $(indices) $(autoindices) @@ -28,8 +28,10 @@ $(pages) $(indices): # ⚠ When tweaking this rule, check whether it still works for the # top-level index.html, i.e. when there is no top-level README. -$(autoindices): $(OUT_DIR)%/index.html: $(TOP_DIR)% make-index.py | $(OUT_DIR)% - python3 make-index.py "$(TEXT_FILES)" "$(*:/%=%)" > $@ +$(autoindices): \ +$(OUT_DIR)%/index.html: $(TOP_DIR)% generate-index.py | $(OUT_DIR)% + python3 generate-index.py "$(TEXT_FILES)" "$(*:/%=%)" | \ + pandoc -s > $@ clean: -rm $(dependencies) diff --git a/repo/www/make-deps.py b/repo/www/generate-deps.py index d88d333..d88d333 100755 --- a/repo/www/make-deps.py +++ b/repo/www/generate-deps.py diff --git a/repo/www/make-index.py b/repo/www/generate-index.py index ef699f0..23df192 100755 --- a/repo/www/make-index.py +++ b/repo/www/generate-index.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 from os import path -from subprocess import run from sys import argv, exit from git import Repo @@ -29,12 +28,7 @@ def generate_index_page(title, directories, files): ) + tuple( f'- [{f}]({f}.html)' for f in files ) - mdown = '\n'.join(lines) - - return run( - ('pandoc', '-s'), text=True, check=True, capture_output=True, - input=mdown - ).stdout + return '\n'.join(lines) def main(arguments): |
