diff --git a/novem/cli/setup.py b/novem/cli/setup.py index 9d88b35..2c17edb 100644 --- a/novem/cli/setup.py +++ b/novem/cli/setup.py @@ -226,7 +226,7 @@ def setup(raw_args: Any = None) -> Tuple[Any, Dict[str, str]]: required=False, default="", nargs="?", - help="select a tag to operate on (fav, like, ignore, wip, archived, or +usertag), " + help="select a tag to operate on (fav, like, ignore, wip, archived, +usertag, or =categorytag), " "no parameter will list all current tags", ) diff --git a/novem/cli/vis.py b/novem/cli/vis.py index b9c5837..90281eb 100644 --- a/novem/cli/vis.py +++ b/novem/cli/vis.py @@ -348,6 +348,9 @@ def tag_pretty_print(iplist: List[Dict[str, str]], striped: bool = False) -> Non elif tag_name.startswith("+"): p["summary"] = "User-defined tag" p["type"] = "user" + elif tag_name.startswith("="): + p["summary"] = "Category tag" + p["type"] = "category" else: p["summary"] = "Custom tag" p["type"] = "custom" diff --git a/novem/tags/__init__.py b/novem/tags/__init__.py index cfcf4f8..53a6744 100644 --- a/novem/tags/__init__.py +++ b/novem/tags/__init__.py @@ -17,10 +17,11 @@ def is_valid_tag(tag: str) -> bool: Valid tags are: - One of: fav, like, ignore, wip, archived - Any string starting with + (user tag) + - Any string starting with = (category tag) """ if not tag: return False - return tag in VALID_TAGS or tag.startswith("+") + return tag in VALID_TAGS or tag.startswith("+") or tag.startswith("=") class NovemTags: @@ -30,7 +31,7 @@ class NovemTags: Novem tags are exposed at: f"{api._api_root}{tag_path}/tags" - Valid tags are: fav, like, ignore, wip, archived, or any tag starting with + (user tag) + Valid tags are: fav, like, ignore, wip, archived, +usertag, or =categorytag """ def __init__(self, api: "NovemAPI", tag_path: str) -> None: