From 04272c397309c3cb341fa0f1e95137444de3164f Mon Sep 17 00:00:00 2001 From: "Soren I. Bjornstad" Date: Fri, 19 Aug 2022 17:14:06 -0500 Subject: [PATCH] also privatize JSON tiddlers This seems slightly dangerous because we're just applying the same replacement logic and JSON has a much fussier syntax. However, if any tiddlers end up invalid we should just get a build failure, so this doesn't seem highly consequential. --- tzk/builders.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tzk/builders.py b/tzk/builders.py index 1b50a11..f9c69b9 100644 --- a/tzk/builders.py +++ b/tzk/builders.py @@ -13,6 +13,7 @@ information about the defined products without actually running any build steps. from collections.abc import Mapping from contextlib import contextmanager import functools +import itertools import os from pathlib import Path import re @@ -559,7 +560,8 @@ def replace_private_people(initialer: Callable[[str], str] = None, replace_link_ assert 'public_wiki_folder' in build_state replacement_table = _private_people_replacement_table(initialer) - tid_files = (Path(build_state['public_wiki_folder']) / "tiddlers").glob("**/*.tid") + root = (Path(build_state['public_wiki_folder']) / "tiddlers") + tid_files = itertools.chain(root.glob("**/*.tid"), root.glob("**/*.json")) for tiddler in tid_files: dirty = False