A Programmer's Dream

CBR, CBZ and maybe something new

Posted by Stephen Wrighton on 18 Sep 2008

I can admit, I'm having fun with eComic. But that's neither here nor there. Currently, I support opening CBR and CBZ files, which are fundamentally RAR and ZIP files respectively. For the record, CDisplay, the initial program that dealt with these things had 4 file formats: CBR, CBZ, CBT, CBA, which corresponded to RAR, ZIP, TAR and ACE files.

The thing that makes a CB# file a CB# file, is that it is filled with images, and possibly a "Notes.txt" file. It's not a complicated file paradigm--which I do like.

Now, making them is relatively easy. You stick all the files you want in the CB# in a folder, and then zip or rar or tar or ace it up. Rename the file extension and you got yourself a file.

Bad news is that you've GOT to have them name in something sequential. Much the same way that the CB# file itself needs to be named sequentially in order for CDisplay to find the next thing to be read.

So, my thought was to have eComic create a new file type. Let's call it GNZ. Now the GNZ will fundamentally be a CBR file. Except the Notes.txt will be replaced with a Manifest.xml file.

The Manifest.xml file will have something along the lines for a schema:

Note two things of interest for the new file type:
  1. The images are given an order that they should be displayed in
  2. The note information is stored, and give a format (types can be RTF, HTML or TEXT)
... maybe I'm just too pleased with myself.

Tweet me @kidananubix if you like this post.

Tweet