Minor improvements to pkg show layout

This commit is contained in:
Ivan Kravets
2022-06-18 16:59:49 +03:00
parent 58d533a3bb
commit d8f36b6534

View File

@ -59,14 +59,6 @@ def package_show_cmd(spec, pkg_type):
) )
) )
click.echo()
type_plural = "libraries" if data["type"] == "library" else (data["type"] + "s")
click.secho(
"https://registry.platformio.org/%s/%s/%s"
% (type_plural, data["owner"]["username"], quote(data["name"])),
fg="blue",
)
# Description # Description
click.echo() click.echo()
click.echo(data["description"]) click.echo(data["description"])
@ -87,7 +79,17 @@ def package_show_cmd(spec, pkg_type):
("frameworks", "Compatible Frameworks"), ("frameworks", "Compatible Frameworks"),
("keywords", "Keywords"), ("keywords", "Keywords"),
] ]
extra = [] type_plural = "libraries" if data["type"] == "library" else (data["type"] + "s")
extra = [
(
"Registry",
click.style(
"https://registry.platformio.org/%s/%s/%s"
% (type_plural, data["owner"]["username"], quote(data["name"])),
fg="blue",
),
)
]
for key, title in fields: for key, title in fields:
if "." in key: if "." in key:
k1, k2 = key.split(".") k1, k2 = key.split(".")