diff options
| author | Louis Burda <dev@sinitax.com> | 2026-02-26 16:29:37 +0100 |
|---|---|---|
| committer | Louis Burda <dev@sinitax.com> | 2026-02-26 16:29:37 +0100 |
| commit | c9753f216c1be51c249e7c947cda8cb3d1a945d0 (patch) | |
| tree | 57970922d78d467cfbecc3e8ddefeb08ca43b6bc /src/tmview/output.py | |
| parent | 906424e8acb5adf1eff58c2f45b85616cb5651d7 (diff) | |
| download | tmview-py-main.tar.gz tmview-py-main.zip | |
Diffstat (limited to 'src/tmview/output.py')
| -rw-r--r-- | src/tmview/output.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tmview/output.py b/src/tmview/output.py index 55bc3a4..95dc471 100644 --- a/src/tmview/output.py +++ b/src/tmview/output.py @@ -50,13 +50,17 @@ def _format_fetched(iso: str) -> str: return f"[dim]{iso}[/dim]" -def print_table(result, query, verbose=False): +def print_table(result, query, verbose=False, image_path=None): trademarks = result["trademarks"] total = result["total"] page = result["page"] fetched_at = result.get("fetched_at", "") - header = f'Trademark Search: "{query}" — {total:,} result{"s" if total != 1 else ""} (page {page})' + if image_path: + from pathlib import Path + header = f'Similar logos to "{Path(image_path).name}" — {total:,} result{"s" if total != 1 else ""} (page {page})' + else: + header = f'Trademark Search: "{query}" — {total:,} result{"s" if total != 1 else ""} (page {page})' console.print(f"\n[bold]{header}[/bold]\n") if not trademarks: |
