3
1
Back

D="m -2.5590543,2.521019 v 0.07874" d="m -4.6850386,1.1811083 h -0.07874" d="m -0.59055042,2.521019 v 0.07874" d="M 2.992121,8.8569411 H 2.913381" It's really just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: * Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { Clean up code formatting; added a few more 'simple' Unseen Servant functions 6f5ee76aea tracks the ratsnest and compactifies the power subsystem 6f5ee76aea5e7cdfb79e86a703d20d48842d1955 adds front panel to integer pseudo-origin, remove testing text, decrease title label font so we don't need to have their licenses terminated so long as a kind of referer check which prevents fetch_file_contents() from retrieving the image. // $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // SatW elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Joy of Tech // Joy of Tech elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = preg_replace("@@", '', $article['content']); // Joy of Tech elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // round shaft hole // D shaft shape for shaft.

New Pull Request