6 Apr 2011 AlanHorkan   » (Master)

Peazip: Convert CBR to ZIP

I had a tshirt with the slogan "More people have read this shirt than have read your blog" and I am always a little surprised when someone does read my writings on the web. I was pleased to see that someone thought my batch file to repack from CBR to CBZ might be useful for people who want to read comics on mobile devices.

I was thinking about rewriting the batch file to work with programs other than 7-zip and I rediscovered Peazip a program I had not tried in years. The user interface is still a bit rough in places but it includes a very useful tool for Convert archives from different formats. It is a convenient way to convert files from CBR to ZIP which I think some users will prefer to using a DOS batch file. There does not seem any way to automatically rename the ZIP files to CBZ, so for I prefer to keep using the batch file. (The Convert tool in Peazip will unpack all the files and then repack all files, which can take up a lot of disk space with temporary files, so be careful if you try to convert many files at once.)

The biggest advantage of the batch file is that it does more than just repack from CBR to CBZ. I continue to modify it in other ways to better clean up the Comic files as I repack them, such as removing signature or banner images added by scanners. It is tricky to come up with a pattern that works all the time so I only included a simple example before, but the following patterns catch a lot of the tags and banner images:

MOVE z*.* ..\  
MOVE xx*.* ..\  
MOVE *tag*.* ..\  
MOVE *team*.* ..\  

The banner images can take up quite a bit of space, more than 1MB in rare cases, so removing them often saves more space than anything else such as special compression tricks. Instead of adding a large image file the batch file could be changed to add a small text file containing comments by adding the following command before recompressing:
echo "Repacked by 7-zip" > Comment.txt 

Tidying up file names is another thing that could be added to the batch file.

As I said earlier I am glad at someone found the batch script useful, hopefully Peazip will be useful too.

Syndicated 2011-04-06 00:52:03 from Alan Horkan

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!