|
Post by khazgar on Dec 6, 2013 9:19:28 GMT
Hi guys,
I discovered Gunnerkrigg a few weeks ago and it instantly catapulted itself into position number one of my favourite comic list.
I'd love to read through them all offline but don't really want to order hard copies - I already have far too many books as it is.
So, my question or possibly appeal - what about publishing the books in an electronic format and making them available through Amazon?
It's something I'd be very happy to pay for rather than just making a random donation.
I'm sure this has been brought up before, but I thought I would just ask.
And...what a great current chapter by the way!
|
|
|
Post by Gotolei on Dec 6, 2013 9:24:03 GMT
I don't think there's an official offline version aside from the physical books, however from what I recall somebody set up a script to download all the comics to date or something like that. See if I can find it (or get ninja'd in the process).. E: This thread.
|
|
|
Post by GK Sierra on Dec 6, 2013 9:32:53 GMT
Basically, you download a program called "Woofy". Inside the root folder for the program, there will be a folder called "definitions". Just make a new file (.def or whatever it is) called Gunnerkrigg Court and insert this code:
comic "Gunnerkrigg Court" start_at "http://gunnerkrigg.com/?p=1"
for page in visit("""href="(?<content>[^\n]*?)"><img src="http://www.gunnerkrigg.com/images/next_a.jpg">"""): download("""<img class="comic_image" src="(?<content>/comics/[^"]*?)">""")
Then select your definition from the list, hit the button, sit back and watch it download. When you're done you can put those comics in a folder and flip through them offline. Let me know if it's too confusing and I'll make a download for you.
|
|
|
Post by thshrkpnchr on Dec 6, 2013 9:46:23 GMT
Thank you! You're just pure awesome.
|
|
|
Post by GK Sierra on Dec 6, 2013 10:30:29 GMT
Thank you! You're just pure awesome. You are more than welcome.
|
|
|
Post by khazgar on Dec 6, 2013 20:45:32 GMT
Hi, I tried to install Woofy and did all the program said but my computer wasn't having it at all If you could come up with a download link I would be eternally grateful!
|
|
|
Post by GK Sierra on Dec 6, 2013 22:13:44 GMT
Hi, I tried to install Woofy and did all the program said but my computer wasn't having it at all If you could come up with a download link I would be eternally grateful! Sure thing mate. It's running right now, I'll check up on it when I get home and post the results.
|
|
|
Post by GK Sierra on Dec 7, 2013 0:39:04 GMT
Hi, I tried to install Woofy and did all the program said but my computer wasn't having it at all If you could come up with a download link I would be eternally grateful! Oh god, double posting... It makes me feel queasy... Here you are: www.filedropper.com/gkc
|
|
|
Post by khazgar on Dec 7, 2013 21:10:04 GMT
Thank you so much!
|
|
|
Post by Toloc on Dec 8, 2013 12:57:49 GMT
If you have a device that can handle cbz files, you can also just take the file you just downloaded and simply rename it to the cbz file type. That would mean you only have one file to handle on your device and you could read it with a software optimized for reading instead of an image viewer.
You can also divide the contents of the zip file into chapters and have one cbz per chapter.
|
|
|
Post by quinkgirl on Dec 8, 2013 17:01:05 GMT
Seeing all this, my manual copy and paste procedure doesn't sound so appealing anymore xD
|
|
|
Post by Toloc on Dec 10, 2013 14:33:05 GMT
Even if this only uses a preexisting image dump of the comic as a source, I am a little wary about posting this as it might cross the line to illegitimate copy. If someone thinks so, say the word and I'll remove the code and file.I made a php script that automatically subdivides a raw image dump like GK Sierra's into individual cbz files for each chapter for use with a comic viewer: <?php
//load data $url = 'http://gunnerkrigg.com/archives/'; $htm = file_get_contents($url); //get relevant source only $main = substr($htm, strpos($htm, '<div class="chapters">')); $main = substr($main, 0, strpos($main, '</div>') + 6); //make source well formed enough $main = str_replace(array('jpg">', 'value=\'', '\'>Page'), array('jpg" />', 'v="', '">Page'), $main);
$xml = new SimpleXMLElement($main);
//build lists $titleList = array(); //chapter titles $chapterList = array(); //titles and pages
foreach ($xml->a as $title) { $titleList[] = array("title" => (string)$title->h4); } reset($titleList); foreach ($xml->select as $select) { $pageList = array();//pages per chapter foreach ($select->option as $option) { $pageList[] = str_pad((string)$option->attributes(),8,"0",STR_PAD_LEFT) ;//filename } $pageList[] = str_pad((string)end($pageList)+1,8,"0",STR_PAD_LEFT);//add extra chapter pages not accesible through archive
$title = current($titleList); $chapterList[] = array("title" => $title["title"], "pages" => $pageList); next($titleList); } //path to folder containing image files for pages $comicPath = "./GKC/"; //target path where cbz's will be created $cbzPath = "./cbz/";
//try to create folder for cbz files if it doesn't exist if(!file_exists("./cbz")) { if(mkdir("$cbzPath")) { echo "cbz directory created<br />\n"; } else{ echo "Fatal error: cbz directory could not be created!<br />\n"; } }
if(file_exists($cbzPath)) { //check if source images exist if(file_exists($comicPath)){ foreach($chapterList as $chapter) { echo($chapter["title"]).":<br />\n ";
$destination = $cbzPath.str_replace(array(': ', ' ', '.', ':', ',', '\''), array('_', '_', '', '_', '', ''),strtolower($chapter["title"])).".cbz";
$zip = new ZipArchive;//create .cbz archive if ($code = $zip->open($destination, ZipArchive::CREATE) === TRUE) {
foreach($chapter["pages"] as $page) {//add pages to cbz if(file_exists($comicPath.$page.".jpg")){ $added=$zip->addFile($comicPath.$page.".jpg"); echo " -".$page."<br />\n"; } // else{ // echo "file missing:". $comicPath.$page.".jpg!<br />\n"; // } }
$res=$zip->close(); echo ($res ? "successfully created" : "FAILED") ."!<br />\n<br />\n"; }
} } else{ echo "Fatal error: image folder not found!"; } } ?> index.php (2.79 KB) Might be useful if someone wants to read the comic offline or on a handheld device. Get a local HTTP Server like XAMPP and put the code above into a file called "index.php" in [XAMPP folder]/htdocs Extract the archive from GK Sierra into the same folder as the php (or use your own archive), so that the images are in a folder called "GKC" in the same location as the php file. Then just open the script in a browser. (Type "localhost" into your address bar.) The comic book files will be generated in a folder called "cbz" in the same location as the php file. Not the most straight forward, but one uses what one has at hand. If someone uses this to generate an easier readable offline version of the comic, consider donating to Tom or buy the physical books.
|
|
|
Post by GK Sierra on Dec 10, 2013 18:49:08 GMT
My stars and garters... Excellent work Toloc!
I wouldn't worry about it being an illegitimate copy since it would be pretty hard to sell someone a cbz of something that's already online for free.
|
|
|
Post by Toloc on Dec 10, 2013 20:45:37 GMT
My stars and garters... Excellent work Toloc! I wouldn't worry about it being an illegitimate copy since it would be pretty hard to sell someone a cbz of something that's already online for free. Thank you very much. And surprisingly I found out that there apparently is a digital version of the GC books over at comixology. I don't know if they are higher resolution or something... Still, I do not really see much legally or morally wrong with this DIY method. Only problem could be that Tom doesn't get advertising revenue from offline copies. As I said, it would probably be nice if people who use Woofy and the script to get a copy would give Tom a little tip.
|
|