From ed18df4678cddd3cbd1d944f0fd105291b052653 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sun, 5 Jan 2025 21:03:02 -0800 Subject: [PATCH] Allow printing combined CLI tags --- comictaggerlib/cli.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/comictaggerlib/cli.py b/comictaggerlib/cli.py index 5a42859..1b7f62d 100644 --- a/comictaggerlib/cli.py +++ b/comictaggerlib/cli.py @@ -330,6 +330,17 @@ class CLI: self.output(md) except Exception as e: logger.error("Failed to read tags from %s: %s", ca.path, e) + if not self.config.Auto_Tag__metadata.is_empty and not self.config.Runtime_Options__raw: + try: + md, tags_read = self.create_local_metadata( + ca, self.config.Runtime_Options__tags_read or list(tags.keys()) + ) + tags_read_names = ", ".join(["CLI"] + [tags[t].name() for t in tags_read]) + self.output(f"--------- Combined {tags_read_names} tags ---------") + self.output(md) + except Exception as e: + logger.error("Failed to read tags from %s: %s", ca.path, e) + return Result(Action.print, Status.success, ca.path, md=md) def delete_tags(self, ca: ComicArchive, tag_id: str) -> Status: