Software:Comica

From Blockipedia

(Redirected from Software:Comical)
Jump to: navigation, search


Title: Comica
Created: 18th September, 2007.
Finished: -
Product Page: View

Contents

Purpose

Comica is a comic downloader and viewer that utilises a custom-built framework for the parsing and downloading of comics from websites. The framework uses an open XML format that allows anyone to add support for additional comics.

There is full support for comic archiving and browsing. If archiving is enabled (within the Settings window), Comica will archive any downloaded comics; these comics can then be browsed as required via the navigation buttons located in the top-right of the main application window.

The original version of Comica was merely a testing harness used for creating the framework that powered the main web-comic download and parsing functionality; version 0.90 Alpha has since had its interface completely rewritten to be more user-friendly and will continue to be improved upon in future updates.

Name Change

Upon the v1.10 release (on 1st February, 2011), the name of the application was changed from Comical to Comica. This is due to there already being an (abandoned) application with the same name.

Usage

To be written.

Using Comica in Linux

Please note that this section will be expanded upon in a future update.

Get p7zip and extract it to Comica\Tools. Comica will now be able to utilise database updates.

Virtual Comics

To be written.

Keyboard & Mouse Shortcuts

Listed below are the non-obvious keyboard shortcuts. Please note that the Settings window can be used to change some of these shortcuts; these are the defaults. Comic mouse navigation shortcuts requires the mouse cursor to be physically within the comics list; this will be changed in a future update.

  • F1: View the application's ReadMe.txt file directly within Comica.
  • F2: Renames the currently selected comic.
  • F3: Opens the current comic's containing archive folder, if available.
  • F5: Reloads all comic definitions.
  • F6: Check all comics for updates.
  • Return: Downloads the latest version of the currently selected comic.
  • Space, MouseMiddle: Selects the next new comic within the comics list.
  • Escape: Minimises the main window. If ShowTrayIcon is enabled, Comica is also hidden. Also exists full-screen mode.
  • CursorLeft, BrowserBack, OemOpenBrackets, MouseBack: Goes back a comic in the current comic archive. Hold Shift to go to the first comic.
  • CursorRight, BrowserForward, OemCloseBrackets, MouseForward: Goes forward a comic in the current comic archive. Hold Shift to go to the last comic.
  • Shift+Left: Goes to the first comic within the current comic archive.
  • Shift+Right: Goes to the last comic within the current comic archive.

Double-clicking on an empty area of the current comic image will clear the comic display. Double-clicking a virtual comic will open its containing folder.

Command Line Parameters

Passing -minimise to Comica will start Comica minimised, or hidden to the system-tray if ShowTrayIcon is enabled.

Known Issues

  • v0.90 Alpha of the software was shipped with an invalid Comics database. Please press F7 and update the comics database as prompted.
  • Random crash when minimised to the system tray over a long period of time. Fixed in v0.99 Beta.
  • Marking a comic as a favourite doesn't always work. Partially fixed in v1.01.
  • Marking a comic as a favourite doesn't work if it has been update checked in v1.01. Fixed in v1.02.
  • Comic database updating doesn't work in v1.02. Fixed in v1.03.
  • Browsing through a comic's archive while downloading a comic confuses Comica's navigation. Fixed in v1.04.
  • Selecting Import Images from the Files menu while a comic's archive directory doesn't exist causes a crash. Fixed in v1.05.
  • The keyboard cannot be used to scroll around the current comic. This is a technical limitation that as yet cannot be overcome.
  • A crash when checking for comic updates in v1.08 if the .NET 4 Full framework isn't installed. Download it [here].
  • A scrollbar appears at the bottom of the comics listing in Linux (Gnome).

Definitions

Comica uses XML files to define comics, and each comic is described using a Definition entry. The Definition entry allows the description of various fields, the most important being LatestComicUrl and ComicImage. All fields are explained below.

The core of each comic definition is the ComicImage property as it tells Comica how to find a comic's image using a Regular Expression. Click the link for further information on RegEx.

Supported Attributes

  • Name
The human-readable name for the comic; generally the comic's official name. Must be HTML entity-encoded. eg. & becomes & amp; (minus the first space), otherwise there will be a loading error.
  • PublisherUrl
The website that publishes the comic.
  • LatestComicUrl
The location that contains the actual image of the latest edition of the comic. This can either be a path or a file.
  • Rating
The audience rating of the comic. The value should be written exactly as-is with its initial capitalised. The supported values are listed below.
  • Everyone (default)
  • Teen
  • Adult
  • Genre
The genre of the comic the definition describes. Can be any of the following (case sensitive). If the Genre attribute is missing, then the default value will be assumed.
  • Miscellaneous (default)
  • Crime
  • Fantasy
  • Game
  • Horror
  • Humour
  • Sex
  • Meta
  • Romance
  • SciFi
  • Sex
  • War
  • Notes
Any notes for the definition. These notes are from the author of the definition (and not the comic itself), and typically includes information as such "This is an experimental definition; please note that it may break in the future".
  • Data
For internal use only.
  • VersionMode
To be written. Requires Comica v1.04 or above
  • AltText
If the comic typically has alt or title text (containing the punch line for the joke, for example), then specifying Alt will extract that text from the Alt HTML attribute, whereas specifying Title will extract the text from the Title attribute. Title is the most common one.
  • None (default)
  • Alt
  • Title
  • RedirectUrl
To be written.
  • RedirectUrlIndex
To be written. 0 - (n-1).
  • ComicImage
This is the Regular Expression that is used to find the image of the comic on the LatestComicUrl page.
Field Explanation
MatchFromRegexStart To be written.
GoUpPath This is an integer specifying how far up the path to travel, stripping away everything before it. Useful for removing filenames from URLs. Example: Specifying a value of 1 will cause http://www.bootblock.co.uk/home/test.php to become http://www.bootblock.co.uk/home/ Requires Comica v1.00 or above
StripStrings To be written. Requires Comica v1.02 or above
IgnoreImages A list seperated with semi-colons (;) containing image filenames that should be ignored if encountered when parsing the web-page for the current comic. This is a sub-string search, so "tes" will be matched within "tes.png" and "testimage.png". Example: "rbprev.jpg;rbnext" will ignore any image filenames containing rbprev.jpg or rbnext. Requires Comica v1.00 or above
IgnoreInvalidFilesize Comica relies on websites to provide a valid ContentLength value to denote the size, in bytes, of the comic image that is to be downloaded. If this value is zero, then Comica assumes that the image is invalid. Setting this value to true will tell Comica to ignore the ContentLength value and attempt to download the image regardless. Download progress cannot be shown if this value is enabled.
PreviousComicUrl To be written. Requires Comica v1.08 or above
PreviousRedirectUrl To be written. Requires Comica v1.08 or above
PreviousRedirectUrlIndex To be written. 0 - (n-1). Requires Comica v1.08 or above
NextComicUrl To be written. Requires Comica v1.08 or above
NextRedirectComicUrl To be written. Requires Comica v1.08 or above
NextRedirectComicUrlIndex To be written. 0 - (n-1). Requires Comica v1.08 or above

Location of Definition Files

Comica stores all of its data in a directory called Comical within the local user's application data directory. You can get to the directory by typing %APPDATA%\Comical into Windows Explorer.

Alternatively, you can use the About window in the Help menu; click on the Open Comica's Settings Directory link at the bottom of that window.

Custom Definitions

If you would like to add your own definitions to Comica, you will need to add them to a file called ComicsUser.xml. Navigate to the Comical data directory (as specified above) and make a copy of the Comics.xml file, naming the new copy ComicsUser.xml. Open it in a plain-text editor such as Notepad, and replace the contents within the <Definitions></Definition> section with your own definitions.

Definition Example

Below is an example of a definition for downloading the Dueling Analogs comic. Please note that this definition is entirely on a single line.

<Definition Name="Dueling Analogs" PublisherUrl="http://www.duelinganalogs.com/" Rating="Everyone" LatestComicUrl="http://www.duelinganalogs.com/" ComicImage="\d{4}\-\d{2}\-\d{2}\.(jpg|png|gif)$" />

Writing a Definition

This section is a stub and will be expanded upon in due course.

End URLs that end in path or domain with a slash / character.

Include AltText attribute if the comic has alt-text that contributes more than just the comic strip's name or date of publication.

Ensure the comic isn't already included and it works before submitting.

How Comica Works

Below details the various processes Comica goes through to perform its comic downloading function.

Downloading the Latest Comic Strip

Comica downloads the page listed at LatestComicUrl.

If RedirectUrl is empty, it will grab a list of all available URLs from the downloaded page. RedirectUrlIndex will determine which URL entry in the list will be used for the next step. First and 0 will select the first URL in the list, Last will select the last, and any other number will select that respective URL within the list.

If the returned page is determined to be an image, that image is then returned as the strip for the comic.

If the returned page is not an image, a list of all images within that page is obtained.

Comica goes through each image within the list and attempts to match any with ComicImage. If a match is found and the ComicImageIndex value isn't present, the image match is returned as the strip for the comic. If the ComicImageIndex value is present, it is added to a list of images.

If one or more image matches were made, ComicImageIndex will determine which image entry in the list of images will be returned as the strip for the comic. First and 0 will select the first image in the list, Last will select the last, and any other number will select that respective image within the list.

If any of the above hasn't returned an image at this point, Comica flags an error.

Downloading the Previous Comic Strip

...

Personal tools