[Bast-commits] r8829 - in ironman: . Perlanet-IronMan/bin
idn at dev.catalyst.perl.org
idn at dev.catalyst.perl.org
Sat Feb 27 11:00:40 GMT 2010
Author: idn
Date: 2010-02-27 11:00:40 +0000 (Sat, 27 Feb 2010)
New Revision: 8829
Added:
ironman/Perlanet-IronMan/bin/ironman-collector.pl
Removed:
ironman/perlanet-collector.pl
Log:
Moving the collection script into the Perlanet directory
Copied: ironman/Perlanet-IronMan/bin/ironman-collector.pl (from rev 8825, ironman/perlanet-collector.pl)
===================================================================
--- ironman/Perlanet-IronMan/bin/ironman-collector.pl (rev 0)
+++ ironman/Perlanet-IronMan/bin/ironman-collector.pl 2010-02-27 11:00:40 UTC (rev 8829)
@@ -0,0 +1,88 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Perlanet::IronMan;
+use XML::Feed;
+use IronMan::Schema;
+use Data::Dumper;
+
+# 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} = "RSS";
+$cfg->{entries} = 5;
+
+# Database
+$cfg->{db}{dsn} = "dbi:SQLite:/var/www/ironboy.enlightenedperl.org/ironman/subscriptions.db";
+
+# Get me a Perlanet::IronMan thingy using our config from above
+my $p = Perlanet::IronMan->new( cfg => $cfg );
+
+# Should be calling run here
+#$p->run;
+#exit;
+
+# I'm taking run apart here
+$p->update_opml;
+
+# Get the list of feeds from the database
+print("Fetching feeds object\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' )
+
+#print(Dumper($feeds_obj));
+#exit;
+
+#print("Fetching the feed data\n");
+#my @feeds_data = $p->fetch_feeds( @{ $feeds_obj } );
+
+foreach my $feed ( @{ $feeds_obj } ) {
+ #print("Fetching posts from feed '" . $feed->url . "'\n");
+ my @feed_posts = $p->fetch_feeds( $feed );
+
+ #print(Dumper(@feed_posts));
+ #exit;
+
+ #print("Filtering posts to remove duplicates\n");
+ # Filter feed_posts for previously seen posts
+ @feed_posts = $p->select_entries(@feed_posts);
+
+ #print(Dumper(@feed_posts));
+ #exit;
+
+ #print("Building a post object\n");
+ my $post = $p->build_feed(@feed_posts);
+ $p->render($feed, $post);
+
+}
+
+
+#print(Dumper(@feeds_data));
+#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)
+
Property changes on: ironman/Perlanet-IronMan/bin/ironman-collector.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+
Deleted: ironman/perlanet-collector.pl
===================================================================
--- ironman/perlanet-collector.pl 2010-02-27 10:58:34 UTC (rev 8828)
+++ ironman/perlanet-collector.pl 2010-02-27 11:00:40 UTC (rev 8829)
@@ -1,88 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Perlanet::IronMan;
-use XML::Feed;
-use IronMan::Schema;
-use Data::Dumper;
-
-# 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} = "RSS";
-$cfg->{entries} = 5;
-
-# Database
-$cfg->{db}{dsn} = "dbi:SQLite:/var/www/ironboy.enlightenedperl.org/ironman/subscriptions.db";
-
-# Get me a Perlanet::IronMan thingy using our config from above
-my $p = Perlanet::IronMan->new( cfg => $cfg );
-
-# Should be calling run here
-#$p->run;
-#exit;
-
-# I'm taking run apart here
-$p->update_opml;
-
-# Get the list of feeds from the database
-print("Fetching feeds object\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' )
-
-#print(Dumper($feeds_obj));
-#exit;
-
-#print("Fetching the feed data\n");
-#my @feeds_data = $p->fetch_feeds( @{ $feeds_obj } );
-
-foreach my $feed ( @{ $feeds_obj } ) {
- #print("Fetching posts from feed '" . $feed->url . "'\n");
- my @feed_posts = $p->fetch_feeds( $feed );
-
- #print(Dumper(@feed_posts));
- #exit;
-
- #print("Filtering posts to remove duplicates\n");
- # Filter feed_posts for previously seen posts
- @feed_posts = $p->select_entries(@feed_posts);
-
- #print(Dumper(@feed_posts));
- #exit;
-
- #print("Building a post object\n");
- my $post = $p->build_feed(@feed_posts);
- $p->render($feed, $post);
-
-}
-
-
-#print(Dumper(@feeds_data));
-#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