Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You could create your own RSS generator...

    (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;
    • 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
    • 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
  • You could use Yahoo! Pipes [yahoo.com] to filter the comments feed by author.

    • 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
    • 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
    • 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
      • 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
        • If I grab somebody’s most recent 24 comments once an hour with a program, that wouldn’t negatively impact anything, would it?

          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?

          • 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
  • 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.

    • Thank you!

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • 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