diff -r 7685cec9fd3c -r f2ddfa555b0f doc/api/python/helium.documentation-pysrc.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/api/python/helium.documentation-pysrc.html Fri Sep 11 11:54:49 2009 +0100
@@ -0,0 +1,214 @@
+
+
+
+
+ helium.documentation
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20 """ Helium API documentation processing. """
+21
+22 from lxml import etree
+23
+24
+
26 """ Creates an XML delta of the Helium API between releases. """
+
27 - def __init__ ( self , old_database , new_database ) :
+
28 """ Initialisation. """
+
29 self . old_database = old_database
+
30 self . new_database = new_database
+
31
+
33 """ Write the API delta information to an XML file. """
+
34 root = etree . Element ( 'apiChanges' )
+
35
+
36 old_db = etree . parse ( self . old_database )
+
37 new_db = etree . parse ( self . new_database )
+
38
+
39
+
40 old_macro_names = set ( [ macro [ 0 ] . text for macro in old_db . findall ( '/project/macro' ) ] )
+
41 new_macro_names = set ( [ macro [ 0 ] . text for macro in new_db . findall ( '/project/macro' ) ] )
+
42
+
43 old_target_names = set ( [ target [ 0 ] . text for target in old_db . findall ( '/project/target' ) ] )
+
44 new_target_names = set ( [ target [ 0 ] . text for target in new_db . findall ( '/project/target' ) ] )
+
45
+
46 old_property_names = set ( [ property [ 0 ] . text for property in old_db . findall ( '/project/property' ) ] )
+
47 new_property_names = set ( [ property [ 0 ] . text for property in new_db . findall ( '/project/property' ) ] )
+
48
+
49 old_project_names = set ( [ project [ 0 ] . text for project in old_db . findall ( '/project' ) ] )
+
50 new_project_names = set ( [ project [ 0 ] . text for project in new_db . findall ( '/project' ) ] )
+
51
+
52 projects_removed = old_project_names . difference ( new_project_names )
+
53 for project in projects_removed :
+
54 project_element = etree . SubElement ( root , 'project' , attrib = { 'state' : 'removed' } )
+
55 project_element . text = project
+
56 projects_added = new_project_names . difference ( old_project_names )
+
57 for project in projects_added :
+
58 project_element = etree . SubElement ( root , 'project' , attrib = { 'state' : 'added' } )
+
59 project_element . text = project
+
60
+
61 propertys_removed = old_property_names . difference ( new_property_names )
+
62 for property in propertys_removed :
+
63 property_element = etree . SubElement ( root , 'property' , attrib = { 'state' : 'removed' } )
+
64 property_element . text = property
+
65 propertys_added = new_property_names . difference ( old_property_names )
+
66 for property in propertys_added :
+
67 property_element = etree . SubElement ( root , 'property' , attrib = { 'state' : 'added' } )
+
68 property_element . text = property
+
69
+
70 macros_removed = old_macro_names . difference ( new_macro_names )
+
71 for macro in macros_removed :
+
72 macro_element = etree . SubElement ( root , 'macro' , attrib = { 'state' : 'removed' } )
+
73 macro_element . text = macro
+
74 macros_added = new_macro_names . difference ( old_macro_names )
+
75 for macro in macros_added :
+
76 macro_element = etree . SubElement ( root , 'macro' , attrib = { 'state' : 'added' } )
+
77 macro_element . text = macro
+
78 targets_removed = old_target_names . difference ( new_target_names )
+
79
+
80 for target in targets_removed :
+
81 target_element = etree . SubElement ( root , 'target' , attrib = { 'state' : 'removed' } )
+
82 target_element . text = target
+
83 targets_added = new_target_names . difference ( old_target_names )
+
84 for target in targets_added :
+
85 target_element = etree . SubElement ( root , 'target' , attrib = { 'state' : 'added' } )
+
86 target_element . text = target
+
87
+
88 etree . dump ( root )
+
89 tree = etree . ElementTree ( root )
+
90 tree . write ( path , pretty_print = True )
+
91
+
+
+
+
+
+
+
+
+
+