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

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Wednesday May 12, 2004
03:48 PM

Stupid Mac::Glue Tricks: NetNewsWire Killfile

[ #18720 ]

This doesn't remove the article, but it marks it as read, sorta. It doesn't apparently update the UI if that subscription is currently open in the UI, and the like.

Modify to suit taste. I think this only works in the pay version of NNW.

#!/usr/bin/perl
use strict;
use warnings;
 
use Mac::Glue ':all';
 
my $nnw = new Mac::Glue 'NetNewsWire';
my $headlines = $nnw->obj(
    headlines => whose(creator => equals => 'JonKatz'),
    subscription => whose(display_name => contains => 'Slashdot')
);
print $headlines->prop('isread')->set(to => 1);

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.