[Bf-docboard-svn] bf-manual: [7443] trunk/blender_docs/tools_maintenance/blender_help_extract.py: Blender Help Extract: Update to match blender's syntax
Aaron Carlisle
noreply at blender.org
Mon Nov 30 04:49:27 CET 2020
Revision: 7443
https://developer.blender.org/rBM7443
Author: Blendify
Date: 2020-11-30 04:49:26 +0100 (Mon, 30 Nov 2020)
Log Message:
-----------
Blender Help Extract: Update to match blender's syntax
rB548b3516479b478653b4eb074bbdcea535c4071f
Modified Paths:
--------------
trunk/blender_docs/tools_maintenance/blender_help_extract.py
Modified: trunk/blender_docs/tools_maintenance/blender_help_extract.py
===================================================================
--- trunk/blender_docs/tools_maintenance/blender_help_extract.py 2020-11-29 21:35:21 UTC (rev 7442)
+++ trunk/blender_docs/tools_maintenance/blender_help_extract.py 2020-11-30 03:49:26 UTC (rev 7443)
@@ -91,10 +91,10 @@
# remove last 2 args
s = s.rsplit(',', 2)[0]
- if fn == "BLI_argsAdd":
+ if fn == "BLI_args_add":
# get first 2 args
arg_short, arg_long, s = [w.strip() for w in s.split(",", 2)]
- elif fn == "BLI_argsAddCase":
+ elif fn == "BLI_args_add_case":
# get first 2 args
arg_short, _, arg_long, _, s = [w.strip() for w in s.split(",", 4)]
del _
@@ -115,7 +115,7 @@
# print(arg_short, arg_long, s)
pattern = re.compile(
- r'\b(BLI_argsAdd[Case]*)\s*\(((?:(?!\)\s*;).)*?)\)\s*;',
+ r'\b(BLI_args_add[_case]*)\s*\(((?:(?!\)\s*;).)*?)\)\s*;',
re.DOTALL | re.MULTILINE
)
@@ -247,11 +247,11 @@
l = l.replace("\t", " ")
text_rst.append(l)
- elif l.startswith("BLI_argsPrintArgDoc("):
+ elif l.startswith("BLI_args_print_arg_doc("):
arg = l.split(",")[-1].strip(");\n")
arg = eval(arg, {})
write_arg(arg)
- elif l.startswith("BLI_argsPrintOtherDoc("):
+ elif l.startswith("BLI_args_print_other_doc("):
items = list(args.items())
# sort as strings since we cant order (None <> str)
items.sort(key=lambda i: str(i[0]))
@@ -338,7 +338,7 @@
text = text_join_lines(text)
# expand CB macros
text = text_expand_macros(text)
- # first pass, extract 'BLI_argsAdd'
+ # first pass, extract 'BLI_args_add'
args = text_extract_args(text)
More information about the Bf-docboard-svn
mailing list