File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed
Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 11==============================
22Changelog
33
4- Next
5- Release 8.0.1
4+ 2023-xx-xx
5+ Release x.x.x
66
7- * Adopt 3.3.1 specification
8- * Introduce ``ignored_resources `` to ABOUT specification
7+ * The tool will now show which worksheet (if .xlsx input) is the tool working on
8+ * Error handling if defined worksheet does not exist
9+ * Adopt 3.3.1 specification: introduce ``ignored_resources ``
910
1011
11122023-03-09
Original file line number Diff line number Diff line change @@ -680,10 +680,16 @@ def load_excel(location, worksheet=None):
680680 # This is to prevent showing the: warn("Workbook contains no default style, apply openpyxl's default")
681681 with warnings .catch_warnings (record = True ):
682682 input_bom = openpyxl .load_workbook (location )
683+ sheetnames = input_bom .sheetnames
683684 if worksheet :
685+ if worksheet not in sheetnames :
686+ import sys
687+ print ("The input worksheet name does not exist. Exiting." )
688+ sys .exit (1 )
684689 sheet_obj = input_bom [worksheet ]
685690 else :
686691 sheet_obj = input_bom .active
692+ print ("Working on the " + sheet_obj .title + " worksheet." )
687693 max_col = sheet_obj .max_column
688694
689695 index = 1
Original file line number Diff line number Diff line change @@ -34,16 +34,16 @@ This document lists the open source and third-party components of a {{ vartext['
3434 <div id="group_{{ loop.index0 }}">
3535 <h3>{{ license.name }}</h3>
3636 <p>This product contains the following open source software packages licensed under the terms of the license: {{license.name}}</p>
37-
37+
3838 <div class="oss-component" id="component_{{ loop.index0 }}">
39- {%for about_object in abouts %}
39+ {%for about_object in abouts %}
4040 {% if loop.first %}
4141 {% if license.url %}
4242 <p>License Gallery URL: <a href="{{ license.url }}">{{license.url}}</a> </p>
4343 {% endif %}
4444 {% endif %}
4545 {% if license.key in about_object.license_key.value %}
46- <li>{{ about_object.name.value }}{% if about_object.version.value %} - Version {{ about_object.version.value }}{% endif %}</li>
46+ <li>{{ about_object.name.value }}{% if about_object.version.value %} - Version {{ about_object.version.value }}{% endif %}</li>
4747 {% if about_object.copyright.value %}
4848 <pre>Copyright: {{about_object.copyright.value}}</pre>
4949 {% endif %}
@@ -63,7 +63,7 @@ This document lists the open source and third-party components of a {{ vartext['
6363 </div>
6464 {% endfor %}
6565 <hr>
66- <hr>
66+ <hr>
6767<h3><a id="End">End</a></h3>
6868</body>
6969</html>
You can’t perform that action at this time.
0 commit comments