Update project layout
This commit is contained in:
parent
ea70d9278e
commit
b777df7874
15 changed files with 127 additions and 107 deletions
|
|
@ -1,68 +0,0 @@
|
|||
{%- macro attributes(pageindex, page, layerindex, layer, elementindex, element) -%}
|
||||
{%- for key,value in element.attributes.items() %}
|
||||
ci p{{pageindex}}l{{layerindex}}e{{elementindex}}a{{loop.index}} : xournalpp:XMLAttribute [
|
||||
xournalpp:hasKey "{{key}}"
|
||||
xournalpp:hasValue "{{value}}"
|
||||
xournalpp:ofLayerElement p{{pageindex}}l{{layerindex}}e{{elementindex}}
|
||||
object_diagram:inModel model
|
||||
]
|
||||
{% endfor %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro elements(pageindex, page, layerindex, layer) -%}
|
||||
{% for el in layer.elements %}
|
||||
ci p{{pageindex}}l{{layerindex}}e{{loop.index}} : xournalpp:{{el.__class__.__name__}} [
|
||||
xournalpp:hasText "{{el.text}}"
|
||||
xournalpp:inLayer p{{pageindex}}l{{layerindex}}
|
||||
object_diagram:inModel model
|
||||
]
|
||||
{{ attributes(pageindex, page, layerindex, layer, loop.index, el) -}}
|
||||
{% endfor %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro layers(pageindex, page) -%}
|
||||
{% for layer in page.layers %}
|
||||
ci p{{pageindex}}l{{loop.index}} : xournalpp:Layer [
|
||||
xournalpp:inPage p{{pageindex}}
|
||||
object_diagram:inModel model
|
||||
]
|
||||
{{ elements(pageindex, page, loop.index, layer) -}}
|
||||
{% endfor %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro pages(file) -%}
|
||||
{% for page in file.pages -%}
|
||||
ci p{{loop.index}} : xournalpp:Page [
|
||||
xournalpp:hasWidth {{ page.width }}
|
||||
xournalpp:hasHeight {{ page.height }}
|
||||
xournalpp:hasBackgroundType "{{ page.background_type }}"
|
||||
xournalpp:hasBackgroundColor "{{ page.background_color }}"
|
||||
xournalpp:hasBackgroundStyle "{{ page.background_style }}"
|
||||
xournalpp:inFile file
|
||||
object_diagram:inModel model
|
||||
]
|
||||
{{ layers(loop.index, page) -}}
|
||||
{%- endfor %}
|
||||
{%- endmacro -%}
|
||||
// Warning: Generated code! Do not edit!
|
||||
// Input file: '{{inputfile}}'
|
||||
// Generator: https://msdl.uantwerpen.be/git/jexelmans/xopp2py
|
||||
description <http://flandersmake.be/cdf/description/{{namespace}}#> as {{namespace}} {
|
||||
|
||||
uses <http://flandersmake.be/cdf/vocabulary/xournalpp#> as xournalpp
|
||||
uses <http://flandersmake.be/cdf/vocabulary/object_diagram#> as object_diagram
|
||||
|
||||
ci model : xournalpp:Model []
|
||||
|
||||
ci file : xournalpp:File [
|
||||
xournalpp:hasCreator "{{ file.creator }}"
|
||||
xournalpp:hasFileVersion {{ file.fileversion }}
|
||||
xournalpp:hasTitle "{{ file.title }}"
|
||||
{%- if file.preview != None %}
|
||||
xournalpp:hasPreview "{{ toBase64(file.preview).decode('utf-8') }}"
|
||||
{%- endif %}
|
||||
object_diagram:inModel model
|
||||
]
|
||||
|
||||
{{ pages(file) }}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue