Labels Milestones
Back-6.7913424,2.5590618 h -0.19685" d="M 2.4803057,4.4291344 V 4.6259849" d="m 2.5787307,4.5275596 h -0.19685" d="M 3.4251924,8.759842 V 8.9566925" d="m 3.5236174,8.8582672 h -0.19685" d="m -3.5433111,12.893708 v 0.19685" d="m -3.4448861,12.992133 h -0.19685" d="M -6.8897674,5.0196917 V 5.2165422" d="m -6.7913424,5.1181169 h -0.19685" d="M 2.4803057,3.0511816 V 3.2480321" d="m 2.5787307,3.1496068 h -0.19685" d="m -6.8897674,12.893708 v 0.19685" d="m -6.7913424,12.992133 h -0.19685" d="m -3.5433111,12.893708 v 0.19685" d="m -3.4448861,12.992133 h -0.19685" d="m -2.5590543,2.521019 v 0.07874" d="M 2.992121,8.8582675 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?) $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // And get blog $entries = $xpath->query("//div[@class='entry']"); if (preg_match("@.*(.*)@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } 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'], 'cad-comic.com/sillies/') !== FALSE) { $article['content'] .= "
" . $entry->textContent . "
"; } } // Invisible Bread (make the bread visible) $article['content'] = $doc->saveXML(); } // Timothy Winchester. New Pull Request