ZenCBR – Comic Book Archive Maintenance Utility

ZenCBR is a program that I wrote for maintaining large collections of comic books, with an eye to dealing with some of the issues that come from downloading them online. It’s main functions involve cleaning up the names of the files, finding doubles, making sure the file type is correct, removing references to scanning groups, and so on. It is not a viewer. It is a maintenance utility. I have tested it under 64-bit Windows 7 since that’s what I use, but it should run fine under any version of Windows from Windows 95 onward.

I’ve tested it extensively and it seems bug-free and stable, but please feel free to contact me with bug reports and feature requests. Contacting me via the forum of this post is my preference but you can email me as well if you want. The software has been updated since this entry was initially written so I apologize if screenshots or documentation is out of date. Here is the rough update history:

1.00 Initial Public release
1.01 Added training function to “Sort to Subs” function so that it learns possible names from your existing directory tree
1.02 Convert’s + to space when cleaning filenames, expanded URL encoding issues
1.03 Fixed major bug in renumbering function causing filenames including text like “this of that” to be trashed into “this of 0″ YIKES! Important upgrade!
1.04 Group detector now ignores numbers (which generally means dates)
1.05 Undo files now get written to zencbr-undo.bat (for clean, renumber, and groups)
1.05.1 Bugfix (undo file was only writing the header!), and a silly animation of the title text


**Installation and use**

DOWNLOAD: http://www.zentastic.com/blog/wp-content/uploads/2012/01/zencbr-1-051.rar
ARCHIVE AND EXE FILE SIZE: 53,991 bytes and 150,528 bytes (it's quite tiny!)
VERSION AND COMPILE TIME: 1.0.5.1 03/06/2012

To install the program, just download the zip file and uncompress it somewhere. It could be on your desktop, or “C:\zencbr\”, or anywhere else. It doesn’t really matter. The two text files should be placed in the same directory as the main executable, and when you run the program it will create one more file that it uses to remember your working directory between sessions.

ZenCBR is a command line tool that should in theory be run from the directory you’re processing comics in. That is, ZenCBR should be stored in its own directory (for example C:\ZenCBR\zencbr.exe) but when you run it, you should be in your comics directory. For example, you might change directory — “cd \comics\new” — and then run the program — “c:\zencbr\zencbr”. Alternately, if you’re not a command-line person, you can run the program simply by clicking its icon, and you can change the directory you’re working in by pressing “N” to navigate elsewhere. It will remember this for next time and start in that same directory.

Because it runs in text mode, it may seem threatening at first, but it’s really very very easy to use. The best way to teach yourself is to make a backup copy of some of your comic files and experiment on them to see how the program works. Once you’ve tried it a couple times it should be quite self explanatory. Feel free to ask questions here as well, or by email, although you’re more likely to get a quick answer here, and you can bet that if you are wondering it someone else is too.


**Commands**

Note that unless otherwise noted, all of these commands are executed on files in the current directory as well as all subdirectories in the current directory (and recursively inside them as well). So you can run this on your entire collection at once if you’d like. All the commands generate verbose output and tell you what they are doing, and ask for input when required, and terminate and explain why when they hit error conditions.

D – Find Doubles

You may find that you have multiple copies of comics. For example “comic 1.cbr” and “comic 01.cbr” and “comic 1 (scanned by joe).cbr” might all have the same content. This function attempts to find such doubles. When it finds a set of files that it thinks are duplicates it gives you a list of them, along with their filesize (perhaps you’d like to choose the higest quality version). You can either select the one to keep (the others are deleted) or skip and keep them all.

C – Clean Names

This function attempts to “pretty up” the names of files and directories. For starters, it converts all underscores to spaces. It also attempts to fix a wide range of minor typographical issues to improve readability, including removing double spaces and trailing spaces, hash characters, standardizing brackets and correcting their spacing, fixing lost apostrophes, and correcting spacing around “x of y” numerical phrases.

T – Fix CBR/Z type

A CBR type file is essentially just a standard archive (RAR, ZIP, etc.) that has been renamed to identify it as a comic book archive, which contains a bunch of image files (usually JPGs) of the individual pages of the comic book. The third letter in the extension specifies the type of archive used. For example, CBR means it’s actually a renamed RAR file, and CBZ means it’s actually a renamed ZIP file. There are other formats sometimes supported but they are extremely rare and are basically never used for distribution. That said, you would be amazed how many times I have seen a CBR file that is actually a ZIP, or a CBZ that is actually a RAR. Many viewer programs don’t care, but some will crash when faced with this or erroneously tell you that the file is corrupted. This command goes through your files and makes sure that the extension matches the actual archive file type. If it doesn’t, the file is renamed.

G – Remove groups

Often downloaded files will contain the name of the group that did the scanning. If you’re choosing to download files that have been scanned by others rather than repeating the work and scanning your own comics (since of course you would never download anything you don’t own), you will be left with files that say stuff like “(Minutemen-DCP)” at the end. This function removes the scanning group names. While ZenCBR does come with some training already done, you will need to train the program. When it comes across a term or name that it doesn’t know, it will ask you whether it is a group or if it should be ignored. If you tell it that it’s a group name, it will remove it, and will also remove it any time it sees it in the future. If you tell it to ignore it, it will leave it in place and do the same in the future. If you’re unsure, you can skip it “for today”, meaning that it will ignore it for the rest of this session, but if you run it again, you’ll be reasked. There is an option to run this command in “quick mode”, which skips all questions — if it doesn’t know a term, it just ignores it. Only known groups are processed. Be careful because there is no “undo” on this command. If you make a mistake, you can break out and edit the dictionary files. Their location is displayed when you start the program. They are plain text files that can be edited in notepad or similar programs.

Note: You can download a pre-trained file here based on a scan of files on the internet, use at your own risk: zencbr-training-1.rar (archive size is 15,810 bytes and should be uncompressed into the same directory as the application). This will save you some time, but you may want to train your own application.

R – Renumber

This command attempts to clean up the numbering schemes so they match. For example, if you have “comic issue 1.cbr” and “comic issue 02.cbr”, they may sort incorrectly because of the different number format. This program would rename the first file “comic issue 01.cbr” so they are consistent. The length of the number (with 0-padding) is determined by finding the longest one in use, and also by checking the “of #” phrase if there is one. For example “comic 3 of 100″ would be renamed “comic 003 of 100″ because ZenCBR knows that eventually it will need three digits. The “of” phrase however gets shortened so there is no 0-padding since it’s not needed there.

S – Sort to Subs

This special command, which not everyone will find use for, is the only one that is not recursive. This command is used when you have a large collection of files in a single directory that are of different series (ie. a bunch of Batman, some Superman, whatever). The program does its best to guess the name of the comic series, creates a directory, and moves all the relevant files into that new directory. Please note that it’s not perfect, so you will definitely need to go through and correct some of the directory names, but it will still save you lots of time.

Finally, to quit, just press either Q or escape from the main menu. You can also press CTRL+BREAK or close the window at any time.


**Open-Source**

This program was written in PowerBasic Console Compile Version 6.0 which you can purchase at PowerBasic.com and is highly recommended, as are their other compilers. You can download the source code and icon file at this link: http://www.zentastic.com/blog/wp-content/uploads/2012/01/zencbr-1-000-source.rar (archive size 20,679 bytes). That’s the source code for the first release. Here is an updated source code release for version 1.05: http://www.zentastic.com/blog/wp-content/uploads/2012/01/zencbr-1-051-source.rar (archive size 23,459 bytes).

Finally, please note that this is freeware by me, Shannon Larratt, and is provided with no warranty or guarantees of any kind. Use at your own risk.

3 Comments

  1. Miles Pestell wrote:

    Awesome bit of software. Thank you for sharing. Its made my collection look so much better

    Tuesday, January 31, 2012 at 9:23 am | Permalink
  2. Leon wrote:

    You are one clever guy, Shannon.

    Tuesday, January 31, 2012 at 1:40 pm | Permalink
  3. Boyd wrote:

    I have to thank you for the efforts you’ve put in penning this website. I really hope to view the same high-grade content from you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal website now ;)

    Friday, March 15, 2013 at 10:41 pm | Permalink

One Trackback/Pingback

  1. [...] initial blog post — ZenCBR – Comic Book Archive Maintenance Utility — has been updated with the latest download links for the executable, training files, and for [...]

Wow Shannon, that's really annoying! What is it, 1997 on Geocities? Retroweb is NOT cool!

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*