Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Information Science Blog Aggregation

834 views

Published on

Published in: Education
  • Be the first to comment

Information Science Blog Aggregation

  1. 1. ISBLOGS building a better blog database ELLIE DICKSON FRANNY GAEDE FRANCESCA GIANNETTI DARIEN LARGE VIRGINIA TRUEHEART
  2. 2. Goals ✦ ✦ Pull in RSS feeds to show article snippets & other info Create a tag cloud to offer an additional entry point to the collection Create a resource for incoming and continuing iSchool students
  3. 3. Blog Curation see also: sisyphean tasks ✦ ✦ Many (most?) incoming students are not info science people Info science is truly multi-disciplinary, blogosphere is doubleplusbig ✦ How to find the good stuff? ✦ Get your friends to find it for you ✦ Aren’t we friends?
  4. 4. Populating the DB setting the table(s) ✦ Virginia the Architect structured the database. ✦ Look at all the table definitions. Look at ‘em. ‣ ‣ ‣ ‣ ‣ author blog blog_author blog_cat blog_maintainer ‣ ‣ ‣ ‣ ‣ category feed maintainer tag tag_blog
  5. 5. $toreturn['title'] = $article->find('title', 0)->plaintext; $toreturn['pubDate'] = $article->find('published', 0)->plaintext; //print($toreturn['pubDate']); $toreturn['link'] RSS & PHP = $article->find('link', 0)->href; $articletext = $article->find('summary', 0)->xmltext; //print($articletext); acronym bros $articletext=trim($articletext); Select items to display by blog, category //print "<p>found content:encoded: $articletext</p>"; or maintainer if ($articletext=='') { print "<em style='background-color:yellow;'>Could not find article in content:encoded; trying description</em>"; ✦ Add & modify feed $articletext=$article->find('description', 0)->xmltext; URLs for blogs } ✦ Retrieve & display content from blog $articletext=preg_replace("/[...]/", "", $articletext); feeds $articletext=preg_replace("/<img[^>]*/>/", "", $articletext); ✦ $articletext=preg_replace("/<iframe[^>]*>/", "", $articletext); $articletext=preg_replace("/src *= *'[^']*'/", "", $articletext); $articletext=preg_replace("/<div[^>]*>/", "", $articletext); $articletext=preg_replace("/<span[^>]*>/", "", $articletext); $firstparapos=strpos($articletext, "</p>"); // print $articletext; $toreturn[text]=$articletext; $html->clear(); unset($html); return $toreturn; } ?>
  6. 6. $toreturn['title'] = $article->find('title', 0)->plaintext; $toreturn['pubDate'] = $article->find('published', 0)->plaintext; //print($toreturn['pubDate']); $toreturn['link'] RSS & PHP = $article->find('link', 0)->href; $articletext = $article->find('summary', 0)->xmltext; //print($articletext); $articletext=trim($articletext); acronym bros Retrieve$articletext</p>"; database info from //print "<p>found content:encoded: ✦ Check format of URL if ($articletext=='') { print "<em style='background-color:yellow;'>Could not find article in content:encoded; trying description</em>"; ✦ RSS vs. Atom $articletext=$article->find('description', 0)->xmltext; } ✦ Retrieve contents as object $articletext=preg_replace("/[...]/", "", $articletext); ✦ Get latest item from contents $articletext=preg_replace("/<img[^>]*/>/", "", $articletext); $articletext=preg_replace("/<iframe[^>]*>/", "", $articletext); ✦ Parse elements $articletext=preg_replace("/src *= *'[^']*'/", "", $articletext); $articletext=preg_replace("/<div[^>]*>/", "", $articletext); $articletext=preg_replace("/<span[^>]*>/", "", $articletext); ✦ Search for text of latest blog entry $firstparapos=strpos($articletext, "</p>"); // print $articletext; ✦ Perform text processing $toreturn[text]=$articletext; $html->clear(); ✦ Return the information found unset($html); ✦ return $toreturn; } ?>
  7. 7. Tag Cloud chance of rain: 0% ✦ ✦ Ellie & Frankie installed and customized v-nessa.net’s PHP-based tag cloud like bosses And this is it:
  8. 8. Putting it Together bug squashing 4evar ✦ ✦ ✦ ✦ ✦ CSS is fun. And magic. And occasionally a pain in the ass RSS is not the most consistent medium Populating the tables through forms Backups through CRON Search
  9. 9. image credits photoshop is hard ✦ ✦ Slide 5: http://www.moogo.com/blog/2010/06/15/106 Slide 6: https://code.fluendo.com/elisa/trac/browser/trunk/elisa/core/plugins/ data/weather/cloud.png?rev=1222

×