Comic Framework

An area for members that are developing Comica, its plugins, or modules.
User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Comic Framework

Post by BootBlock » Sat Feb 25, 2012 8:53 pm

This thread isn't properly organised; it contains a random dump of information in a mostly random order.

The BiQubic.ComicFramework project is a 100% rewrite of BiQubic.Comics, which is the core of Comica. This is a casual rewrite so work won't progress at full-speed on it and a release shouldn't be expected any time soon - unless it's an alpha.

A brand-new Comica (currently named Comica 2) front-end is being developed along with the new framework.

Differences
Flexibility. The original core (as used by both series v0.xx and v1.xx of Comica) was very easy to use and did all of the parsing required to separate various elements on a comic's page. It fully knows about images, links, and so on. Because of this, it had to know about something to be able to extract data from it. For example, it didn't know about arbitrary information contained on a page such as a Flash video, a blurb of text, or anything else - so it couldn't get at them.

BiQubic.ComicFramework, on the other hand, doesn't know anything about a comic's page. Absolutely nada. Zilch. It will blindly perform regular expressions presented to it on any page it's told to look at and return exactly what it finds.

Metadata. While adding additional properties to the original framework was trivial, there were a few cases where it expected an Enum - which seemed a good idea the time, but later on it was clear that a standard String would have been the ideal choice. This created a compatibility break between v1.12 and (the as-yet unreleased) v1.20.

All properties, where appropriate, are now string-based.

Additional properties have also been added such as Keywords (which'll allow users to discover new comics within Comica 2 via a new section).

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comic Framework

Post by BootBlock » Sat Feb 25, 2012 8:53 pm

Currently implemented Database properties

[string] ComicFramework.Database.Name
  • The name of the database.
[integer] ComicFramework.Database.Version
  • The version of the database.
[string] ComicFramework.Database.Website
  • The user-facing website for the database.
[string] ComicFramework.Database.PublishUrl
  • The optional URL for locating the Database file via HTTP.
[string] ComicFramework.Database.News
  • The latest news for the database, if available.
[ObservableCollection of (definition)] ComicFramework.Database.Definitions
  • The available Definition (described below) entries contained within the database.
Currently implemented Definition Information properties

[string] ComicFramework.Definition.Name
  • The name of the comic the definition describes.
[image] ComicFramework.Definition.Icon16
  • The 16x16 icon for the comic image.
[string] ComicFramework.Definition.Description
  • The description of the comic, typically the original blurb on the comic's site.
[string] ComicFramework.Definition.Language
  • The English representation of the language that the comic is in.
[string] ComicFramework.Definition.Genre
  • The genre of the comic.
[string]ComicFramework.Definition.AgeRating
  • The age rating for the comic. This is to be used as a guide only.
[string] ComicFramework.Definition.Keywords
  • Comma-delimited list of keywords that pertain to the comic. Used for keyword searching.
[string] ComicFramework.Definition.Notes
  • Any relevant notes by the author of the definition. This is not displayed to the end-user and is used for technical information pertaining only to the definition itself.
[string] ComicFramework.Definition.Data
  • Any application or user-specified content that has no effect on the definition itself.
Currently implemented Definition Directive properties

[string] ComicFramework.Definition.ComicUrl
  • The direct url to the page that contains the latest comic that should be parsed for its image strip.
[string] ComicFramework.Definition.ComicImages
  • ...
[string] ComicFramework.Definition.ComicCaptures
  • Regular expression on extracting a capture group. Multiple capture groups are separated by a semi-colon character.
[string] ComicFramework.Definition.ComicAltTexts
  • Regular expression on extracting the comic's alt-text, if available.

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comic Framework

Post by BootBlock » Fri Mar 02, 2012 9:47 am

ComicFramework.Definition.AgeRating is now a string instead of an enum. A default base of ages contained within the ComicFramework.Definition.AgeRatings class will be supplied as constants, but of course do not need to be adhered to.

Added the following properties:

[string] ComicFramework.Database.Authors
  • The author(s) of the comic. Each author is separated by a semi-colon character.

User avatar
BootBlock
Unclean, unclean!
Posts: 425
Joined: Wed May 28, 2008 11:17 pm
Location: United Kingdom
Contact:

Re: Comic Framework

Post by BootBlock » Fri Dec 12, 2014 8:43 pm

Created a DefinitionClasses namespace and populated it with the classes below. This is to keep the Definition base class clean.

[class] ComicFramework.Database.DefinitionInformation
  • Contains metadata on the definition such as Description, Language, Genre, etc.
[class] ComicFramework.Database.DefinitionCaptureNodes
  • It has been decided that the original BiQubic.Comics approach was ideal for most cases. It allowed most comics to be viewable using only a very small amount of mark-up. This class provides the "node"-style of the original.
[class] ComicFramework.Database.DefinitionCaptureRegex
  • Provides advanced regular-expression capturing for those comics that are displayed on their site using, say, JavaScript. Supports everything, but at a price: requires significantly more mark-up/code.
[class] ComicFramework.Database.DefinitionState
  • Contains session state information that is populated at start-up and lost at disposal. For example: the download progress of the current comic image strip.
[class] ComicFramework.Database.DefinitionCaptured
  • The result of parsing/capturing; contains the comic strip(s), alt-texts, etc. Not entirely happy with the class name, so it might be changed at some point.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests