NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
XML::RSS::FromHTML::Simple (Score:1)
(untestet)
use XML::RSS::FromHTML::Simple;
my $proc = XML::RSS::FromHTML::Simple->new({
url => "http://use.perl.org/~reneeb",
rss_file => "new_comments.xml",
});
$proc->link_filter( sub {
my($link, $text) = @_;
# Only extract links that contain 'comments.pl'
# in their URL
if( $link =~ m#comments\.pl#) {
return 1;
} else {
return 0;
Re: (Score:2)
Thank you. I feel like somebody just did my homework for me! :) I've yet to create an RSS feed any where, using any mechanism (other than gluing some stuff together with Yahoo Pipes), so having this example is going to be good for me in several ways as I move in to this. :)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re: (Score:2)
I owe you a cheap meal for giving me this, and the author of this module a moderately expensive meal for enabling logging with Log4perl. :)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Pipes (Score:1)
You could use Yahoo! Pipes [yahoo.com] to filter the comments feed by author.
Re: (Score:2)
Thought about that. So far all I've done with Pipes is a bit of gluing, sorting, and filtering by keyword in the subject. But I need to flex those muscles a bit. :)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re: (Score:2)
There you go [yahoo.com]. Just my comments. Of course, it only gets the ones that show up in the most recent 24 comments, rather than getting my most recent 24 comments. And it won't work on Slashdot. :)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
No content in the comments feed (Score:1)
Re: (Score:2)
Yeah, that is a problem. Maybe they can be mined.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re: (Score:2)
pudge, if you're reading this, some guidance as to acceptable use would be appreciated. If I grab somebody's most recent 24 comments once an hour with a program, that wouldn't negatively impact anything, would it?
Hmm, maybe pipes can be used to take the basic comment search feed and then fetch the content of the comments....
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re: (Score:1)
Why do you want to poll every hour? Do you need to see them that quickly? Do they write more close to 24 comments in an hour?
Re: (Score:2)
Suppose I'm pulling on Slashdot, not use Perl....
It's a situation where a person might not write more than 24 comments per day on average, but might have a short burst where they write much more rapidly and comments might be missed.
And there's really nothing magic about the one hour interval; that was just what I suggested in trying to gauge how often polling might be appropriate.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Full text feed for all users (Score:1)
I provide a full text feed of all journal entries. I wrote up how I did that [ngo.org.uk].
Feel free to take that and do what you will with it.
Re: (Score:2)
Thank you!
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re: (Score:2)
For the record, if you grab the journal feed some others mentioned in response to one of my earlier entries, you'll also get full text, straight from use Perl. But it doesn't work for comments.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers