ajslater / comicbox Goto Github PK
View Code? Open in Web Editor NEWComic metadata reading & writing library
License: GNU Lesser General Public License v3.0
Comic metadata reading & writing library
License: GNU Lesser General Public License v3.0
Hi,
I really like comicbox, it basically does everything I need in a simple and easy way in the CLI.
I am currently trying to use it in my own little python project to reorder and organize my digital comic collection.
Could you maybe give an example of how to use it to pull metadata from a file? Simply giving a path(as a string object) to get_metadata doesn't work. ("AttributeError: 'str' object has no attribute 'metadata' ") What does it expect instead?
It would be nice to see what to import and how to use it if that is not too much of an effort.
Thank you!
Ben
33475 OMAC v3 2.cbr
33465 Detective Comics 822.cbr
33469 Jonah Hex v2 10.cbr
33461 All-New Atom 2.cbr
throws a:
decimal.InvalidOperation
As reported in ajslater/codex#77
Specifically, issues 07, 09, and 14
The error is always of the form:
2022-11-07 15:21:30 EST ERROR 'utf-8' codec can't decode byte 0x92 in position 75: invalid start byte
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/codex/librarian/db/aggregate_metadata.py", line 43, in _get_path_metadata
md = car.get_metadata()
File "/usr/local/lib/python3.10/site-packages/comicbox/comic_archive.py", line 43, in wrapper
result = f(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/comicbox/comic_archive.py", line 374, in get_metadata
self._parse_metadata()
File "/usr/local/lib/python3.10/site-packages/comicbox/comic_archive.py", line 247, in _parse_metadata
cbi_md = self._parse_metadata_comments()
File "/usr/local/lib/python3.10/site-packages/comicbox/comic_archive.py", line 207, in _parse_metadata_comments
data = self._get_raw_archive_comment()
File "/usr/local/lib/python3.10/site-packages/comicbox/comic_archive.py", line 200, in _get_raw_archive_comment
comment = comment.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 75: invalid start byte
The offset is different, and sometimes it's "invalid continuation byte", but the stack trace is the same; the root cause seems to be that it's expecting the comments to be valid UTF8, but they aren't.
Now, PoC||GTFO is kind of rude; most of their PDFs are polyglots of some kind, and the specific ones it's having trouble with are, according to file
, a BPG image, WavPack audio file, and iNES ROM respectively. I'm pretty sure they're all also valid PDFs according to the spec, though, and if opened in PDF readers like Okular (or the one built into Firefox or Chrome) they load up fine.
Hi,
could you maybe give an example how to add metadata to a cbz file? Thank you!
Ben
As reported in ajslater/codex#78
Night of 1000 Wolves (2013)/Night of 1000 Wolved 001 (2013).cbz
is parsed improperly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.