Skip to content

Parse CBZCBR files

Bases: Bolt

__init__(input, output, state, **kwargs)

The ParseCBZCBR class is designed to process CBZ and CBR files, which are commonly used for comic books. It takes an input folder containing CBZ/CBR files as an argument and iterates through each file. For each file, it extracts the images and saves them in a designated output folder.

Parameters:

Name Type Description Default
input BatchInput

An instance of the BatchInput class for reading the data.

required
output BatchOutput

An instance of the BatchOutput class for saving the data.

required
state State

An instance of the State class for maintaining the state.

required
**kwargs

Additional keyword arguments.

{}

Using geniusrise to invoke via command line

genius ParseCBZCBR rise \
    batch \
        --bucket my_bucket \
        --s3_folder s3/input \
    batch \
        --bucket my_bucket \
        --s3_folder s3/output \
    none \
    process

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    parse_cbzcbr:
        name: "ParseCBZCBR"
        method: "process"
        input:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/input"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/output"

process(input_folder=None)

📖 Process CBZ and CBR files in the given input folder and extract images.

Parameters:

Name Type Description Default
input_folder str

The folder containing CBZ/CBR files to process.

None

This method iterates through each CBZ/CBR file in the specified folder and extracts the images.