Enhancing “Smart” Comic Naming

This article is obsolete with version 2.21 or newer. The algorithm is no longer user-visible.

Comic Seer sorts, organizes, and displays comics based on their file name. It tries to make a ‘best guess’ on what that name should be, but it is not always perfect. Starting with Comic Seer version 2.00, how this “smart” naming works is configurable if you are familiar with perl-style regular expressions.

Regular Expressions are a tool used for reading and parsing text. In this case, they are used to parse a comic file name and put it into four components: base name, volume, part, and issue. These components are then taken separately and put back together to make a pretty name. For example, “ComicABC Volume01 023.cbz” will be shown in Comic Seer as “ComicABC V1 #23.”

In the v2.00 release of Comic Seer, there was a problem such that “Mind the Gap 001” was being shown incorrectly.

 

NameProblem

 

Luckily, this can now be fixed without a new version of Comic Seer. (Although, a fixed regular expression will be provided in the next release)

When you run Comic Seer on your computer, a file by the name of “ComicSeer.ini” is created in your user preferences directory (ie on Windows 7: this is C:Users<user>AppDataLocalXylasoftComicSeer”). This is where all of your preferences are stored and this is where the regular expression is stored for parsing comic file names.

 

RegexLocationInFile

 

The “ComicNameRegex” string can be edited and replaced as you desire, where the most current “recommended” can always be found in the forums.

 

By replacing this text (after the equal ‘=’ sign) and opening Comic Seer again, it will use the updated regular expression and you will now see the updated naming. (Note: if there is a problem with your regular expression and the comic name is not being recognized, your comic names will default to the original file name)

 

NameFixed

Posted in Comic Seer (desktop), Software | Comments Off on Enhancing “Smart” Comic Naming

How to rip files (and images) from Chrome and Firefox web browser cache

Disclaimer: Please observe licenses when using this information.

Whether you are developing a website or would like to access hard-to-get information in a web browser, it may be useful to retrieve files from a web browser cache. All browsers provide a way of accessing the cache and you can access the files yourself, but sometimes that is not enough. In addition, in many cases, the web browsers only provide you a report on a file, not the actual file.

For instance, if you type “about:cache” in Firefox, you will be able to get a list of entries, where each generates a report like this:

FirefoxBrowserCacheReportWhile there is good information here like the size of the file, the raw content of the file in hexadecimal, and the type of the file; it’s not real useful in this format. (For informational purposes, you can type “chrome://cache” in Google Chrome to access a very similar view of the cache files)

While there are extensions available for these browsers that makes it easier to get at the original files, those extensions are susceptible to the day-to-day whim of the browser developers and are often broken in my experience. Some of them can also be rather buggy. I decided it would be easier to write a tool that would provide a means to get back to the original file outside the scope of the browser.

I am providing a Perl script that will read the above HTML file and produce the original file, originally developed for reproducing images. Given this is an external script, it is cross-platform (Windows, Mac, Linux, Unix) and cross-browser (Firefox, Chrome, others?). You can download the script at the bottom of the post.

In order to use the script to retrieve cache files, you must first save the report file from the web browser. This can be done by right-clicking on the page and selecting “Save As”, “Save Page”, etc. This will save the HTML file to a local directory.

You must then make sure you have Perl installed. If you are running Mac, Linux, or Unix, you probably already have it installed. You can check by opening a command prompt (or terminal) and typing “perl –version,” which would produce version information like this:

 

PerlVersion

 

If you don’t have it, you can get it from here (www.perl.org). Once installed, download the script at the bottom of the page. You can then recreate the original file by executing the script with the cache report file as a parameter:

 

perl webcachefile.pl mycachefile.html

 

PerlWebcacheRun

When you run it, you will see that it tries to identify the file first, finds the hex data block, and recreates the file- and that’s it!

Now, in my case, I often have a bunch of files I want to convert at once. If I download these cache files and put them in the same directory. I can run this shell script in Linux (and probably works on Mac and Unix too).

 

for f in *.html ; do perl webcachefile.pl “$f” ; done

 

PerlWebcacheRunMulti

Currently, there are only a few content types (images, icons, text files, etc) that the script identifies and adds the correct file extension for. If the script does not recognize the file, it will give the extension “.raw,” which can then be changed back to the original file’s extension. You can also add this information directly to the script if you’d like.

Feel free to leave comments below.

 

Current Version of Web Cache File Download script:

  • Version 1.0, March 29, 2013
  • Validated on Firefox 19.0.2 and Chrome 26.0 cache files
  • If you make changes to the script and think I might find it useful, please send the changes over to me and I may add them to the released script here.
Posted in Software | Comments Off on How to rip files (and images) from Chrome and Firefox web browser cache

How to create a comic book archive (CBZ or CBR)

Introduction

A comic book file, or archive, comes in a number of different file formats where the most common is CBZ and CBR [Wikipedia]. Both CBZ and CBR are created in the same manner, the only difference being the mechanism used for file compression (CBZ – ZIP, CBR – RAR). This article will take you step-by-step through the process of creating a comic book archive in the CBZ format with additional notes on how to create a CBR. This example will be shown on Windows 7, but the process for both Linux and Mac is near identical.

Image Gathering

A comic book archive is a collection of images that represent the pages a comic book (typically JPG or PNG). There are a number of different places these images may come from, including a scanner (if you scan your own comics), from the web, from your own collection, or from your own hand. This assumes you have the images you want to build into a comic book archive.

 

 

Building the file

Once you have the set of images you would like to combine into a comic, you will need to rename each file alphabetically in the order which you would like them to appear. It does not matter whether you use letters or numbers, although I always number sequentially. (Note: remember to use zero padding with numbers since “11” will come before “2”, but after “02”)

 

 

When ordered, select all of the images (ie: Ctrl+A) and right-click on any one of the images. Then select “Send To” and “Compressed Folders.” This will put all of the images into a zip file and put it in the same directory.

 

 

Creating a CBZ

You will need to change the extension on the file from “.zip” to “.cbz.” If you can’t see the “.zip” on the end of the file extension, you will need to turn off hiding of file extensions via the options in Windows Explorer.

 

 

Go to the view tab and turn off “Hide file extensions for known file types.”

 

 

You can then rename the “<file>.zip” file to “<comic>.cbz”

 

 

The icon representing the file will change to that of Comic Seer (or whatever other application you might be using to read comics).

 

 

The file can then be moved to your library or opened directly!

 

 

Extra: Creating a CBR file

A CBR file is exactly the same process except you will use WinRAR to combine the files. You will need to install WinRAR and it will add extensions to the right-click menu in Windows Explorer. When right-clicking on the images, you can select “Add to archive..” which will allow you to create either a ZIP file or RAR file. You will then rename the extension of the archive to CBZ or CBR respectively.

Posted in Comic Seer (app), Comic Seer (desktop), eComics, Software | Comments Off on How to create a comic book archive (CBZ or CBR)
Newer »