From 265cbb4e7023690b58d7a9b1f9c44474af4c3995 Mon Sep 17 00:00:00 2001 From: gauthiier Date: Tue, 12 Sep 2023 08:36:35 +0200 Subject: [PATCH] txt-md --- gen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gen.py b/gen.py index 2d5ed93..cb776ba 100644 --- a/gen.py +++ b/gen.py @@ -70,7 +70,9 @@ def emit_audio(file: pathlib.Path, data_dir: pathlib.Path, full=False): # an '.audio' file is a json file with a list of audio elements # which need to be bundles as a type of list in a single
  • - file = data_dir / file; + if not file.is_file(): + file = data_dir / file; + if file.is_file(): with file.open() as fp: audio = json.loads(fp.read()) @@ -296,7 +298,7 @@ if __name__ == '__main__': datadir = d / "data" if datadir.is_dir(): section_indx_txt = datadir / "index.txt" - section_desc_txt = datadir / "desc.txt" + section_desc_txt = datadir / "desc.md" out_index = None if section_indx_txt.is_file() or section_desc_txt.is_file():