[Bast-commits] r8830 - ironman/Perlanet-IronMan/bin

idn at dev.catalyst.perl.org idn at dev.catalyst.perl.org
Sat Feb 27 11:02:26 GMT 2010


Author: idn
Date: 2010-02-27 11:02:26 +0000 (Sat, 27 Feb 2010)
New Revision: 8830

Added:
   ironman/Perlanet-IronMan/bin/delete-spam.pl
Log:
Adding script to wash the feeds table

Added: ironman/Perlanet-IronMan/bin/delete-spam.pl
===================================================================
--- ironman/Perlanet-IronMan/bin/delete-spam.pl	                        (rev 0)
+++ ironman/Perlanet-IronMan/bin/delete-spam.pl	2010-02-27 11:02:26 UTC (rev 8830)
@@ -0,0 +1,71 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+=head1 SYNOPSIS
+
+ perl delete-spam.pl --db_path=/home/graeme/workspace/Ironman/ironman.db
+
+This script removes spammy content from the posts database and thus the feed.
+
+=cut
+
+use Data::Dumper;
+
+use IronMan::Schema;
+
+my ( $db_path );
+GetOptions(
+    'db_path=s'   => \$db_path,
+) or die pod2usage;
+
+unless($db_path) {
+   die pod2usage;
+}
+
+my $schema = IronMan::Schema->connect("dbi:SQLite:$db_path");
+
+my $banned = {};
+
+$banned->{domains}->{feeds.launchpad.net} = 1;
+$banned->{domains}->{feetloversblog.com} = 1;
+$banned->{domains}->{themarketarticles.com} = 1;
+$banned->{domains}->{femdomface.com} = 1;
+$banned->{domains}->{shemalecumfest.com} = 1;
+$banned->{domains}->{dementia.org} = 1;
+$banned->{domains}->{dementia.org} = 1;
+$banned->{domains}->{digitalffs.com} = 1;
+$banned->{domains}->{goutmatter.com} = 1;
+$banned->{domains}->{paintreatmentblog.com} = 1;
+
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+#$banned->{domains}->{} = 1;
+
+
+$banned->{names}->{xanax} = 1;
+$banned->{names}->{penis} = 1;
+$banned->{names}->{femdom} = 1;
+$banned->{names}->{shemale} = 1;
+$banned->{names}->{levitra} = 1;
+$banned->{names}->{cialis} = 1;
+
+#$banned->{names}->{} = 1;
+#$banned->{names}->{} = 1;
+#$banned->{names}->{} = 1;
+#$banned->{names}->{} = 1;
+#$banned->{names}->{} = 1;
+#$banned->{names}->{} = 1;
+
+
+
+#Grab the feeds with no links.
+my @feeds = $schema->resultset('Feed')->search({ link => undef })->all;
+




More information about the Bast-commits mailing list