[Bast-commits] r9956 - ironman/Perlanet-IronMan/branches/ironboy/bin

idn at dev.catalyst.perl.org idn at dev.catalyst.perl.org
Sat Sep 22 15:00:18 GMT 2012


Author: idn
Date: 2012-09-22 15:00:18 +0000 (Sat, 22 Sep 2012)
New Revision: 9956

Modified:
   ironman/Perlanet-IronMan/branches/ironboy/bin/ironman-collector.pl
Log:
Removing update_opml and refactoring layout.

Modified: ironman/Perlanet-IronMan/branches/ironboy/bin/ironman-collector.pl
===================================================================
--- ironman/Perlanet-IronMan/branches/ironboy/bin/ironman-collector.pl	2012-09-22 14:58:20 UTC (rev 9955)
+++ ironman/Perlanet-IronMan/branches/ironboy/bin/ironman-collector.pl	2012-09-22 15:00:18 UTC (rev 9956)
@@ -20,14 +20,14 @@
 
 # Perlanet configuration settings
 my $cfg = {};
-$cfg->{title} = "all.things.per.ly";
-$cfg->{description} = "all.things.per.ly IronMan agregation";
-$cfg->{url} = "http://ironboy.enlightenedperl.org/";
-$cfg->{self_link} = "http://ironboy.enlightenedperl.org/";
-$cfg->{agent} = "Perlanet";
-$cfg->{author}->{name} = "Perlanet";
-$cfg->{feed}->{format} = "Atom";
-$cfg->{entries} = 10;
+$cfg->{title}           = "all.things.per.ly";
+$cfg->{description}     = "all.things.per.ly IronMan agregation";
+$cfg->{url}             = "http://ironboy.enlightenedperl.org/";
+$cfg->{self_link}       = "http://ironboy.enlightenedperl.org/";
+$cfg->{agent}           = "Perlanet";
+$cfg->{author}->{name}  = "Perlanet";
+$cfg->{feed}->{format}  = "Atom";
+$cfg->{entries}         = 10;
 
 $cfg->{filter}->{keywords} = ["cpan", "ironman", "perl"];
 
@@ -38,7 +38,6 @@
 
 else {
     $cfg->{db}{dsn} = "dbi:SQLite:/var/www/ironboy.enlightenedperl.org/ironman/subscriptions.db";
-    #$cfg->{db}{dsn} = "dbi:SQLite:/var/www/ironboy.enlightenedperl.org/ironman/testsubscriptions.db";
 }
 
 # Get me a Perlanet::IronMan thingy using our config from above
@@ -48,28 +47,24 @@
 #$p->run;
 #exit;
 
-# I'm taking run apart here
-$p->update_opml;
-
 # Get the list of feeds from the database
 print("Fetching the Perlanet::Feed objects array\n");
 my $feeds_obj = $p->feeds;
 
 # Sample data:
-#      bless( {
-#               'website' => 'http://jjnapiorkowski.vox.com/library/posts/page/1/',
-#               'entries' => [],
-#               'url' => 'http://jjnapiorkowski.vox.com/library/posts/atom.xml',
-#               'title' => 'John Napiorkowski',
-#               'id' => 'D78C979A-6678-11DE-98DD-DC36AA5A0737',
-#               'author' => ''
-#             }, 'Perlanet::Feed' )
+#    bless( {
+#        'website' => 'http://jjnapiorkowski.vox.com/library/posts/page/1/',
+#        'entries' => [],
+#        'url' => 'http://jjnapiorkowski.vox.com/library/posts/atom.xml',
+#        'title' => 'John Napiorkowski',
+#        'id' => 'D78C979A-6678-11DE-98DD-DC36AA5A0737',
+#        'author' => ''
+#    }, 'Perlanet::Feed' )
 
 #if($DEBUG) { print(Dumper($feeds_obj)); }
 #exit;
 
 if($DEBUG) { print("Fetching the feed data\n"); }
-#my @feeds_data = $p->fetch_feeds( @{ $feeds_obj } );
 
 foreach my $feed_obj ( @{ $feeds_obj } ) {
 
@@ -80,37 +75,21 @@
     }
 
     if($DEBUG) { print("Feed object:\n"); print(Dumper($feed_obj)); }
-
     if($DEBUG) { print("Fetching posts from feed '" . $feed_obj->url . "'\n"); }
     my @feed_posts = $p->fetch_feeds( $feed_obj );
 
     #if($DEBUG) { print(Dumper(@feed_posts)); }
-
     if($DEBUG) { print("Filtering posts to remove duplicates\n"); }
+
     # Filter feed_posts for previously seen posts
     @feed_posts = $p->select_entries(@feed_posts);
 
     if($DEBUG) { print(Dumper(@feed_posts)); }
-
     if($DEBUG) { print("Building a post object\n"); }
     my $post = $p->build_feed(@feed_posts);
-    if($DEBUG) { print(Dumper($post)); }
 
+    if($DEBUG) { print(Dumper($post)); }
     if($DEBUG) { print("Rendering post object\n"); }
     $p->render($post);
-
 }
 
-
-#exit;
-
-# Get the entries from the feeds data
-#print("Building the entries array\n");
-#my @entries = $p->select_entries( @feeds_data );
-
-#print(Dumper(@entries));
-#exit;
-
-#my $feed = $p->build_feed(@entries);
-#$p->render($feed)
-




More information about the Bast-commits mailing list