summaryrefslogtreecommitdiffstats
path: root/templates/txt.jinja2
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-01-20 18:51:27 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-01-20 18:51:27 +0000
commit7e055c6eaf4291539c77932b29b8db0cc42c5d8c (patch)
treee59febf7e5ae32578e9455ff86942057013f4270 /templates/txt.jinja2
parente39f4203ca1c08827bfe9b9a35c2034d71703624 (diff)
downloadSmarker-7e055c6eaf4291539c77932b29b8db0cc42c5d8c.tar.gz
Smarker-7e055c6eaf4291539c77932b29b8db0cc42c5d8c.zip
started work on templating
Diffstat (limited to 'templates/txt.jinja2')
-rw-r--r--templates/txt.jinja229
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/txt.jinja2 b/templates/txt.jinja2
new file mode 100644
index 0000000..1daf52a
--- /dev/null
+++ b/templates/txt.jinja2
@@ -0,0 +1,29 @@
+=== {{ name }} - Student ID: {{ student_no }} Automatic marking report ===
+
+== Class Tree: ==
+
+{{ recurse_class_tree_text(class_tree) }}
+
+== File Analysis ==
+{%- set flat_files = flatten_struct(files) %}
+{% for filename, files_contents in flat_files.items() %}
+ = {{ filename + " =" -}}
+ {%- if files_contents["present"] -%}
+ {% if "classes" in files_contents.keys() %}
+ Classes:
+ {%- set flat_classes = flatten_struct(files_contents["classes"]) -%}
+ {% for class_name, class_contents in flat_classes.items() %}
+ {{ class_name }}
+ {%- endfor -%}
+ {%- endif -%}
+ {% if "functions" in files_contents.keys() %}
+ Functions:
+ {%- set flat_functions = flatten_struct(files_contents["functions"]) -%}
+ {% for function_name, function_contents in flat_functions.items() %}
+ {{ function_name }}
+ {%- endfor -%}
+ {%- endif -%}
+ {% else %}
+ *** File not present ***
+ {% endif %}
+{% endfor %} \ No newline at end of file