diff options
Diffstat (limited to 'doc/tools/doc_merge.py')
-rw-r--r-- | doc/tools/doc_merge.py | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 6cc7019324..b55902ce4f 100644 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py @@ -30,7 +30,7 @@ def escape(ret): ret=ret.replace("'","'"); ret=ret.replace("\"","""); return ret - + def inc_tab(): global tab @@ -50,34 +50,34 @@ def get_tag(node,name): return tag def find_method_descr(old_class,name): - - methods = old_class.find("methods") + + methods = old_class.find("methods") if(methods!=None and len(list(methods))>0): for m in list(methods): if (m.attrib["name"]==name): description=m.find("description") if (description!=None and description.text.strip()!=""): return description.text - + return None def find_signal_descr(old_class,name): - - signals = old_class.find("signals") + + signals = old_class.find("signals") if(signals!=None and len(list(signals))>0): for m in list(signals): if (m.attrib["name"]==name): description=m.find("description") if (description!=None and description.text.strip()!=""): return description.text - + return None def find_constant_descr(old_class,name): if (old_class==None): - return None - constants = old_class.find("constants") + return None + constants = old_class.find("constants") if(constants!=None and len(list(constants))>0): for m in list(constants): if (m.attrib["name"]==name): @@ -98,31 +98,31 @@ def write_class(c): inherits=get_tag(c,"inherits") write_string(f,'<class name="'+class_name+'" '+category+inherits+'>') inc_tab() - + write_string(f,"<brief_description>") if (old_class!=None): old_brief_descr=old_class.find("brief_description") if (old_brief_descr!=None): write_string(f,escape(old_brief_descr.text.strip())) - - + + write_string(f,"</brief_description>") - + write_string(f,"<description>") if (old_class!=None): old_descr=old_class.find("description") if (old_descr!=None): write_string(f,escape(old_descr.text.strip())) - + write_string(f,"</description>") - methods = c.find("methods") + methods = c.find("methods") if(methods!=None and len(list(methods))>0): write_string(f,"<methods>") inc_tab() - + for m in list(methods): qualifiers=get_tag(m,"qualifiers") @@ -135,7 +135,7 @@ def write_class(c): write_string(f,'<return'+typ+'>'); write_string(f,'</return>'); elif (a.tag=="argument"): - + default=get_tag(a,"default") write_string(f,'<argument index="'+a.attrib["index"]+'" name="'+escape(a.attrib["name"])+'" type="'+a.attrib["type"]+'"' +default+'>'); @@ -146,20 +146,20 @@ def write_class(c): old_method_descr=find_method_descr(old_class,m.attrib["name"]) if (old_method_descr): write_string(f,escape(escape(old_method_descr.strip()))) - + write_string(f,'</description>'); - dec_tab() + dec_tab() write_string(f,"</method>") dec_tab() write_string(f,"</methods>") - signals = c.find("signals") + signals = c.find("signals") if(signals!=None and len(list(signals))>0): write_string(f,"<signals>") inc_tab() - - for m in list(signals): + + for m in list(signals): write_string(f,'<signal name="'+escape(m.attrib["name"])+'">') inc_tab() @@ -176,18 +176,18 @@ def write_class(c): if (old_signal_descr): write_string(f,escape(old_signal_descr.strip())) write_string(f,'</description>'); - dec_tab() + dec_tab() write_string(f,"</signal>") dec_tab() write_string(f,"</signals>") - constants = c.find("constants") + constants = c.find("constants") if(constants!=None and len(list(constants))>0): write_string(f,"<constants>") inc_tab() - - for m in list(constants): + + for m in list(constants): write_string(f,'<constant name="'+escape(m.attrib["name"])+'" value="'+m.attrib["value"]+'">') old_constant_descr=find_constant_descr(old_class,m.attrib["name"]) |