From 6674c526ce1ca19db10a656da02720459623c433 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Tue, 12 Nov 2019 15:09:11 -0800 Subject: [PATCH] More docs generation cleanup --- docs/ba_module.md | 2 +- tools/snippets | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/ba_module.md b/docs/ba_module.md index b668bcc9..f3af8e73 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ - +

last updated on 2019-11-12 for Ballistica version 1.5.0 build 20001

This page documents the Python classes and functions in the 'ba' module, which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please let me know. Happy modding!

diff --git a/tools/snippets b/tools/snippets index 85dddf4a..e19b3a04 100755 --- a/tools/snippets +++ b/tools/snippets @@ -647,7 +647,6 @@ def update_docs_md() -> None: """Updates docs markdown files if necessary.""" # pylint: disable=too-many-locals from efrotools import get_files_hash, run - from efrotools.code import get_script_filenames check = ('--check' in sys.argv) @@ -656,14 +655,17 @@ def update_docs_md() -> None: # Generate a hash from all c/c++ sources under the python subdir # as well as all python scripts. pysources = [] - exts = ['.cc', '.c', '.h'] - for root, _dirs, files in os.walk('src/ballistica/python'): - for fname in files: - if any(fname.endswith(ext) for ext in exts): - pysources.append(os.path.join(root, fname)) - pysources += get_script_filenames(Path('.')) + exts = ['.cc', '.c', '.h', '.py'] + for basedir in [ + 'src/ballistica/python', 'assets/src/data/scripts/bafoundation', + 'assets/src/data/scripts/ba' + ]: + assert os.path.isdir(basedir) + for root, _dirs, files in os.walk(basedir): + for fname in files: + if any(fname.endswith(ext) for ext in exts): + pysources.append(os.path.join(root, fname)) curhash = get_files_hash(pysources) - print('final2', curhash) # Extract the current embedded hash. with open(docs_path) as infile: