From 0c27c95a9c55b82b2c7e5e90b885c87578e895d0 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 27 Jul 2013 09:32:03 +0200 Subject: move templates to dedup package They cluttered webapp.py and now vim can give proper highlighting for the templates. --- dedup/templates/base.html | 22 ++++++++++++++++++++++ dedup/templates/binary.html | 31 +++++++++++++++++++++++++++++++ dedup/templates/compare.html | 27 +++++++++++++++++++++++++++ dedup/templates/hash.html | 12 ++++++++++++ dedup/templates/index.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ dedup/templates/source.html | 15 +++++++++++++++ 6 files changed, 151 insertions(+) create mode 100644 dedup/templates/base.html create mode 100644 dedup/templates/binary.html create mode 100644 dedup/templates/compare.html create mode 100644 dedup/templates/hash.html create mode 100644 dedup/templates/index.html create mode 100644 dedup/templates/source.html (limited to 'dedup/templates') diff --git a/dedup/templates/base.html b/dedup/templates/base.html new file mode 100644 index 0000000..4e49d47 --- /dev/null +++ b/dedup/templates/base.html @@ -0,0 +1,22 @@ + + + + {% block title %}{% endblock %} + + + + {% block header %}{% endblock %} + + +{% block content %} +{% endblock %} +
+

Details about this service

+ + + diff --git a/dedup/templates/binary.html b/dedup/templates/binary.html new file mode 100644 index 0000000..59c910c --- /dev/null +++ b/dedup/templates/binary.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} +{% block title %}duplication of {{ package|e }}{% endblock %} +{% block content %}

{{ package|e }}

+

Version: {{ version|e }}

+

Architecture: {{ architecture|e }}

+

Number of files: {{ num_files }}

+

Total size: {{ total_size|filesizeformat }}

+{%- if shared -%} + {%- for function, sharing in shared.items() -%} +

sharing with respect to {{ function|e }}

+ + {%- for entry in sharing|sort(attribute="savable", reverse=true) -%} + + {%- if entry.package %}{{ entry.package|e }}{% else %}self{% endif -%} + compare + + + {%- endfor -%} +
packagefiles shareddata shared
{{ entry.duplicate }} ({{ (100 * entry.duplicate / num_files)|int }}%){{ entry.savable|filesizeformat }} ({{ (100 * entry.savable / total_size)|int }}%)
+ {%- endfor -%} +

Note: Packages with yellow background are required to be installed when this package is installed.

+{%- endif -%} +{%- if issues -%} +

issues with particular files

+ + {%- for filename, issue in issues|dictsort(true) -%} + + {%- endfor -%} +
filenameissue
{{ filename|e }}{{ issue|e }}
+{%- endif -%} +{% endblock %} diff --git a/dedup/templates/compare.html b/dedup/templates/compare.html new file mode 100644 index 0000000..f78e80f --- /dev/null +++ b/dedup/templates/compare.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} +{% block title %}sharing between {{ details1.package|e }} and {{ details2.package|e }}{% endblock%} +{% block content %} +

{{ details1.package|e }} <-> {{ details2.package|e }}

+

Version of {{ details1.package|e }}: {{ details1.version|e }}

+

Architecture of {{ details1.package|e }}: {{ details1.architecture|e }}

+{%- if details1.package != details2.package -%} +

Version of {{ details2.package|e }}: {{ details2.version|e }}

+

Architecture of {{ details2.package|e }}: {{ details2.architecture|e }}

+{%- endif -%} + + +{%- for entry in shared -%} + 1 %} rowspan={{ entry.matches|length }}{% endif %}>{{ entry.size|filesizeformat }} 1 %} rowspan={{ entry.matches|length }}{% endif %}> + {%- for filename in entry.filenames %}{{ filename|e }}{% endfor -%} + {%- endfor -%} +{%- endfor -%} +
{{ details1.package|e }}{{ details2.package|e }}
sizefilenamehash functionsfilename
+ {% for filename, match in entry.matches.items() -%} + {% if not loop.first %}
{% endif -%} + {%- for funccomb, hashvalue in match.items() -%} + {{ funccomb[0]|e }} + {%- if funccomb[0] != funccomb[1] %} -> {{ funccomb[1]|e }}{% endif %} + {%- if not loop.last %}, {% endif %} + {%- endfor -%} + {{ filename|e }}
+{% endblock %} diff --git a/dedup/templates/hash.html b/dedup/templates/hash.html new file mode 100644 index 0000000..7141f96 --- /dev/null +++ b/dedup/templates/hash.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block title %}information on {{ function|e }} hash {{ hashvalue|e }}{% endblock %} +{% block content %} +

{{ function|e }} {{ hashvalue|e }}

+ +{%- for entry in entries -%} + + + +{%- endfor -%} +
packagefilenamesizedifferent function
{{ entry.package|e }}{{ entry.filename|e }}{{ entry.size|filesizeformat }}{% if function != entry.function %}{{ entry.function|e }}{% endif %}
+{% endblock %} diff --git a/dedup/templates/index.html b/dedup/templates/index.html new file mode 100644 index 0000000..7c9000f --- /dev/null +++ b/dedup/templates/index.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} +{% block title %}Debian duplication detector{% endblock %} +{% block header %} + +{% endblock %} +{% block content %} +

Debian duplication detector

+ +{% endblock %} diff --git a/dedup/templates/source.html b/dedup/templates/source.html new file mode 100644 index 0000000..fc679b0 --- /dev/null +++ b/dedup/templates/source.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}overview of {{ source|e }}{% endblock %} +{% block content %} +

overview of {{ source|e }}

+ +{%- for package, sharing in packages.items() -%} + +{%- endfor -%} +
binary from {{ source|e }}savableother package
{{ package|e }} + {%- if sharing -%} + {{ sharing.savable|filesizeformat }}{{ sharing.package|e }} compare + {%- else -%}{%- endif -%} +
+

Note: Not all sharing listed here. Click on binary packages with non-zero savable to see more.

+{% endblock %} -- cgit v1.2.3 From 6cbe2522ad85f51a8c2dbbdde0c8779ecb14ea45 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 30 Jul 2013 16:03:16 +0200 Subject: templates: wiki.d.o redirects to https now --- dedup/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dedup/templates') diff --git a/dedup/templates/base.html b/dedup/templates/base.html index 4e49d47..62f4087 100644 --- a/dedup/templates/base.html +++ b/dedup/templates/base.html @@ -13,7 +13,7 @@

Details about this service