diff --git a/docs/images/icon_sources/file_bz2.svg b/docs/images/icon_sources/file_bz2.svg
new file mode 100644
index 00000000..5cbbac13
--- /dev/null
+++ b/docs/images/icon_sources/file_bz2.svg
@@ -0,0 +1,141 @@
+
+
diff --git a/docs/images/icon_sources/file_gz.svg b/docs/images/icon_sources/file_gz.svg
new file mode 100644
index 00000000..f0e09e62
--- /dev/null
+++ b/docs/images/icon_sources/file_gz.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/docs/images/icon_sources/file_rar.svg b/docs/images/icon_sources/file_rar.svg
new file mode 100644
index 00000000..1f877dbb
--- /dev/null
+++ b/docs/images/icon_sources/file_rar.svg
@@ -0,0 +1,145 @@
+
+
diff --git a/docs/images/icon_sources/file_tar.svg b/docs/images/icon_sources/file_tar.svg
new file mode 100644
index 00000000..52d43492
--- /dev/null
+++ b/docs/images/icon_sources/file_tar.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/docs/images/icon_sources/file_xz.svg b/docs/images/icon_sources/file_xz.svg
new file mode 100644
index 00000000..dea8bc46
--- /dev/null
+++ b/docs/images/icon_sources/file_xz.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/docs/images/icon_sources/file_zip.svg b/docs/images/icon_sources/file_zip.svg
new file mode 100644
index 00000000..4d17763e
--- /dev/null
+++ b/docs/images/icon_sources/file_zip.svg
@@ -0,0 +1,137 @@
+
+
diff --git a/docs/images/icon_sources/zip.svg b/docs/images/icon_sources/zip.svg
new file mode 100644
index 00000000..75c5b728
--- /dev/null
+++ b/docs/images/icon_sources/zip.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/kibot/images/file_bz2.svg b/kibot/images/file_bz2.svg
new file mode 100644
index 00000000..9e7f6cb0
--- /dev/null
+++ b/kibot/images/file_bz2.svg
@@ -0,0 +1,109 @@
+
+
diff --git a/kibot/images/file_gz.svg b/kibot/images/file_gz.svg
new file mode 100644
index 00000000..41a898ae
--- /dev/null
+++ b/kibot/images/file_gz.svg
@@ -0,0 +1,102 @@
+
+
diff --git a/kibot/images/file_rar.svg b/kibot/images/file_rar.svg
new file mode 100644
index 00000000..49393db5
--- /dev/null
+++ b/kibot/images/file_rar.svg
@@ -0,0 +1,113 @@
+
+
diff --git a/kibot/images/file_tar.svg b/kibot/images/file_tar.svg
new file mode 100644
index 00000000..50a1e14d
--- /dev/null
+++ b/kibot/images/file_tar.svg
@@ -0,0 +1,105 @@
+
+
diff --git a/kibot/images/file_xz.svg b/kibot/images/file_xz.svg
new file mode 100644
index 00000000..f4c6f08f
--- /dev/null
+++ b/kibot/images/file_xz.svg
@@ -0,0 +1,102 @@
+
+
diff --git a/kibot/images/file_zip.svg b/kibot/images/file_zip.svg
new file mode 100644
index 00000000..006818dd
--- /dev/null
+++ b/kibot/images/file_zip.svg
@@ -0,0 +1,105 @@
+
+
diff --git a/kibot/images/zip.svg b/kibot/images/zip.svg
new file mode 100644
index 00000000..cc640d8b
--- /dev/null
+++ b/kibot/images/zip.svg
@@ -0,0 +1,74 @@
+
+
diff --git a/kibot/out_compress.py b/kibot/out_compress.py
index e75d9082..7360359a 100644
--- a/kibot/out_compress.py
+++ b/kibot/out_compress.py
@@ -187,6 +187,20 @@ class CompressOptions(BaseOptions):
files, _ = self.get_files(output, no_out_run=True)
return files.keys()
+ def get_categories(self):
+ cats = set()
+ for f in self.files:
+ if f.from_output:
+ out = RegOutput.get_output(f.from_output)
+ if out is not None and out.category:
+ if isinstance(out.category, str):
+ cats.add(out.category)
+ else:
+ cats.update(out.category)
+ else:
+ cats.add('Compress')
+ return list(cats)
+
def run(self, output):
# Output file name
logger.debug('Collecting files')
@@ -234,5 +248,10 @@ class Compress(BaseOutput): # noqa: F821
# The help is inherited and already mentions the default priority
self.fix_priority_help()
+ def config(self, parent):
+ super().config(parent)
+ if self.category is None and not isinstance(self.options, type):
+ self.category = self.options.get_categories()
+
def get_dependencies(self):
return self.options.get_dependencies()
diff --git a/kibot/out_navigate_results.py b/kibot/out_navigate_results.py
index ad1f33d1..64b64b31 100644
--- a/kibot/out_navigate_results.py
+++ b/kibot/out_navigate_results.py
@@ -36,6 +36,7 @@ RegDependency.register(ToolDependency('navigate_results', 'ImageMagick', 'https:
logger = log.get_logger()
CAT_IMAGE = {'PCB': 'pcbnew',
'Schematic': 'eeschema',
+ 'Compress': 'zip',
'fabrication': 'fabrication',
'export': 'export',
'assembly': 'assembly_simple',
@@ -57,6 +58,7 @@ EXT_IMAGE = {'gbr': 'file_gbr',
'gm1': 'file_gbr',
'gbrjob': 'file_gerber_job',
'brd': 'file_brd',
+ 'bz2': 'file_bz2',
'dxf': 'file_dxf',
'cad': 'file_cad',
'drl': 'file_drl',
@@ -70,13 +72,18 @@ EXT_IMAGE = {'gbr': 'file_gbr',
'jpg': 'file_jpg',
'plt': 'file_plt',
'ps': 'file_ps',
+ 'rar': 'file_rar',
'step': 'file_stp',
'stp': 'file_stp',
'html': 'file_html',
'xml': 'file_xml',
'tsv': 'file_tsv',
'xlsx': 'file_xlsx',
- 'xyrs': 'file_xyrs'}
+ 'xyrs': 'file_xyrs',
+ 'xz': 'file_xz',
+ 'gz': 'file_gz',
+ 'tar': 'file_tar',
+ 'zip': 'file_zip'}
for i in range(31):
n = str(i)
EXT_IMAGE['gl'+n] = 'file_gbr'