Thursday, July 25, 2019

.CBR > .CBZ conversion in Calibre.

OK, and now for something completely different....

Buddy offered to sell me his comics library. About a thousand Marvel titles in cbr format. I turned him down because I only keep comics in cbz, and converting them from his format to mine, and managing it inside Calibre (which is what I use; don't tell me there are other tools, I know) ... looked like a massive pain in the butt. I googled and didn't come up with anything.

Buddy gave me a couple days to think it over --

Here's how you do it, maybe the next person to google "Calibre CBR > CBZ" will find this and save himself a couple hours.

1. Open Calibre. (Honestly, if you don't use Calibre, this whole process probably isn't for you. I find this a very good tool for managing my epubs & comics, but I don't have a vast number of either.)

2. In Calibre, install the "Embed Comics Metadata" plugin by Dick Loraine. It can be found here:

3. In Calibre, open "Preferences" and choose "Change Calibre Behavior." Choose "Toolbars" and then "Main Toolbar." You'll see a screen with "Available Actions" on the left, and "Current Actions" on the right. In the "Available Actions" screen you'll see the "Embed Comics Metadata" plugin -- add it to the "Current Actions" side of the screen, and choose "Apply."

4. Return to the main "Preferences" menu. In the bottom left, click on "Plugins." Click "Show only user installed plugins." Expand the "user interface action plugins" arrow. Double-click "Embed Comics Metadata." Make sure the following checkboxes are selected:
  • Autoconvert cbr to cbz
  • Also convert rar and zip to cbz
  • Delete cbr after conversion.
Choose Apply.

"Autoconvert cbr to cbz" is an option, why don't you just use the plugin to do all of that?

That's a good question. In my case it's because the plugin choked on about half of the cbr files I tried to feed it -- older, smaller files mostly. I don't know why. But it's OK, because Calibre will happily convert even the files the plugin won't convert to cbz ... but only to zip.

So, 5 ...

5. Return to the "Preferences" menu. Under "conversion," select "Input Options."  The first option is "Comic Input." Check the boxes for "Disable comic processing" and "Don't add links to pages...."

Choose Apply.

Back up your library. Once again, back up your library. Right? 

6. Import your CBR files into Caliber, select them, and right click. Select "Convert Books | Bulk convert."

In the upper right hand corner of the dialog box that appears, select "ZIP" from the dropdown. That's all you need to do. Choose "OK."

7. Depending on how fast your computer is, Calibre will start converting your books -- all in one pass, and it uses a temp directory on your boot drive (unless you've configured things very specifically, and you know if you have.) So watch Drive C -- if you're low on space, and your comics are large, you may run out of space.

8. Expand "Formats" in the left Nav bar. Expand the "Zip" format.

9. Ctrl-A to select all the files in the Zip format.

10. Right-click on the files and choose "Remove books | Remove files of a specific format from selected books." Under "Choose formats to delete," select CBR.

11. Calibre will delete all the CBR formats. You'll be left with only ZIP formats. Ctrl-A to select them all.

12. Now  we use the Embed Comics Metadata, which should be in the upper right on your toolbar. Click on the down arrow and select "Only convert to cbz."

13. Calibre will convert your zip formats to cbz. Now, if you've installed a comics reader (I recommend ComicRack for Windows) the cbz format file will popup inside ComicRack. One of the several advantages of the cbz format is that ComicRack and other apps (Comictagger, for example) will store metadata information directly within your .cbz file, and won't with .cbr.

That's all there is. Good luck. I had about 50 cbr files to test this with; converted all of them within about six minutes once I figured out the workflow.