GithubHelp home page GithubHelp logo

ajslater / comicbox Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 0.0 96.66 MB

Comic metadata reading & writing library

License: GNU Lesser General Public License v3.0

Python 86.76% Shell 3.84% Dockerfile 0.30% JavaScript 3.12% Makefile 5.98%

comicbox's People

Contributors

ajslater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

comicbox's Issues

Usage example for the API

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

Comicbox fails to load some Proof of Concept or GFTO PDFs

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.

TypeError when trying to convert cbr to cbz

running comicbox -z --delete-rar COMIC_FILE.cbr throws TypeError: 'NoneType' object is not iterable

also when trying to run with --recurse and changing the file to a directory it shows {args.path} is not a file and files with the same TypeError after that

photo_2021-06-18 11 31 06

photo_2021-06-18 11 31 04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.