continuing refactor

This commit is contained in:
2026-05-03 21:20:05 -07:00
parent 77cab1bd27
commit 5534812426
50 changed files with 1004 additions and 428 deletions
+7 -7
View File
@@ -82,7 +82,7 @@ class TagItem:
tag_name: str
tag_index: int # 1-based index for user reference
hash: Optional[str] = None
store: str = "hydrus"
instance: str = "hydrus"
service_name: Optional[str] = None
path: Optional[str] = None
@@ -276,12 +276,12 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
"""Get tags from Hydrus, local sidecar, or URL metadata.
Usage:
get-tag [-query "hash:<sha256>"] [--store <key>] [--emit]
get-tag [-query "hash:<sha256>"] [--instance <key>] [--emit]
get-tag -scrape <url|provider>
Options:
-query "hash:<sha256>": Override hash to use instead of result's hash
--store <key>: Store result to this key for pipeline
--instance <key>: Store result to this key for pipeline
--emit: Emit result without interactive prompt (quiet mode)
-scrape <url|provider>: Scrape metadata from URL or provider name (itunes, openlibrary, googlebooks, imdb)
"""
@@ -588,7 +588,7 @@ def _run_impl(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
except Exception:
overwrite_store = False
if overwrite_store:
if overwrite_instance:
if backend is None or not file_hash or not store_name:
log(
f"Failed to resolve store backend for provider '{provider.name}'",
@@ -964,12 +964,12 @@ class Get_Tag(Cmdlet):
name="get-tag",
summary="Get tag values from Hydrus or local sidecar metadata",
usage=
'get-tag [-query "hash:<sha256>"] [--store <key>] [--emit] [-scrape <url|provider>]',
'get-tag [-query "hash:<sha256>"] [--instance <key>] [--emit] [-scrape <url|provider>]',
alias=[],
arg=[
SharedArgs.QUERY,
CmdletArg(
name="-store",
name="-instance",
type="string",
description="Store result to this key for pipeline",
alias="store",
@@ -995,7 +995,7 @@ class Get_Tag(Cmdlet):
" Local: From sidecar files or local library database",
"- Options:",
' -query: Override hash to look up in Hydrus (use: -query "hash:<sha256>")',
" -store: Store result to key for downstream pipeline",
" -instance: Store result to key for downstream pipeline",
" -emit: Quiet mode (no interactive selection)",
" -scrape: Scrape metadata from URL or metadata plugin",
],