3
1
Back

$this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); // Joy of Tech // Joy of Tech Scenes From A Multiverse (to get alt tags elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup) // Questionable Content (cleanup) // Questionable Content (cleanup elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Scenes From A Multiverse 3D Printing/AD&D 1e spell names in Filmoscope Quentin/Panels/COLOR SPRAY.png' 68726f9fe082df8f029089edeb63d89037321450 Delete '3D Printing/AD&D 1e spell names in Filmoscope Quentin/Panels/PRISMATIC SPHERE.png differ Binary files /dev/null and b/3D Printing/AD&D 1e spell names in Filmoscope Quentin/Panels/POLYMORPH.png' Delete '3D Printing/AD&D 1e spell names in Filmoscope Quentin/BLADE BARRIER.png differ Binary files /dev/null and b/KICKDRUM_MANUAL.pdf differ Binary files /dev/null and b/HIHAT_MANUAL.pdf differ Binary files /dev/null and b/3D Printing/AD&D 1e spell names in Filmoscope Quentin/Panels/HOLD PORTAL.png From dcaec240831d28b722a7d7988287c76a1461e439 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Updates from real TL0x4s d8eca8dc7ee0c083143ca1478ae7c1277063e5c9 Add polygon calculation for wing plates 5cacbfea2e523d618ea3bcbc0bca9c37eb36f10d 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: * Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); } // Scenes From A Multiverse (to get alt tag) // Achewood (alt tag) // Pain Train alt tag, Alice Grove (get bigger image) elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Three Panel Soul elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); Updated LICD, alter alt-textify to handle both title and alt tags textified. //Sites that provide images and just need alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content.

New Pull Request