cast date and remainder parts as strings
This commit is contained in:
parent
29e6068db2
commit
d3b11d6361
@ -62,6 +62,7 @@ class ComicFilenameSerializer:
|
|||||||
# noop if only day.
|
# noop if only day.
|
||||||
break
|
break
|
||||||
if parts:
|
if parts:
|
||||||
|
parts = (str(part) for part in parts)
|
||||||
date = "-".join(parts)
|
date = "-".join(parts)
|
||||||
self._log("After date", date)
|
self._log("After date", date)
|
||||||
self.metadata = MappingProxyType({**self.metadata, "date": date})
|
self.metadata = MappingProxyType({**self.metadata, "date": date})
|
||||||
@ -79,6 +80,7 @@ class ComicFilenameSerializer:
|
|||||||
"""Add the remainders specially."""
|
"""Add the remainders specially."""
|
||||||
if remainders := self.metadata.get("remainders"):
|
if remainders := self.metadata.get("remainders"):
|
||||||
if isinstance(remainders, Sequence):
|
if isinstance(remainders, Sequence):
|
||||||
|
remainders = (str(remainder) for remainder in remainders)
|
||||||
remainder = " ".join(remainders)
|
remainder = " ".join(remainders)
|
||||||
else:
|
else:
|
||||||
remainder = str(remainders)
|
remainder = str(remainders)
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "comicfn2dict"
|
name = "comicfn2dict"
|
||||||
version = "0.2.0a1"
|
version = "0.2.0a2"
|
||||||
description = "Parse common comic filenames and return a dict of metadata attributes. Includes a cli."
|
description = "Parse common comic filenames and return a dict of metadata attributes. Includes a cli."
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
authors = ["AJ Slater <aj@slater.net>"]
|
authors = ["AJ Slater <aj@slater.net>"]
|
||||||
|
Loading…
Reference in New Issue
Block a user