#1 2011-02-02 06:15:41

mdipper
Member
Registered: 2010-09-03
Posts: 17

[Patch] Comicbookdb Plug-in Enhancements

I've added the following minor enhancements on top of my already patched comicbookdb.com plug-in:
* Trade paperbacks have TBP appended to the series title (just like Annuals) so that a #1 trade paperback isn't confused with issue #1.
* Trade paperback volume numbers are handled.
* Second printings, special covers, and similar information will be noted in parenthesis after the issue title, just like they are on comicbookdb.com.

The attached patch was created from the GCcomicbookdb.pm file I got by updating gcstar (gcstar -u), not from my latest patches.

A good how-to describing patching can be found here:
http://forums.gcstar.org/viewtopic.php?id=1676

-Michael


Attachments:
Attachment Icon GCcomicbookdb.pm.patch, Size: 2,443 bytes, Downloads: 349

Offline

 

#2 2012-06-30 03:25:55

masaru20100
New member
Registered: 2012-06-30
Posts: 1

Re: [Patch] Comicbookdb Plug-in Enhancements

The patch is only available to members of the forum which is not user friendly.

Here is the file content for everyone to see.

Code:

--- GCcomicbookdb.pm.orig    2011-01-08 20:29:33.055227850 -0800
+++ GCcomicbookdb.pm.new    2011-02-01 21:49:34.670951002 -0800
@@ -2,7 +2,7 @@
 
 ###################################################
 #
-#  Copyright 2005-2010 Christian Jodar
+#  Copyright 2005-2011 Christian Jodar
 #
 #  This file is part of GCstar.
 #
@@ -127,7 +127,8 @@
             else
             {
                 # Fetching item info
-                if (($tagname eq "span") && ($attr->{class} eq "test page_headline"))
+                if (   ($tagname eq "span")
+                    && ((index $attr->{class}, "page_headline") > -1))
                 {
                     $self->{insideHeadline} = 1;
                 }
@@ -175,7 +176,9 @@
                 {
                     $self->{insideCoverDate} = 1;
                 }
-                if (($tagname eq "span") && ($attr->{class} eq "test page_subheadline"))
+                if (   ($tagname eq "span")
+                    && ((index $attr->{class}, "test") > -1)
+                    && ((index $attr->{class}, "page_subheadline") > -1))
                 {
                     $self->{insideSubHeadline} = 1;
                 }
@@ -311,6 +314,22 @@
                 $self->{curInfo}->{volume} = $1;
                 $self->{insideNumber} = 0;
             }
+            elsif (($self->{insideHeadline}) && ($origtext =~ /-\s*TPB/))
+            {
+                # Trade paperback
+                $self->{curInfo}->{series} .= " TPB";
+
+                # Get volume number.  Default to 1.
+                if ($origtext =~ /vol\. (\d+)/)
+                {
+                    $self->{curInfo}->{volume} = $1;
+                }
+                else
+                {
+                    $self->{curInfo}->{volume} = 1;
+                }
+                $self->{insideNumber} = 0;
+            }
             elsif (($self->{insideHeadline}) && ($origtext =~ /vol\. (\d+)/))
             {
                 $self->{curInfo}->{volume} = $1;
@@ -326,6 +345,12 @@
             elsif (($self->{insideSubHeadline}) && ($origtext =~ /\"(.*)\"/))
             {
                 $self->{curInfo}->{title} = $1;
+
+                # Get printing or other note if present
+                if ($origtext =~ /\((.*)\)/)
+                {
+                    $self->{curInfo}->{title} .= " (" . $1 . ")";
+                }
             }
             elsif ($self->{insidePublisher})
             {

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.