From c102ac6126851cc047ea0a48db60c3260f0f9da0 Mon Sep 17 00:00:00 2001 From: okaits7534 Date: Fri, 30 Jun 2023 21:55:19 +0900 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E8=89=B2=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 95ee0f7..db9fa1d 100644 --- a/main.py +++ b/main.py @@ -75,9 +75,9 @@ def counts_comparing(label: str, count: int, count_before: Union[int, type(None) elif count == count_before: return f'{label}: {count:,}' elif count > count_before: - return f'{label}: {count:,} (+{count - count_before:,})' + return f'{label}: {count:,}' + colors.cyan(f' (+{count - count_before:,})') else: - return f'{label}: {count:,} ({count - count_before:,})' + return f'{label}: {count:,}' + colors.red(f' ({count - count_before:,})') def main(): """ Main func """ @@ -134,7 +134,7 @@ def main(): print(counts_comparing('Likes ', data.counts.likes)) print(colors.cyan('== Tags ==')) for tag in data.tags: - print(f'Tag: {tag.name}', '(Locked)' if tag.locked else '') + print(f'Tag: {tag.name}', colors.yellow('[Locked]') if tag.locked else '') if args.log: logdata = vars(data) logdata["datetime"] = datetime.datetime.now() @@ -197,7 +197,7 @@ def main(): print(colors.cyan('== Tags ==')) for tag in record["tags"]: if tag['locked']: - print(f'Tag: {tag["name"]} [Locked]') + print(f'Tag: {tag["name"]}', colors.yellow('[Locked]')) else: print(f'Tag: {tag["name"]}')