summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2019-10-03 20:18:54 +0200
committerDave Andreoli <dave@gurumeditation.it>2019-10-03 20:19:17 +0200
commitb12f07e52bf5d16595cc3ef120ecdc8c203437fc (patch)
tree37c6bcfb269058e81c76735841f3d9f53a09856e /src/scripts
parentbee2586b60e03738199023f250b1576042fcb982 (diff)
Pyolian gendoc: unbreak after recent eolian changes
shiny new generated documentation can be seen at: www.gurumeditation.it/dokuwiki_efl/
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/gendoc/doc_enum.template2
-rw-r--r--src/scripts/gendoc/doc_macros.include4
-rwxr-xr-xsrc/scripts/gendoc/gendoc.py20
-rw-r--r--src/scripts/pyolian/eolian.py2
-rwxr-xr-xsrc/scripts/pyolian/generator.py2
-rw-r--r--src/scripts/pyolian/test_gen_class.template3
-rw-r--r--src/scripts/pyolian/test_gen_namespace.template2
7 files changed, 18 insertions, 17 deletions
diff --git a/src/scripts/gendoc/doc_enum.template b/src/scripts/gendoc/doc_enum.template
index bdbb37a527..f7a11ee6c4 100644
--- a/src/scripts/gendoc/doc_enum.template
+++ b/src/scripts/gendoc/doc_enum.template
@@ -33,7 +33,7 @@ enum {
33<code> 33<code>
34typedef enum { 34typedef enum {
35<!--(for field in enum.enum_fields)--> 35<!--(for field in enum.enum_fields)-->
36 ${field.c_name}$ = ${field.value.serialize}$, 36 ${field.c_constant}$ = ${field.value.serialize}$,
37<!--(end)--> 37<!--(end)-->
38} ${enum.name.replace('.', '_')}$; 38} ${enum.name.replace('.', '_')}$;
39</code> 39</code>
diff --git a/src/scripts/gendoc/doc_macros.include b/src/scripts/gendoc/doc_macros.include
index 64b5311e5a..507693179a 100644
--- a/src/scripts/gendoc/doc_macros.include
+++ b/src/scripts/gendoc/doc_macros.include
@@ -178,8 +178,8 @@ interface#!
178#!#### FUNC_SCOPE(func) ###################################################### 178#!#### FUNC_SCOPE(func) ######################################################
179#!############################################################################## 179#!##############################################################################
180<!--(macro FUNC_SCOPE)--> 180<!--(macro FUNC_SCOPE)-->
181 <!--(if func.is_class)--> 181 <!--(if func.is_static)-->
182 ''class method'' #! 182 ''static method'' #!
183 <!--(end)--> 183 <!--(end)-->
184 <!--(if func.type == Eolian_Function_Type.PROPERTY)--> 184 <!--(if func.type == Eolian_Function_Type.PROPERTY)-->
185 <!--(if func.getter_scope == Eolian_Object_Scope.PROTECTED)--> 185 <!--(if func.getter_scope == Eolian_Object_Scope.PROTECTED)-->
diff --git a/src/scripts/gendoc/gendoc.py b/src/scripts/gendoc/gendoc.py
index 2ebaa605d4..bee5161f0b 100755
--- a/src/scripts/gendoc/gendoc.py
+++ b/src/scripts/gendoc/gendoc.py
@@ -41,7 +41,7 @@ _choices = ['start', 'classes', 'enums', 'structs', 'aliases']
41parser.add_argument('--step', '-s', metavar='STEP', default=None, 41parser.add_argument('--step', '-s', metavar='STEP', default=None,
42 choices=_choices, 42 choices=_choices,
43 help='A single step to run (default to all), ' 43 help='A single step to run (default to all), '
44 'valid choices: '+ ', '.join(_choices)) 44 'valid choices: ' + ', '.join(_choices))
45args = parser.parse_args() 45args = parser.parse_args()
46 46
47 47
@@ -64,6 +64,8 @@ if not eolian_db.all_eo_files_parse():
64def cleanup_db(): 64def cleanup_db():
65 global eolian_db 65 global eolian_db
66 del eolian_db 66 del eolian_db
67
68
67atexit.register(cleanup_db) 69atexit.register(cleanup_db)
68 70
69 71
@@ -72,14 +74,14 @@ def page_path_for_object(obj):
72 path = ['data', 'pages', 'develop', 'api'] 74 path = ['data', 'pages', 'develop', 'api']
73 for ns in obj.namespaces: 75 for ns in obj.namespaces:
74 path.append(ns.lower()) 76 path.append(ns.lower())
75 output_file = obj.short_name.lower() + '.txt' 77 output_filename = obj.short_name.lower() + '.txt'
76 return os.path.join(args.root_path, *path, output_file) 78 return os.path.join(args.root_path, *path, output_filename)
77 79
78 80
79# render a (temporary) page for analizying the namespaces hierarchy 81# render a (temporary) page for analizying the namespaces hierarchy
80t = Template('namespaces.template') 82t = Template('namespaces.template')
81nspaces = [ ns for ns in eolian_db.all_namespaces 83nspaces = [ns for ns in eolian_db.all_namespaces
82 if ns.name.startswith(args.namespace) ] 84 if ns.name.startswith(args.namespace)]
83 85
84tot_classes = tot_regulars = tot_abstracts = tot_mixins = tot_ifaces = 0 86tot_classes = tot_regulars = tot_abstracts = tot_mixins = tot_ifaces = 0
85tot_enums = tot_structs = tot_aliases = 0 87tot_enums = tot_structs = tot_aliases = 0
@@ -113,7 +115,7 @@ totals = [
113 115
114root_ns = eolian_db.namespace_get_by_name(args.namespace) 116root_ns = eolian_db.namespace_get_by_name(args.namespace)
115 117
116output_file = os.path.join(args.root_path,'data','pages','develop','api','namespaces.txt') 118output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'namespaces.txt')
117t.render(output_file, args.verbose, root_ns=root_ns, totals=totals) 119t.render(output_file, args.verbose, root_ns=root_ns, totals=totals)
118 120
119 121
@@ -121,10 +123,10 @@ t.render(output_file, args.verbose, root_ns=root_ns, totals=totals)
121if args.step in ('start', None): 123if args.step in ('start', None):
122 t = Template('doc_start.template') 124 t = Template('doc_start.template')
123 125
124 nspaces = [ ns for ns in eolian_db.all_namespaces 126 nspaces = [ns for ns in eolian_db.all_namespaces
125 if ns.name.startswith(args.namespace) ] 127 if ns.name.startswith(args.namespace)]
126 128
127 output_file = os.path.join(args.root_path,'data','pages','develop','api','start.txt') 129 output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'start.txt')
128 t.render(output_file, args.verbose, nspaces=nspaces) 130 t.render(output_file, args.verbose, nspaces=nspaces)
129 131
130 132
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 2c23fa2c5b..a8b77e15e9 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -1154,7 +1154,7 @@ class Typedecl(Object):
1154 1154
1155class Enum_Type_Field(Object): 1155class Enum_Type_Field(Object):
1156 def __repr__(self): 1156 def __repr__(self):
1157 return "<eolian.Enum_Type_Field '{0.name}', c_name='{0.c_name}'>".format(self) 1157 return "<eolian.Enum_Type_Field '{0.name}', c_constant='{0.c_constant}'>".format(self)
1158 1158
1159 @cached_property 1159 @cached_property
1160 def c_constant(self): 1160 def c_constant(self):
diff --git a/src/scripts/pyolian/generator.py b/src/scripts/pyolian/generator.py
index 0b7e8024e3..28138f531f 100755
--- a/src/scripts/pyolian/generator.py
+++ b/src/scripts/pyolian/generator.py
@@ -141,7 +141,7 @@ class Template(pyratemp.Template):
141 'Eolian_Typedecl_Type': eolian.Eolian_Typedecl_Type, 141 'Eolian_Typedecl_Type': eolian.Eolian_Typedecl_Type,
142 'Eolian_Type_Type': eolian.Eolian_Type_Type, 142 'Eolian_Type_Type': eolian.Eolian_Type_Type,
143 'Eolian_Type_Builtin_Type': eolian.Eolian_Type_Builtin_Type, 143 'Eolian_Type_Builtin_Type': eolian.Eolian_Type_Builtin_Type,
144 'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type, 144 # 'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type,
145 'Eolian_Expression_Type': eolian.Eolian_Expression_Type, 145 'Eolian_Expression_Type': eolian.Eolian_Expression_Type,
146 'Eolian_Expression_Mask': eolian.Eolian_Expression_Mask, 146 'Eolian_Expression_Mask': eolian.Eolian_Expression_Mask,
147 'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator, 147 'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator,
diff --git a/src/scripts/pyolian/test_gen_class.template b/src/scripts/pyolian/test_gen_class.template
index cc0e845ab5..d53ae823e5 100644
--- a/src/scripts/pyolian/test_gen_class.template
+++ b/src/scripts/pyolian/test_gen_class.template
@@ -3,8 +3,7 @@
3Class: ${cls.name}$ (${cls.short_name}$) 3Class: ${cls.name}$ (${cls.short_name}$)
4================================================================================ 4================================================================================
5Class type: ${cls.type}$ 5Class type: ${cls.type}$
6Base Class: ${cls.base_class.name if cls.base_class else None}$ 6Parent: ${cls.parent.name if cls.parent else None}$
7Inherits: ${', '.join([i.name for i in cls.inherits])}$
8Hierarchy: ${' => '.join([i.name for i in cls.hierarchy])}$ 7Hierarchy: ${' => '.join([i.name for i in cls.hierarchy])}$
9InheritsFull: ${', '.join([i.name for i in cls.inherits_full])}$ 8InheritsFull: ${', '.join([i.name for i in cls.inherits_full])}$
10Namespace: ${cls.namespace}$ 9Namespace: ${cls.namespace}$
diff --git a/src/scripts/pyolian/test_gen_namespace.template b/src/scripts/pyolian/test_gen_namespace.template
index 8cdb4f7ca7..27e6dcb533 100644
--- a/src/scripts/pyolian/test_gen_namespace.template
+++ b/src/scripts/pyolian/test_gen_namespace.template
@@ -59,7 +59,7 @@ Enums:
59<!--(for typedecl in namespace.enums)--> 59<!--(for typedecl in namespace.enums)-->
60 * ${typedecl.name}$ 60 * ${typedecl.name}$
61 <!--(for field in typedecl.enum_fields)--> 61 <!--(for field in typedecl.enum_fields)-->
62 ${field.c_name}$ = ${field.value.serialize}$ 62 ${field.c_constant}$ = ${field.value.serialize}$
63 <!--(end)--> 63 <!--(end)-->
64<!--(else)--> 64<!--(else)-->
65 no enums available 65 no enums available