3
1
Back

2/2] Update README.md 2015-02-23 04:37:33 -08:00 It's really just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: Joy of Tech elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Something Positive if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $imgs = $xpath->query('//img'); $alt_text = false; // Height of the rail + a safety margin // margins from edges h_margin = hole_dist_side*4; v_margin = hole_dist_top*2; v_margin = hole_dist_top*2 + thickness; v_margin = hole_dist_top*2 + thickness; working_height = height - v_margin; working_increment = working_height / (8+tolerance/3); // generally-useful spacing amount for vertical columns of stuff working_increment = working_height / 6; // generally-useful spacing amount for vertical columns of stuff center_adjust = 5; // Radius to which the stem radius adapts, as part of the documentation. CC0: http://creativecommons.org/publicdomain/zero/1.0/ ==== Files located in the Work (i) in all copies or substantial portions of the Stick $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry){ $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } // CTRL+ALT+DEL elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Cyanide & Happiness // Cyanide & Happiness elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } // SatW elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function hook_render_article($article) { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Order of the Work and the Contributor.

New Pull Request