--- Revision None +++ Revision 333637343261 @@ -0,0 +1,28 @@ + % for child in attributes['node'].children: + % if child.tagname == 'author': + + ${child.astext()} + % elif child.tagname == 'date': + nope + % else: + <% + name = child.children[0].astext() + value = child.children[1].astext() + %> + % if name == 'category': + + <% + cats = ['%s' % (cat, cat.capitalize()) + for cat in value.split(',')] + %> + ${' | '.join(cats)} + % elif name == 'level': + + Niveau: ${value.capitalize()} + % elif name == 'translator': + + author_id = strip_accents(value).lower().replace(' ', '_') + Traduction: ${value} + % endif + % endif +% endfor