8 # TODO cmd line option to actually delete the groups
10 # TODO use LWP::UserAgent to fetch a file and load it
13 my $db = DBI->connect(undef,undef,undef,{RaiseError=>1,AutoCommit=>0});
15 $db->do('create temp table newnewsgroups (like newsgroups including defaults)');
16 $db->do('create index newnewsgroups_idx on newnewsgroups(newsgroup)');
18 my $i = $db->prepare('insert into newnewsgroups (newsgroup,posting,creator) values (?,?,?)');
19 my $rmgroup = $db->prepare('update newsgroups N set active = false where local != true and not exists (select newsgroup from newnewsgroups where newsgroup = N.newsgroup)');
20 my $newgroup = $db->prepare('insert into newsgroups select * from newnewsgroups N where not exists (select 1 from newsgroups where newsgroup = N.newsgroup)');
24 my ($group, undef, undef, $mod) = split(/\s+/, $_);
25 $i->execute($group,$mod,'iscactivefile');
33 aaa.inu-chan 0000000000 0000000001 m
34 ab.arnet 0000000000 0000000001 m
35 ab.general 0000000000 0000000001 y
36 ab.jobs 0000000000 0000000001 y
37 ab.politics 0000000000 0000000001 y
38 abg.allgemein 0000000000 0000000001 y
39 abg.amiga 0000000000 0000000001 y
40 abg.comp 0000000000 0000000001 y
41 abg.diskussion 0000000000 0000000001 y
42 abg.english 0000000000 0000000001 y