From ce1dbda5b4144884db48aa9041db32a162b56e1c Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 23 May 2021 21:27:37 +0200 Subject: [PATCH] Overhaul colours "Crawled" and "Downloaded" are now printed less bright than "Crawling" and "Downloading" as they're not as important. Explain topics are printed in yellow to stand out a bit more from the cyan action messages. --- PFERD/crawl/crawler.py | 2 +- PFERD/logging.py | 2 +- PFERD/output_dir.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PFERD/crawl/crawler.py b/PFERD/crawl/crawler.py index 60ea708..cefefad 100644 --- a/PFERD/crawl/crawler.py +++ b/PFERD/crawl/crawler.py @@ -99,7 +99,7 @@ class CrawlToken(ReusableAsyncContextManager[ProgressBar]): async def _on_aenter(self) -> ProgressBar: bar_desc = f"[bold bright_cyan]Crawling[/] {escape(fmt_path(self._path))}" - after_desc = f"[bold bright_cyan]Crawled[/] {escape(fmt_path(self._path))}" + after_desc = f"[bold cyan]Crawled[/] {escape(fmt_path(self._path))}" self._stack.callback(lambda: log.action(after_desc)) await self._stack.enter_async_context(self._limiter.limit_crawl()) diff --git a/PFERD/logging.py b/PFERD/logging.py index e97a3fa..fc13e13 100644 --- a/PFERD/logging.py +++ b/PFERD/logging.py @@ -181,7 +181,7 @@ directly or as a GitHub issue: https://github.com/Garmelon/PFERD/issues/new """ if self.output_explain: - self.print(f"[cyan]{escape(text)}") + self.print(f"[yellow]{escape(text)}") def explain(self, text: str) -> None: """ diff --git a/PFERD/output_dir.py b/PFERD/output_dir.py index d60a312..cd68ead 100644 --- a/PFERD/output_dir.py +++ b/PFERD/output_dir.py @@ -399,7 +399,7 @@ class OutputDirectory: async def _after_download(self, info: DownloadInfo) -> None: with self._ensure_deleted(info.tmp_path): - log.action(f"[bold bright_cyan]Downloaded[/] {fmt_path(info.remote_path)}") + log.action(f"[bold cyan]Downloaded[/] {fmt_path(info.remote_path)}") log.explain_topic(f"Processing downloaded file for {fmt_path(info.path)}") changed = False