Pearls Before Swine

Plasma Comic Sources

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Last changelog:

11 years ago

v0.1: basically a sed-replace-job from mfuchs's wonderful snoopy-plugin [1].

[1] http://kde-files.org/content/show.php/Snoopy+%28en%29?content=92041

Sword2

10 years ago

I fixed the file main.es to make it work...
Follows the patch hopefully it will show correctly...

--- main.es 2009-03-17 06:24:39.000000000 -0500
+++ main.es 2009-12-08 12:37:27.895469170 -0600
@@ -49,7 +49,7 @@
}
}
if ( id == comic.Page ) {
- const expImage = new RegExp( "<img src=\"(http://assets.comics.com/dyn/str_strip/(\\d+/)+\\d+\\.full[^\"]+)\"" );
+ const expImage = new RegExp( "<img src=\"(http://([^\/]+)/dyn/str_strip/[^\.]+\.full[^\"]+)\"" );
const matchImage = expImage.exec( data );
if ( matchImage != null ) {
comic.requestPage( matchImage[1], comic.Image );
@@ -57,7 +57,14 @@
comic.error();
}

- const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
+ //title
+ re = new RegExp("class=\"STR_StripImage\" title=\"([^\"]+)\"");
+ match = re.exec(data);
+ if (match != null) {
+ comic.title = match[1];
+ }
+
+ const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
const matchPrev = expPrev.exec( data );
if ( matchPrev != null ) {
comic.previousIdentifier = date.fromString( matchPrev[1], date.ISODate );

Report

Sword2

10 years ago

Sorry, I left the print command on the previous one...

--- main.es 2009-03-17 06:24:39.000000000 -0500
+++ main.es 2009-12-08 13:20:29.000000000 -0600
@@ -49,7 +49,7 @@
}
}
if ( id == comic.Page ) {
- const expImage = new RegExp( "<img src=\"(http://assets.comics.com/dyn/str_strip/(\\d+/)+\\d+\\.full[^\"]+)\"" );
+ const expImage = new RegExp( "<img src=\"(http://([^\/]+)/dyn/str_strip/[^\.]+\.full[^\"]+)\"" );
const matchImage = expImage.exec( data );
if ( matchImage != null ) {
comic.requestPage( matchImage[1], comic.Image );
@@ -57,7 +57,14 @@
comic.error();
}

- const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
+ //Alternate Text
+ re = new RegExp("class=\"STR_StripImage\" title=\"([^\"]+)\"");
+ match = re.exec(data);
+ if (match != null) {
+ comic.additionalText = match[1];
+ }
+
+ const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
const matchPrev = expPrev.exec( data );
if ( matchPrev != null ) {
comic.previousIdentifier = date.fromString( matchPrev[1], date.ISODate );

Report

Sword2

10 years ago

Since the title has already the name of the comic from the .desktop file I changed it to put the title of the strip and the date on the "alternate text" popup with this patch:

--- main.es 2009-03-17 06:24:39.000000000 -0500
+++ main.es 2009-12-08 13:11:16.000000000 -0600
@@ -49,7 +49,7 @@
}
}
if ( id == comic.Page ) {
- const expImage = new RegExp( "<img src=\"(http://assets.comics.com/dyn/str_strip/(\\d+/)+\\d+\\.full[^\"]+)\"" );
+ const expImage = new RegExp( "<img src=\"(http://([^\/]+)/dyn/str_strip/[^\.]+\.full[^\"]+)\"" );
const matchImage = expImage.exec( data );
if ( matchImage != null ) {
comic.requestPage( matchImage[1], comic.Image );
@@ -57,7 +57,15 @@
comic.error();
}

- const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
+ //Alternate Text
+ re = new RegExp("class=\"STR_StripImage\" title=\"([^\"]+)\"");
+ match = re.exec(data);
+ if (match != null) {
+ comic.additionalText = match[1];
+ print(comic.additionalText);
+ }
+
+ const expPrev = new RegExp( "Link_Previous: '/pearls_before_swine/(\\d{4}-\\d{2}-\\d{2})/'" );
const matchPrev = expPrev.exec( data );
if ( matchPrev != null ) {
comic.previousIdentifier = date.fromString( matchPrev[1], date.ISODate );

Report

keithzg

10 years ago

It seems to be broken (again?); it's stuck on the one from awhile ago with Larry in the zoo (the second in that series, kid says "hey, it's dad with a snout"). Hitting back does go to the previous strip (the first in the plotline), but back again and it loops around to the second one. Hitting "jump to first strip" jumps to the true first strip, but "jump to current strip" just goes back to Larry-in-the-Zoo Strip 2. It's been stuck like this, at least for me, since that strip was in fact new.

Report

Boccaccio

10 years ago

For me it doesn't work either. I removed the plasma applet, deleted all files associated with it, but when installing it again, it simply does not show any Pearls comic at all :-(

Report

C

s2r2

11 years ago

Something must have changed at comics.com -- hope to fix it soon.

Report

C

s2r2

11 years ago

(Without any changes to the script) it started working again. (Weird.)

Report

11 years ago

v0.1: basically a sed-replace-job from mfuchs's wonderful snoopy-plugin [1].

[1] http://kde-files.org/content/show.php/Snoopy+%28en%29?content=92041

12345678910
product-maker Base: 4 x 5.0 Ratings
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.1
updated Mar 17 2009
added Mar 17 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0