diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-03-28 14:44:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-03-28 14:44:07 +0300 |
commit | e42070d20fd87d720ddcb8b0f4c6808a8c163714 (patch) | |
tree | 402d61e3e7ce861f0eff146274f3c98f1a075016 /source/blender/python | |
parent | 6b3935f8eb0c1bf59adb948e101e326ed7f67dd6 (diff) |
- made epydoc generator write a list of words used in descriptions
- fix spelling mistakes in rna docs (and some comments)
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/epy_doc_gen.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/python/epy_doc_gen.py b/source/blender/python/epy_doc_gen.py index 9d4c25dd513..a108929febc 100644 --- a/source/blender/python/epy_doc_gen.py +++ b/source/blender/python/epy_doc_gen.py @@ -57,6 +57,7 @@ def rna2epy(target_path): rna_full_path_dict = {} # store the result of full_rna_struct_path(rna_struct) rna_children_dict = {} # store all rna_structs nested from here rna_references_dict = {} # store a list of rna path strings that reference this type + rna_words = set() def write_struct(rna_struct, ident): identifier = rna_struct.identifier @@ -71,11 +72,11 @@ def rna2epy(target_path): out.write(ident+ '\t"""\n') title = 'The %s Object' % rna_struct.name - + description = rna_struct.description out.write(ident+ '\t%s\n' % title) out.write(ident+ '\t%s\n' % ('=' * len(title))) - out.write(ident+ '\t\t%s\n' % rna_struct.description) - + out.write(ident+ '\t\t%s\n' % description) + rna_words.update(description.split()) # For convenience, give a list of all places were used. @@ -105,6 +106,8 @@ def rna2epy(target_path): continue rna_desc = rna_prop.description + + if rna_desc: rna_words.update(rna_desc.split()) if not rna_desc: rna_desc = rna_prop.name if not rna_desc: rna_desc = 'Note - No documentation for this property!' @@ -322,6 +325,16 @@ def rna2epy(target_path): # # We could also just run.... # os.system('dot source/blender/python/doc/rna.dot -Tsvg -o ./source/blender/python/doc/rna.svg') + + out= open(target_path.replace('.py', '.words'), 'w') + rna_words = list(rna_words) + rna_words.sort() + for w in rna_words: + out.write('%s\n' % w) + + + + def op2epy(target_path): out = open(target_path, 'w') |