2a59ec4cbd
* update deps. bump version * fix news * update deps. update ruff. lint * Support Python 3.9 (#6) * lint * update deps tests work against python 3.9 * bump version and news --------- Co-authored-by: Timmy Welch <timmy@narnian.us> |
||
---|---|---|
.circleci | ||
bin | ||
comicfn2dict | ||
tests | ||
.dockerignore | ||
.eslintignore | ||
.gitignore | ||
.prettierignore | ||
.remarkignore | ||
.shellcheckrc | ||
builder-requirements.txt | ||
comicfn2dict.py | ||
comicfn2dict.sh | ||
debian.sources | ||
docker-compose.yaml | ||
Dockerfile | ||
eslint.config.js | ||
LICENSE | ||
Makefile | ||
NEWS.md | ||
package-lock.json | ||
package.json | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
comicfn2dict
An API and CLI for extracting structured comic metadata from filenames.
Install
pip install comicfn2dict
API
from comicfn2dict import comicfn2dict, dict2comicfn
path = "Comic Series #001 Title (2024).cbz"
metadata: dict[str, str| tuple[str,...]] = comicfn2dict(path, verbose=0)
filename: str = dict2comicfn(metadata, bool=True, verbose=0)
CLI
comicfn2dict "Series Name #01 - Title (2023).cbz"
{'ext': 'cbz',
'issue': '001',
'series': 'Series Name',
'title': 'Title',
'year': '2023'}