-
ComicFilenameParser — Parse a filename metadata into a dict.
comicfn2dict.parse¶
source module comicfn2dict.parse
Parse comic book archive names using the simple ‘parse’ parser.
Classes
Functions
-
comicfn2dict — Simplfily the API.
source class ComicFilenameParser(path: str | Path, verbose: int = 0)
Parse a filename metadata into a dict.
Initialize.
Methods
-
path_index — Lazily retrieve and memoize the key’s location in the path.
-
parse — Parse the filename with a hierarchy of regexes.
source method ComicFilenameParser.path_index(key: str, default: int = -1) → int
Lazily retrieve and memoize the key’s location in the path.
source method ComicFilenameParser.parse() → dict[str, str | tuple[str, …]]
Parse the filename with a hierarchy of regexes.
source comicfn2dict(path: str | Path, verbose: int = 0) → dict[str, str | tuple[str, …]]
Simplfily the API.