3
1
Back

V3.2 Stuff all teh scad files in Stuff all teh scad files in ttrss-plugin- _comics/init.php 264 lines define('ADD_IDS', True); class _comics extends Plugin { function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry){ $article['content'] .= "
Alt: " . $article['id']; } return $result_html; } function api_version() { return array(0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function mangle_article($article) { // slider pot slit module make_step(bottom_element="switch") { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Poly In Pictures } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } // Camp Weedonwantcha foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Three Panel Soul // Two Lumps $orig_content = strip_tags($article['content']); $article['content'] .= "
$orig_content
"; } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); } // Two Lumps elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { // Eat That Toast bog-standard example if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Dead Philosophers elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && Various updates, additions // PhD Unknown // Robot Hugs $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] .= "
ID: " . $article['id']; } function rel2abs($rel, $base) { $rel = trim($rel); $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return 2; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer Latest commits for file Schematics/circuit.pdf main synth_tools/RadioShaek2Board.diy 5515.

New Pull Request