Coder Social home page Coder Social logo

killo3967 / find-comics-by-image-types-comicrack-smartlist-plugin- Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 17 KB

Plugin for Comicrack for create an smartlist to filter comics by image file types

License: GNU General Public License v2.0

Python 100.00%

find-comics-by-image-types-comicrack-smartlist-plugin-'s Introduction

Find Comics by image types in Comicrack smartlist plugin

Plugin for Comicrack permit to create a smartlist to filter comics by image file types.

The script first imports necessary libraries and sets debugging and logging options. It then defines a function called ComicsImageFilter that takes three parameters: a list of books, and two string parameters 'a' and 'b'. The 'a' parameter can be either "all" or "any", and the 'b' parameter is the desired image file extension.

The function iterates through each book in the list and checks if the book is a zip file. If it is, it opens the zip file and iterates through each file inside. It checks if the file is an image file with the specified extension. The smartlist has two paarameters 'a' and 'b' The first ('a' parameter) could have two values "all" ot "any" If the 'a' parameter is set to "all", all images in the comic must have the specified extension for the comic to be included in the list. If the 'a' parameter is set to "any", at least one image must have the specified extension for the comic to be included in the list.

The second parameters is the extension of the image type and could be "jpg", "png", "bmp", "webp", "gif" and "avif".

With this and it's negation, you can create combinations for all the posibilities.

In summary, this script helps users filter comic book files based on the image file types they contain.

Be carefull selecting a lot of comics, because this script unzip all of them and view the files inside. This could be a a hard process for your machine.

If you like to view what is doing, then start comicrack with "-ssc" option to open the console.

find-comics-by-image-types-comicrack-smartlist-plugin-'s People

Contributors

killo3967 avatar

Stargazers

Stephane Koenig avatar pingu avatar  avatar  avatar  avatar  avatar Jim Finn avatar

Watchers

 avatar Ulisses Capato avatar

find-comics-by-image-types-comicrack-smartlist-plugin-'s Issues

Support for fileless comics

If you have any fileless comics it states the error Empty path name is not legal.

It can be fixed by adding at line 59:

    if not book.FilePath:
        continue

Include the dependecies with the plugin

Instead of asking to copy the libraries you could simply include them with your plugin in the same folder. You can check my plugin to see an example.

I was able to make your plugin work, by copying the following files:, I've attached them for ease, just drop them in your plugin folder.

_abcoll.py
_weakrefset.py
abc.py
collections.py
fnmatch.py
genericpath.py
heapq.py
io.py
keyword.py
linecache.py
list.txt
ntpath.py
os.py
shutil.py
stat.py
string.py
struct.py
types.py
UserDict.py
warnings.py
zipfile.py

dependencies.zip

CBR files shouldn't be returned

CBR files shouldn't be returned.

Let's say you do a search and the result should be empty, CBR files will be returned as is they were a match.

Error when running

Script halts with this error
'ascii' codec can't encode character '\u2013' in position 87

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.