diff --git a/src/scancode/format.py b/src/scancode/format.py index c5d0fba8d1d..0c3a42ff37c 100644 --- a/src/scancode/format.py +++ b/src/scancode/format.py @@ -132,8 +132,6 @@ def as_html(detected_data): template = get_html_template('html') converted = OrderedDict() - converted_infos = OrderedDict() - converted_packages = OrderedDict() licenses = {} # Create a dict keyed by location @@ -160,22 +158,11 @@ def as_html(detected_data): if entry['key'] not in licenses: licenses[entry['key']] = entry + if results: converted[location] = sorted(results, key=itemgetter('start')) - if 'infos' in scan_result: - converted_infos[location] = scan_result['infos'] - - if 'packages' in scan_result: - converted_packages[location] = scan_result['packages'] - licenses = OrderedDict(sorted(licenses.items())) - results = { - "license_copyright": converted, - "infos": converted_infos, - "packages": converted_packages - } - - return template.render(results=results, licenses=licenses) + return template.render(results=converted, licenses=licenses) diff --git a/src/scancode/templates/html/template.html b/src/scancode/templates/html/template.html index e49e33a3c37..9f89f162cd8 100644 --- a/src/scancode/templates/html/template.html +++ b/src/scancode/templates/html/template.html @@ -64,7 +64,6 @@ - {% if results.license_copyright %} @@ -76,7 +75,7 @@ - {% for location, data in results.license_copyright.items() %} + {% for location, data in results.items() %} {% for row in data %} @@ -93,87 +92,6 @@ {% endfor %}
{{ location }}
- {% endif %} - - {% if results.infos %} - - - - - - - - - - - - - - - - - - - - - - - - - - {% for location, data in results.infos.items() %} - {% for row in data %} - - - - - - - - - - - - - - - - - - - - - {% endfor %} - {% endfor %} - -
File Information
locationtypenameextensiondatesizesha1md5files_countmime_typefile_typeprogramming_languageis_binaryis_textis_archiveis_mediais_sourceis_script
{{ location }}{{ row.type }}{{ row.name }}{{ row.extension }}{{ row.date }}{{ row.size }}{{ row.sha1 }}{{ row.md5 }}{{ row.file_count }}{{ row.mime_type }}{{ row.file_type }}{{ row.programming_language }}{{ row.is_binary }}{{ row.is_text }}{{ row.is_archive }}{{ row.is_media }}{{ row.is_source }}{{ row.is_script }}
- {% endif %} - - {% if results.packages %} - - - - - - - - - - - - {% for location, data in results.packages.items() %} - {% for row in data %} - - - - - - - {% endfor %} - {% endfor %} - -
Package Information
locationtypepackagingprimary_language
{{ location }}{{ row.type }}{{ row.packaging }}{{ row.primary_language }}
- {% endif %} {% if licenses %}