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.0a0 (2025-12-21)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail.output_table"
|
||||
version = "0.1.0a2"
|
||||
version = "0.1.0a1"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "Rougail output table"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ from .__version__ import __version__
|
|||
TABULATE = {"console": "plain",
|
||||
"html": "unsafehtml",
|
||||
}
|
||||
ENTER = {"github": '<br/>'}
|
||||
|
||||
|
||||
class RougailOutputTable:
|
||||
|
|
@ -96,8 +95,7 @@ class RougailOutputTable:
|
|||
if self.datas:
|
||||
datas = []
|
||||
for data in self.datas.values():
|
||||
enter = ENTER.get(self.output_format, "\n")
|
||||
datas.append([enter.join(data.get(col, [])) for col in self.columns])
|
||||
datas.append(["\n".join(data.get(col, [])) for col in self.columns])
|
||||
msg = (
|
||||
tabulate(
|
||||
datas,
|
||||
|
|
@ -125,15 +123,14 @@ class RougailOutputTable:
|
|||
for col in self.columns:
|
||||
if col in tags:
|
||||
value = option.value.get()
|
||||
if self.first_column == 'namespace':
|
||||
key = namespace
|
||||
else:
|
||||
key = option.description()
|
||||
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:
|
||||
self.datas.setdefault(key, {}).setdefault(col, []).append(str(value))
|
||||
self.datas[key][self.first_column] = [key]
|
||||
self.datas.setdefault(namespace, {}).setdefault(col, []).append(str(value))
|
||||
if self.first_column == 'namespace':
|
||||
self.datas[namespace]["namespace"] = [namespace]
|
||||
else:
|
||||
self.datas[namespace]["description"] = [option.description()]
|
||||
|
||||
|
||||
RougailOutput = RougailOutputTable
|
||||
|
|
|
|||
Loading…
Reference in a new issue