Labels Milestones
Back83b013c3637bfb179ad62b90a6c8b2f5fb547c8c Update README.md 085327769df1923053fc21adb0ef584f908b8264 Add befaco image for inspo bab77fac9dc44b0a10d743c564c65ae0938027f6 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?) elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $this->mangle_article($article); } function get_img_tags($xpath, $query, $article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } // Timothy Winchester (People I Know) elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { // Achewood (alt tag) // Pain Train (to get alt tags) elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); } // Dilbert elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } // Poly In Pictures elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return 2; } } //Sites that provide images and just need alt tags textified. //Sites that provide images and just need alt tags 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']//img", $article); } Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); //and sometimes necessary for old fogeys like.
- 7.87006 vertex 5.10452 0.896427 21.7998.
- -0.0119451 vertex 2.84428 0.565762.
- 0.538413 -0.714663 0.446506 facet normal 0.116114 0.00043693.