forked from enlightenment/efl
Pyolian gendoc: unbreak after recent eolian changes
shiny new generated documentation can be seen at: www.gurumeditation.it/dokuwiki_efl/
This commit is contained in:
parent
bee2586b60
commit
b12f07e52b
|
@ -33,7 +33,7 @@ enum {
|
||||||
<code>
|
<code>
|
||||||
typedef enum {
|
typedef enum {
|
||||||
<!--(for field in enum.enum_fields)-->
|
<!--(for field in enum.enum_fields)-->
|
||||||
${field.c_name}$ = ${field.value.serialize}$,
|
${field.c_constant}$ = ${field.value.serialize}$,
|
||||||
<!--(end)-->
|
<!--(end)-->
|
||||||
} ${enum.name.replace('.', '_')}$;
|
} ${enum.name.replace('.', '_')}$;
|
||||||
</code>
|
</code>
|
||||||
|
|
|
@ -178,8 +178,8 @@ interface#!
|
||||||
#!#### FUNC_SCOPE(func) ######################################################
|
#!#### FUNC_SCOPE(func) ######################################################
|
||||||
#!##############################################################################
|
#!##############################################################################
|
||||||
<!--(macro FUNC_SCOPE)-->
|
<!--(macro FUNC_SCOPE)-->
|
||||||
<!--(if func.is_class)-->
|
<!--(if func.is_static)-->
|
||||||
''class method'' #!
|
''static method'' #!
|
||||||
<!--(end)-->
|
<!--(end)-->
|
||||||
<!--(if func.type == Eolian_Function_Type.PROPERTY)-->
|
<!--(if func.type == Eolian_Function_Type.PROPERTY)-->
|
||||||
<!--(if func.getter_scope == Eolian_Object_Scope.PROTECTED)-->
|
<!--(if func.getter_scope == Eolian_Object_Scope.PROTECTED)-->
|
||||||
|
|
|
@ -41,7 +41,7 @@ _choices = ['start', 'classes', 'enums', 'structs', 'aliases']
|
||||||
parser.add_argument('--step', '-s', metavar='STEP', default=None,
|
parser.add_argument('--step', '-s', metavar='STEP', default=None,
|
||||||
choices=_choices,
|
choices=_choices,
|
||||||
help='A single step to run (default to all), '
|
help='A single step to run (default to all), '
|
||||||
'valid choices: '+ ', '.join(_choices))
|
'valid choices: ' + ', '.join(_choices))
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ if not eolian_db.all_eo_files_parse():
|
||||||
def cleanup_db():
|
def cleanup_db():
|
||||||
global eolian_db
|
global eolian_db
|
||||||
del eolian_db
|
del eolian_db
|
||||||
|
|
||||||
|
|
||||||
atexit.register(cleanup_db)
|
atexit.register(cleanup_db)
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,14 +74,14 @@ def page_path_for_object(obj):
|
||||||
path = ['data', 'pages', 'develop', 'api']
|
path = ['data', 'pages', 'develop', 'api']
|
||||||
for ns in obj.namespaces:
|
for ns in obj.namespaces:
|
||||||
path.append(ns.lower())
|
path.append(ns.lower())
|
||||||
output_file = obj.short_name.lower() + '.txt'
|
output_filename = obj.short_name.lower() + '.txt'
|
||||||
return os.path.join(args.root_path, *path, output_file)
|
return os.path.join(args.root_path, *path, output_filename)
|
||||||
|
|
||||||
|
|
||||||
# render a (temporary) page for analizying the namespaces hierarchy
|
# render a (temporary) page for analizying the namespaces hierarchy
|
||||||
t = Template('namespaces.template')
|
t = Template('namespaces.template')
|
||||||
nspaces = [ ns for ns in eolian_db.all_namespaces
|
nspaces = [ns for ns in eolian_db.all_namespaces
|
||||||
if ns.name.startswith(args.namespace) ]
|
if ns.name.startswith(args.namespace)]
|
||||||
|
|
||||||
tot_classes = tot_regulars = tot_abstracts = tot_mixins = tot_ifaces = 0
|
tot_classes = tot_regulars = tot_abstracts = tot_mixins = tot_ifaces = 0
|
||||||
tot_enums = tot_structs = tot_aliases = 0
|
tot_enums = tot_structs = tot_aliases = 0
|
||||||
|
@ -113,7 +115,7 @@ totals = [
|
||||||
|
|
||||||
root_ns = eolian_db.namespace_get_by_name(args.namespace)
|
root_ns = eolian_db.namespace_get_by_name(args.namespace)
|
||||||
|
|
||||||
output_file = os.path.join(args.root_path,'data','pages','develop','api','namespaces.txt')
|
output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'namespaces.txt')
|
||||||
t.render(output_file, args.verbose, root_ns=root_ns, totals=totals)
|
t.render(output_file, args.verbose, root_ns=root_ns, totals=totals)
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,10 +123,10 @@ t.render(output_file, args.verbose, root_ns=root_ns, totals=totals)
|
||||||
if args.step in ('start', None):
|
if args.step in ('start', None):
|
||||||
t = Template('doc_start.template')
|
t = Template('doc_start.template')
|
||||||
|
|
||||||
nspaces = [ ns for ns in eolian_db.all_namespaces
|
nspaces = [ns for ns in eolian_db.all_namespaces
|
||||||
if ns.name.startswith(args.namespace) ]
|
if ns.name.startswith(args.namespace)]
|
||||||
|
|
||||||
output_file = os.path.join(args.root_path,'data','pages','develop','api','start.txt')
|
output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'start.txt')
|
||||||
t.render(output_file, args.verbose, nspaces=nspaces)
|
t.render(output_file, args.verbose, nspaces=nspaces)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1154,7 +1154,7 @@ class Typedecl(Object):
|
||||||
|
|
||||||
class Enum_Type_Field(Object):
|
class Enum_Type_Field(Object):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<eolian.Enum_Type_Field '{0.name}', c_name='{0.c_name}'>".format(self)
|
return "<eolian.Enum_Type_Field '{0.name}', c_constant='{0.c_constant}'>".format(self)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def c_constant(self):
|
def c_constant(self):
|
||||||
|
|
|
@ -141,7 +141,7 @@ class Template(pyratemp.Template):
|
||||||
'Eolian_Typedecl_Type': eolian.Eolian_Typedecl_Type,
|
'Eolian_Typedecl_Type': eolian.Eolian_Typedecl_Type,
|
||||||
'Eolian_Type_Type': eolian.Eolian_Type_Type,
|
'Eolian_Type_Type': eolian.Eolian_Type_Type,
|
||||||
'Eolian_Type_Builtin_Type': eolian.Eolian_Type_Builtin_Type,
|
'Eolian_Type_Builtin_Type': eolian.Eolian_Type_Builtin_Type,
|
||||||
'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type,
|
# 'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type,
|
||||||
'Eolian_Expression_Type': eolian.Eolian_Expression_Type,
|
'Eolian_Expression_Type': eolian.Eolian_Expression_Type,
|
||||||
'Eolian_Expression_Mask': eolian.Eolian_Expression_Mask,
|
'Eolian_Expression_Mask': eolian.Eolian_Expression_Mask,
|
||||||
'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator,
|
'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator,
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
Class: ${cls.name}$ (${cls.short_name}$)
|
Class: ${cls.name}$ (${cls.short_name}$)
|
||||||
================================================================================
|
================================================================================
|
||||||
Class type: ${cls.type}$
|
Class type: ${cls.type}$
|
||||||
Base Class: ${cls.base_class.name if cls.base_class else None}$
|
Parent: ${cls.parent.name if cls.parent else None}$
|
||||||
Inherits: ${', '.join([i.name for i in cls.inherits])}$
|
|
||||||
Hierarchy: ${' => '.join([i.name for i in cls.hierarchy])}$
|
Hierarchy: ${' => '.join([i.name for i in cls.hierarchy])}$
|
||||||
InheritsFull: ${', '.join([i.name for i in cls.inherits_full])}$
|
InheritsFull: ${', '.join([i.name for i in cls.inherits_full])}$
|
||||||
Namespace: ${cls.namespace}$
|
Namespace: ${cls.namespace}$
|
||||||
|
|
|
@ -59,7 +59,7 @@ Enums:
|
||||||
<!--(for typedecl in namespace.enums)-->
|
<!--(for typedecl in namespace.enums)-->
|
||||||
* ${typedecl.name}$
|
* ${typedecl.name}$
|
||||||
<!--(for field in typedecl.enum_fields)-->
|
<!--(for field in typedecl.enum_fields)-->
|
||||||
${field.c_name}$ = ${field.value.serialize}$
|
${field.c_constant}$ = ${field.value.serialize}$
|
||||||
<!--(end)-->
|
<!--(end)-->
|
||||||
<!--(else)-->
|
<!--(else)-->
|
||||||
no enums available
|
no enums available
|
||||||
|
|
Loading…
Reference in New Issue