Skip to content

Commit e812463

Browse files
committed
Add some better formatting
1 parent a1a59cf commit e812463

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tools/modules/print.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
def get_notes(module_metadata):
2929
tree = Tree('Notes', hide_root=True)
3030
for key, values in module_metadata.get('notes', {}).items():
31-
node = tree.add(key)
31+
node = tree.add(f"[italic]{key}[/italic]")
3232
for value in values:
3333
node.add(value)
3434
return tree
@@ -79,17 +79,17 @@ def main():
7979
table.add_column(justify='right')
8080
table.add_column()
8181

82-
table.add_row('[bold]Name[/bold]', module_metadata['name'])
83-
table.add_row('[bold]Module[/bold]', module_metadata['fullname'])
84-
table.add_row('[bold]Platform[/bold]', module_metadata['platform'])
85-
table.add_row('[bold]Arch[/bold]', module_metadata['arch'])
86-
table.add_row('[bold]Rank[/bold]', RANKS[module_metadata['rank']])
87-
table.add_row('[bold]Disclosed[/bold]', module_metadata['disclosure_date'])
82+
table.add_row('[bold yellow]Name[/bold yellow]', module_metadata['name'])
83+
table.add_row('[bold yellow]Module[/bold yellow]', module_metadata['fullname'])
84+
table.add_row('[bold yellow]Platform[/bold yellow]', module_metadata['platform'])
85+
table.add_row('[bold yellow]Arch[/bold yellow]', module_metadata['arch'])
86+
table.add_row('[bold yellow]Rank[/bold yellow]', RANKS[module_metadata['rank']])
87+
table.add_row('[bold yellow]Disclosed[/bold yellow]', module_metadata['disclosure_date'])
8888

8989
console = Console(color_system='256')
9090
console.print(table)
9191

92-
panel_title = lambda v: f"[bold]{v}[/bold]"
92+
panel_title = lambda v: f"[bold yellow]{v}[/bold yellow]"
9393
console.print(Panel(get_authors(module_metadata), title=panel_title('Provided by'), title_align='left'))
9494
console.print(Panel(get_notes(module_metadata), title=panel_title('Notes'), title_align='left'))
9595
if module_metadata.get('targets'):

0 commit comments

Comments
 (0)