Reword some log messages

This commit is contained in:
Joscha 2021-05-24 13:17:28 +02:00
parent c687d4a51a
commit 1c1f781be4
2 changed files with 8 additions and 8 deletions

View File

@ -110,7 +110,7 @@ class Config:
""" """
if path: if path:
log.explain("Using custom path") log.explain("Path specified on CLI")
else: else:
log.explain("Using default path") log.explain("Using default path")
path = Config._default_path() path = Config._default_path()

View File

@ -80,7 +80,7 @@ class Pferd:
for name in self._crawlers_to_run: for name in self._crawlers_to_run:
section_name = f"crawl:{name}" section_name = f"crawl:{name}"
if section_name in self._crawlers: if section_name in self._crawlers:
log.explain(f"Found crawler section named {section_name!r}") log.explain(f"Crawler section named {section_name!r} exists")
names.append(section_name) names.append(section_name)
else: else:
log.explain(f"There's no crawler section named {section_name!r}") log.explain(f"There's no crawler section named {section_name!r}")
@ -128,16 +128,16 @@ class Pferd:
log.report("") log.report("")
log.report(f"[bold bright_cyan]Report[/] for {escape(name)}") log.report(f"[bold bright_cyan]Report[/] for {escape(name)}")
something_happened = False something_changed = False
for path in sorted(crawler.report.added_files): for path in sorted(crawler.report.added_files):
something_happened = True something_changed = True
log.report(f" [bold bright_green]Added[/] {fmt_path(path)}") log.report(f" [bold bright_green]Added[/] {fmt_path(path)}")
for path in sorted(crawler.report.changed_files): for path in sorted(crawler.report.changed_files):
something_happened = True something_changed = True
log.report(f" [bold bright_yellow]Changed[/] {fmt_path(path)}") log.report(f" [bold bright_yellow]Changed[/] {fmt_path(path)}")
for path in sorted(crawler.report.deleted_files): for path in sorted(crawler.report.deleted_files):
something_happened = True something_changed = True
log.report(f" [bold bright_magenta]Deleted[/] {fmt_path(path)}") log.report(f" [bold bright_magenta]Deleted[/] {fmt_path(path)}")
if not something_happened: if not something_changed:
log.report(" Nothing happened") log.report(" Nothing changed")