2 Commits

Author SHA1 Message Date
c910823173 version: v0.8.0 2024-06-25 00:38:26 +09:00
16686ce3c4 feat(result): return all tags 2024-06-25 00:38:14 +09:00
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "wdtagger"
version = "0.7.0"
version = "0.8.0"
description = ""
authors = ["Jianqi Pan <jannchie@gmail.com>"]
readme = "README.md"

View File

@ -162,6 +162,15 @@ class Result:
string = [x[0] for x in string]
return ", ".join(string)
@property
def all_tags(self) -> list[str]:
"""Return all tags as a list."""
return [self.rating] + list(self.general_tags) + list(self.character_tags)
@property
def all_tags_string(self) -> str:
return ", ".join(self.all_tags)
def __str__(self) -> str:
"""Return a formatted string representation of the tags and their ratings."""