Compare commits
No commits in common. "develop" and "0.1.0a1" have entirely different histories.
3 changed files with 8 additions and 17 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 0.1.0a2 (2026-01-01)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- github: enter in table is <br/>
|
|
||||||
|
|
||||||
## 0.1.0a1 (2025-12-22)
|
## 0.1.0a1 (2025-12-22)
|
||||||
|
|
||||||
## 0.1.0a0 (2025-12-21)
|
## 0.1.0a0 (2025-12-21)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_table"
|
name = "rougail.output_table"
|
||||||
version = "0.1.0a2"
|
version = "0.1.0a1"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output table"
|
description = "Rougail output table"
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ from .__version__ import __version__
|
||||||
TABULATE = {"console": "plain",
|
TABULATE = {"console": "plain",
|
||||||
"html": "unsafehtml",
|
"html": "unsafehtml",
|
||||||
}
|
}
|
||||||
ENTER = {"github": '<br/>'}
|
|
||||||
|
|
||||||
|
|
||||||
class RougailOutputTable:
|
class RougailOutputTable:
|
||||||
|
|
@ -96,8 +95,7 @@ class RougailOutputTable:
|
||||||
if self.datas:
|
if self.datas:
|
||||||
datas = []
|
datas = []
|
||||||
for data in self.datas.values():
|
for data in self.datas.values():
|
||||||
enter = ENTER.get(self.output_format, "\n")
|
datas.append(["\n".join(data.get(col, [])) for col in self.columns])
|
||||||
datas.append([enter.join(data.get(col, [])) for col in self.columns])
|
|
||||||
msg = (
|
msg = (
|
||||||
tabulate(
|
tabulate(
|
||||||
datas,
|
datas,
|
||||||
|
|
@ -125,15 +123,14 @@ class RougailOutputTable:
|
||||||
for col in self.columns:
|
for col in self.columns:
|
||||||
if col in tags:
|
if col in tags:
|
||||||
value = option.value.get()
|
value = option.value.get()
|
||||||
if self.first_column == 'namespace':
|
|
||||||
key = namespace
|
|
||||||
else:
|
|
||||||
key = option.description()
|
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
self.datas.setdefault(key, {}).setdefault(col, []).extend([str(val) for val in value])
|
self.datas.setdefault(namespace, {}).setdefault(col, []).extend([str(val) for val in value])
|
||||||
else:
|
else:
|
||||||
self.datas.setdefault(key, {}).setdefault(col, []).append(str(value))
|
self.datas.setdefault(namespace, {}).setdefault(col, []).append(str(value))
|
||||||
self.datas[key][self.first_column] = [key]
|
if self.first_column == 'namespace':
|
||||||
|
self.datas[namespace]["namespace"] = [namespace]
|
||||||
|
else:
|
||||||
|
self.datas[namespace]["description"] = [option.description()]
|
||||||
|
|
||||||
|
|
||||||
RougailOutput = RougailOutputTable
|
RougailOutput = RougailOutputTable
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue