This commit is contained in:
Jamie Hardt
2024-06-30 14:39:44 -07:00
parent e5dfddfb79
commit 1fe9fea85c

View File

@@ -36,6 +36,9 @@ class CommandEnv:
patterns: Dict[str, Tuple[str, str, str]]
onces: Dict[str, Optional[str]]
artwork_file: Optional[str]
artwork_desc: Optional[str]
def __init__(self) -> None:
self.metadatums = dict()
self.incr = dict()
@@ -255,8 +258,8 @@ they appear in the batchfile.
setp KEY INPUT PATTERN REPL
KEY will be set to the result of re.sub(PATTERN, REPL, INPUT). Patterns
are evaluated in the order they appear in the batchfile, once for each
file that appears in the batchfile before writing. INPUT can use the
special keys _FILENAME, _ABSPATH, and _FOLDER.
file that appears in the batchfile before writing. INPUT can be KEY or
use the special keys _FILENAME, _ABSPATH, and _FOLDER.
"""
key = args[0]
inp = args[1]
@@ -264,6 +267,14 @@ they appear in the batchfile.
repl = args[3]
self.env.set_pattern(key,inp,pattern, repl)
def d(self, args):
"""
d VALUE
An alias for "set1 DESCRIPTION VALUE".
"""
val = args[0]
self.env.set_once('DESCRIPTION', val)