#!/usr/bin/perl
# Rob Myers 2009
# Dedicated to the public domain (copyright and moral rights repudiated/waived)
# Save and set as the script to call for the Rhizome feed in your feed reader
my $xml = `curl –silent http://feeds.feedburner.com/rhizome-fp?format=xml`;
$xml =~ s/<item.*?<dc:creator>John Michael Boling<\/dc:creator>.*?<\/item>//sg;
print $xml;
This one's a little more "fun". It won't work with a feed reader. Maybe if I find the time I'll fix that.
#!/usr/bin/perl
use LWP::UserAgent;
use XML::Simple;
# Rob Myers 2009
# Dedicated to the public domain (copyright and moral rights repudiated/waived)
# Modified by Pall Thayer
# Dedicated to my wife and kids (copypaste and floral rights regurgitated/waved)
# Save and set as the script to call for the Rhizome feed in your feed reader
# Pall: This won't work with your feed reader but I'm guessing some will get the idea
my $content;
my $end = "ay";
my $ua = LWP::UserAgent->new;
my $response = $ua->get('http://feeds.feedburner.com/rhizome-fp?format=xml');
if($response->is_success) {
$content = $response->content;
}
my $parser = new XML::Simple;
my $data = $parser->XMLin($content);
foreach my $item (@{$data->{item}}){
print $item->{'dc:date'}." ".$item->{'dc:creator'}."\n";
if($item->{'dc:creator'} =~ /John Michael Boling/){
my @words = split(' ', $item->{'description'});
$item->{'description'} = '';
foreach(@words){
if($_ =~ /^([bcdfghjklmnpqrstvwxyz]+)(.*)/){
$item->{'description'} .= $2.$1.$end.' ';
}else{
$item->{'description'} .= $_.$end.' ';
}
}
}
print $item->{'title'}."\n".$item->{'description'}."\n\n";
}
#my $xml = `curl –silent http://feeds.feedburner.com/rhizome-fp?format=xml`;
#$xml =~ s/<item.*?<dc:creator>John Michael Boling<\/dc:creator>.*?<\/item>//sg;
I cleaned this up a bit to make it display better in the terminal:
#!/usr/bin/perl
use LWP::UserAgent;
use XML::Simple;
## Rob Myers 2009
## Dedicated to the public domain (copyright and moral rights repudiated/waived)
## Modified by Pall Thayer
## Dedicated to my wife and kids (copypaste and floral rights regurgitated/waved)
## Save and set as the script to call for the Rhizome feed in your feed reader
## Pall: This won't work with your feed reader but I'm guessing some will get the idea
my $content;
my $end = "ay";
my $ua = LWP::UserAgent->new;
my $response = $ua->get('http://feeds.feedburner.com/rhizome-fp?format=xml');
if($response->is_success) {
$content = $response->content;
}
my $parser = new XML::Simple;
my $data = $parser->XMLin($content);
foreach my $item (@{$data->{item}}){
print $item->{'dc:date'}." ".$item->{'dc:creator'}."\n";
$item->{'description'} =~ s/<[^>]*>//g;
if($item->{'dc:creator'} =~ /John Michael Boling/){
my @words = split(' ', $item->{'description'});
$item->{'description'} = '';
foreach(@words){
if($_ =~ /^([bcdfghjklmnpqrstvwxyz]+)(.*)/i){
$item->{'description'} .= $2.$1.$end.' ';
}else{
$item->{'description'} .= $_.$end.' ';
}
}
}
print $item->{'title'}."\n".$item->{'description'}."\n\n";
}
##my $xml = `curl –silent http://feeds.feedburner.com/rhizome-fp?format=xml`;
##$xml =~ s/<item.*?<dc:creator>John Michael Boling<\/dc:creator>.*?<\/item>//sg;