cbz
is a command-line tool for viewing and manipulating ComicInfo.xml
files in comic book zip archive files. The schema for ComicInfo.xml
files is defined by the Anansi Project.
This tool exists solely so I can add AgeRating
metadata to comic CBZ files so that my family's private Kavita Reader instance doesn't present unsuitable content to young individuals. However, for fun I've added support for updating other metadata fields.
Does not currently support setting fields deeper than the first level, such as elements under the Pages
array.
View a comic archive's ComicInfo.xml
file:
cbz show comic.cbz
Note that the show
command can only operate on a single comic archive.
Set an AgeRating
on a comic files:
cbz set AgeRating=Teen comic.cbz
Set multiple metadata fields:
cbz set AgeRating=Teen "Writer=Terry Moore" comic.cbz
The set
command can operate on multiple comic archives:
cbz set AgeRating=Teen "Writer=Terry Moore" series1/comic1.cbz series2/*.cbz
The import
command "imports" a CBR file by converting it into a CBZ file.
cbz import comic.cbr
ls
comic.cbr comic.cbz