From d8f36b6534bca369b4f02ebb68010e0ade153743 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 18 Jun 2022 16:59:49 +0300 Subject: [PATCH] Minor improvements to pkg show layout --- platformio/package/commands/show.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/platformio/package/commands/show.py b/platformio/package/commands/show.py index 82b6e47c..bf2d1f65 100644 --- a/platformio/package/commands/show.py +++ b/platformio/package/commands/show.py @@ -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 click.echo() click.echo(data["description"]) @@ -87,7 +79,17 @@ def package_show_cmd(spec, pkg_type): ("frameworks", "Compatible Frameworks"), ("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: if "." in key: k1, k2 = key.split(".")