Adopting Comics - ZornTaov/ZornCoMix GitHub Wiki

Adopting Comics

adopt_comic.py writes metadata for comics you already have, so they join the rotation without being downloaded again. A zip or cbz can also be uploaded and adopted from The Web Page.

A whole library, by spreadsheet

python adopt_comic.py --scan --root "D:/Comics" --report comics.csv     # 1. scan
python adopt_comic.py --read-report comics.csv --root "D:/Comics"       # 3. read it back
  1. Scan. Every folder or .cbz holding pages but no metadata becomes a row, with page count and numbering filled in.

  2. Fill in what only you know (see comics.example.csv):

    Column Meaning
    last_url The last page you have. The next run re-saves it and carries on.
    next_url Instead of last_url, when re-saving that page would make a differently named duplicate.
    ended TRUE for a finished comic: no address needed, skipped from then on.
    increment The last page's number, for comics you number yourself.
    prefix TRUE to keep numbering new pages. Implies increment.
    cbz_path The archive this comic belongs to, if not beside the folder.

    Leave prefix and increment blank to keep the site's filenames.

  3. Read it back. Rows with no address and no ended are left alone, so you can fill the sheet in over several sittings. Re-running --report keeps what you typed, even if folders have moved.

A cbz_path that does not exist yet is built from the loose pages, so a library can be shelved and adopted in one pass. Still refused: a name one character off an existing archive (did you mean), and a path landing the archive among the pages (a --root one folder too deep). --no-make-cbz refuses any archive not already there.

A single comic, by flags:

python adopt_comic.py "Uncompressed/MyComic" --root "D:/Comics" \
    --last-url "https://example.com/comic/412" --increment 412 --prefix \
    --cbz-path "CBZs/MyComic.cbz" --dry-run

A comic you only have as an archive

Make an empty folder and pass --cbz-path: count and numbering are read from the archive, and the folder fills as pages arrive. It can be updated but not walked or chaptered, which need the pages in the folder. --unpack-to fixes that, unpacking an archive already in the library and adopting the folder, keeping the archive as the comic's own:

python adopt_comic.py "CBZs/MyComic/MyComic.cbz" --unpack-to "Uncompressed/MyComic" \
    --root "D:/Comics" --ended

Checked first: the folder is empty or absent, the archive's pages are in one folder, and an address or --ended is given. Pages are unpacked beside the folder and moved in once all are out.

Old-format metadata is upgraded with --migrate; see Older metadata files.