From 7aac2e37e07fa556e8a0fa3c25370e3da4b16534 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Mon, 17 Feb 2025 14:51:55 +0100 Subject: [PATCH] remove unused files --- app.py | 1 + src/templates/snippets/inventory.jinja | 48 ------------ src/templates/snippets/list-documents.jinja | 32 -------- src/templates/snippets/page-circuit.jinja | 13 ---- src/templates/snippets/page-cover.jinja | 24 ------ src/templates/snippets/page-detail.jinja | 84 --------------------- src/templates/snippets/page-front.jinja | 30 -------- src/templates/snippets/pages-nest.jinja | 14 ---- 8 files changed, 1 insertion(+), 245 deletions(-) delete mode 100644 src/templates/snippets/inventory.jinja delete mode 100644 src/templates/snippets/list-documents.jinja delete mode 100644 src/templates/snippets/page-circuit.jinja delete mode 100644 src/templates/snippets/page-cover.jinja delete mode 100644 src/templates/snippets/page-detail.jinja delete mode 100644 src/templates/snippets/page-front.jinja delete mode 100644 src/templates/snippets/pages-nest.jinja diff --git a/app.py b/app.py index b924c1b..989366b 100644 --- a/app.py +++ b/app.py @@ -269,6 +269,7 @@ def main(): print("rendering posts", path) render_posts(path) elif Path(path).suffix == '.md': + print("rendering single post", path) render_single_file(get_page_data(path), path, OUTPUT_D) elif Path(path).suffix in [".csv"]: print("not compiling this file!") diff --git a/src/templates/snippets/inventory.jinja b/src/templates/snippets/inventory.jinja deleted file mode 100644 index 19f0fad..0000000 --- a/src/templates/snippets/inventory.jinja +++ /dev/null @@ -1,48 +0,0 @@ -{%- macro inventory(compare, compareWith) -%} -{%- set ns = namespace(has_inventory=false) -%} -{%- for item in documents.inventory -%} - {%- if (item[compare]) -%} - {%- if (item[compare].capitalize() | slugify) == (compareWith.capitalize() | slugify) -%} - {%- set ns.has_inventory = true -%} - - {%- endif -%} - {%- endif -%} -{%- endfor -%} - -{%- if ns.has_inventory -%} - - - - - - - - - - - - {%- for item in documents.inventory -%} - {%- if (item[compare]) -%} - {%- if (item[compare].capitalize() | slugify)== compareWith -%} - - - - - - - - - - {%- endif -%} - {%- else -%} - other {{compare}} {{item}} - {%- endif -%} - {%- endfor -%} - - -
NameValuetypeWhereWhen
{{item.Name}}{{item.Value}}{{item.type}}{{item.Where}}{{item.Date}}
- -{%- else -%} - No components were identified yet {{compare}} {{compareWith}} -{%- endif -%} -{%- endmacro -%} \ No newline at end of file diff --git a/src/templates/snippets/list-documents.jinja b/src/templates/snippets/list-documents.jinja deleted file mode 100644 index 13e6d9c..0000000 --- a/src/templates/snippets/list-documents.jinja +++ /dev/null @@ -1,32 +0,0 @@ - -{% if documents[type]|length > 0 %} - -{% endif %} \ No newline at end of file diff --git a/src/templates/snippets/page-circuit.jinja b/src/templates/snippets/page-circuit.jinja deleted file mode 100644 index 66afa27..0000000 --- a/src/templates/snippets/page-circuit.jinja +++ /dev/null @@ -1,13 +0,0 @@ -{%- macro showCircuit(content) -%} - {% if content['pcb'] %} -
-
-

Paper circuit: {{content['title']}}

-
- -
- -
-
-{% endif %} -{%- endmacro -%} diff --git a/src/templates/snippets/page-cover.jinja b/src/templates/snippets/page-cover.jinja deleted file mode 100644 index 399bddd..0000000 --- a/src/templates/snippets/page-cover.jinja +++ /dev/null @@ -1,24 +0,0 @@ -{% from 'snippets/page-detail.jinja' import showDetail with context %} -{% from 'snippets/page-front.jinja' import pageFront with context %} -{% from 'snippets/page-circuit.jinja' import showCircuit with context %} - - -{%- macro showCoverPage(chapter, documents, index) -%} -
- {{chapter['title']}} -
-
- -

Chapter {{index}}

-

{{chapter['title']}}

- - {% if chapter['nested'] %} - - - {% endif %} -
-{%- endmacro -%} \ No newline at end of file diff --git a/src/templates/snippets/page-detail.jinja b/src/templates/snippets/page-detail.jinja deleted file mode 100644 index a638b41..0000000 --- a/src/templates/snippets/page-detail.jinja +++ /dev/null @@ -1,84 +0,0 @@ -{%- macro showDetail(content, parentChapter) -%} -
-
- {{content['title']}} -
- -
- -

[[chapter title]]

- -

{{content['title']}}

- - {% if content['alsoKnownAs'] %} -
Also known as {{content['alsoKnownAs']}}
- {% endif %} - - {% if content['shortDescription'] %} -

{{content['shortDescription'] }}

- {% endif %} - - {% if content['sample'] %} -
- - - - - - - - - - - -
- - - {% endif %} -
-{% if content['BOM'] %} - -{% endif %} -
- {{content['body']}} -
- - {% if content['image'] %}{% endif %} {% if content['material'] %} - -
-
Material
-
{{content['material']}}
-
Usage
-
{{content['usage']}}
-
Typically found in
-
{{content['whereToFind']}}
- {% if content['schematicSymbol'] %} -
Schematic symbol
-
- {% endif %} -
- {% endif %} -
-{%- endmacro -%} diff --git a/src/templates/snippets/page-front.jinja b/src/templates/snippets/page-front.jinja deleted file mode 100644 index a7f81ba..0000000 --- a/src/templates/snippets/page-front.jinja +++ /dev/null @@ -1,30 +0,0 @@ -{%- macro showFront(content) -%} -
-
- {{detail['title']}} -
-
-

{{detail['title']}}

-
Also known as {{detail['alsoKnownAs']}}
-
- - {% if detail['image'] %}{% endif %} - -
-
Material
-
{{detail['material']}}
-
Usage
-
{{detail['usage']}}
-
Typically found in
-
{{detail['whereToFind']}}
- {% if detail['schematicSymbol'] %} -
Schematic symbol
-
- {% endif %} -
- - - {{detail['body']}} - -
- {%- endmacro -%} diff --git a/src/templates/snippets/pages-nest.jinja b/src/templates/snippets/pages-nest.jinja deleted file mode 100644 index b417f87..0000000 --- a/src/templates/snippets/pages-nest.jinja +++ /dev/null @@ -1,14 +0,0 @@ -{% from 'snippets/page-detail.jinja' import showDetail with context %} -{% from 'snippets/page-front.jinja' import pageFront with context %} -{% from 'snippets/page-circuit.jinja' import showCircuit with context %} - - -{%- macro showNestedPages(chapter, documents) -%} - {% if chapter['nested']%} -
{{ documents[chapter['nested']]|length }} 
- {% for nest in documents[chapter['nested']] %} - {{ showDetail(nest, chapter) }} - {{ showCircuit(nest) }} - {% endfor %} - {% endif %} -{%- endmacro -%} \ No newline at end of file