Skip to content

Commit 938d9e5

Browse files
committed
fix: humanize date time in cli
1 parent 5ff8d5c commit 938d9e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/seadex/_cli/_entry.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from rich import box, print_json
55
from rich.console import Console, Group
66
from rich.table import Table
7+
from rich.theme import Theme
78

89
from seadex._entry import SeaDexEntry
910
from seadex._exceptions import EntryNotFoundError
@@ -33,7 +34,7 @@ def get_entry(title: str, /, *, json: bool = False, pretty: bool = False) -> Non
3334
If True, the JSON output will be pretty-printed.
3435
3536
"""
36-
console = Console()
37+
console = Console(theme=Theme({"repr.number": ""}))
3738

3839
with SeaDexEntry() as seadex_entry:
3940
try:
@@ -53,8 +54,8 @@ def get_entry(title: str, /, *, json: bool = False, pretty: bool = False) -> Non
5354
body = f"Title: {entry._anilist_title}\n" # type: ignore[attr-defined]
5455
body += f"URL: {entry.url}\n"
5556
body += f"AniList: https://anilist.co/anime/{entry.anilist_id}\n"
56-
body += f"Incomplete: {entry.is_incomplete}\n"
57-
body += f"Updated At: {entry.updated_at.strftime('%Y-%m-%d')}"
57+
body += f"Incomplete: {'Yes' if entry.is_incomplete else 'No'}\n"
58+
body += f"Updated At: {entry.updated_at.strftime('%b %d, %Y')}"
5859
if entry.theoretical_best is not None:
5960
body += f"\nTheoretical Best: {entry.theoretical_best}"
6061

0 commit comments

Comments
 (0)