Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion novem/cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

Expand Down
3 changes: 3 additions & 0 deletions novem/cli/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions novem/tags/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down