summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-02 12:16:12 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-02 12:16:12 -0400
commit01bccbc17309d454e1ab3e0a118d84ed9ccc79f3 (patch)
tree85d40373909a4d5822b8b13a5ec6b589bc8bd021
parent08e040d2b79213e5632492f0b6f5e34924a99e4f (diff)
clean up
-rw-r--r--.gitignore3
-rwxr-xr-xautopatrol.rb1
-rwxr-xr-xblock-users.rb1
-rwxr-xr-xdelete-stdin.rb1
-rwxr-xr-xscratch.rb96
-rwxr-xr-xuser-whitelist.rb1
-rw-r--r--user-whitelist.txt48
7 files changed, 35 insertions, 116 deletions
diff --git a/.gitignore b/.gitignore
index 3cdd89b..1d3d6ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
-*cache
*.bak
+*.txt
+*cache
*~
diff --git a/autopatrol.rb b/autopatrol.rb
index cabc875..6928bf6 100755
--- a/autopatrol.rb
+++ b/autopatrol.rb
@@ -3,7 +3,6 @@
load 'mwapi.rb'
require 'yaml'
-require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
diff --git a/block-users.rb b/block-users.rb
index e9c2d84..ebf78df 100755
--- a/block-users.rb
+++ b/block-users.rb
@@ -3,7 +3,6 @@
load 'mwapi.rb'
require 'yaml'
-require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
diff --git a/delete-stdin.rb b/delete-stdin.rb
index 2f835c3..4300d6b 100755
--- a/delete-stdin.rb
+++ b/delete-stdin.rb
@@ -3,7 +3,6 @@
load 'mwapi.rb'
require 'yaml'
-require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
diff --git a/scratch.rb b/scratch.rb
index f52a562..b725a5a 100755
--- a/scratch.rb
+++ b/scratch.rb
@@ -3,70 +3,39 @@
load 'mwapi.rb'
require 'yaml'
-require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
mw.login(credentials['username'], credentials['password'])
-# apcontinue = ''
-# while not apcontinue.nil? do
-# print "Searching...\n"
-# data = mw.query(:list => :allpages,:aplimit => 200, :apcontinue => apcontinue)
-# titles = data['query']['allpages'].select{|page| page['title'].split(' ').length > 9 }.map{|page| page['title']}
-# print "Deleting #{titles.length} articles...\n"
-# if (titles.length > 0)
-# mw.delete_by_title(titles, { :reason => 'Spam' })
-# end
-# if data['query-continue'].nil?
-# apcontinue = nil
-# else
-# apcontinue = data['query-continue']['allpages']['apcontinue']
-# end
-# print "apcontinue = #{apcontinue.inspect}\n"
-# end
-
-# continue = ''
-# while not continue.nil? do
-# print "Searching...\n"
-# data = mw.query(:list => :allimages,:ailimit => 200, :aicontinue => continue)
-# titles = data['query']['allimages'].select{|page| /^File:[A-Z].* [0-9]?[0-9][0-9][0-9]\.jpg$/ =~ page['title'] }.map{|page| page['title']}
-# print "Deleting #{titles.length} articles...\n"
-# if (titles.length > 0)
-# mw.delete_by_title(titles, { :reason => 'Spam' })
-# end
-# if data['query-continue'].nil?
-# continue = nil
-# else
-# continue = data['query-continue']['allimages']['aicontinue']
-# end
-# print "continue = #{continue.inspect}\n"
-# end
-
-
@keywords=[
# brand names
/(Crimson|Pink|Purple|Green|Orange) Dye/i,
/Air Jordan/i,
/Andrew Ting/i,
/Beats by Dre/i,
+ /Braun 5270/i,
/Buccaneers/i,
/Canada Goose/i,
/Club Penguin/i,
/Diablo 3/i,
/Doudoune/i,
+ /Focus T25/i,
/Gamma Blue/i,
- /Garcinia/i,
+ /Google Pagerank/i,
/Jeffraham/i,
/Jillian Michaels/i,
/Jordan Fusion/i,
/Jordan Retro/i,
/Kate Spade/i,
/Michael[ _]Kors/i,
+ /\b(NBA|NFL)\b/i,
+ /\b(world|globe|planet) cup\b/i,
/\b49ers\b/i,
/\bCisco 200-120\b/i,
/\bDr\.? Dre\b/i,
/\bGucci\b/i,
+ /\bNike\b/i
/\bretro 11 /i,
/\buggs?\b/i,
/officialnflprostore/i,
@@ -81,14 +50,21 @@ mw.login(credentials['username'], credentials['password'])
/(body|excess) weight/i,
/Arrhythmia/i,
/Cardiovascular/,
+ /Garcinia/i,
/P90X/,
/Resistance Band/i,
+ /\bbodybuilding\b/i,
+ /\bhypertension\b/i,
+ /\bmuscle\b/i,
+ /\bstairlifts?\b/i,
+ /\bvegan\b/i,
/diabetes/i,
/dr oz/i,
/elliptical (equipment|machines?)/i,
/fat (burning|loss)/i,
/health care/i,
/heart (disease|attack)/i,
+ /hemorrhoids/i,
/herbalife/i,
/more wellness/i,
/pilates/i,
@@ -96,29 +72,35 @@ mw.login(credentials['username'], credentials['password'])
/skin care/i,
/weight[ -](loss|reduction)/i,
# sex topics
- /\b(sex|adult) cam/i,
/\b(male|breast) enhancement\b/i,
- /\bpenis\b/i,
- /viagra/i,
- # other topics
+ /\b(sex|adult) cam/i,
+ /\b(ejaculation|lesbian|penis|viagra)\b/i,
+ # consumer topics
+ /Possum (Removalist|Infestation)/i,
/\b(coffee|tea) extract\b/i,
- /\b(good|quality) social media\b/i,
/\b(green|ginseng) (coffee|tea)\b/i,
- /\b(world|globe|planet) cup\b/i,
/\bbaby shower\b/i,
- /\bcash loan\b/i,
- /\bclick here\b/i,
- /\bcredit (check|repair)\b/i,
- /\bcredit card\b/i,
/\bdiy l[ue]x[ue]ry\b/i,
/\bgreen pan\b/i,
/\bipage (web)?host/i,
+ /\bjerseys?\b/i,
/\bmen.?s (fashion|casual wear|health)\b/i,
/\brap beats\b/i,
/\breal estate\b/i,
/\bsearch engine (marketing|optimization)\b/i,
- /\bsocial media strategy\b/i,
/\bvigorous motivators\b/i,
+ /apartment moves/i,
+ /auto insurance/i,
+ /furniture removal/i,
+ /goji berr(ies|y)/i,
+ /jewellery/i,
+ # internet topics
+ /Twitter follower/i,
+ /\b(good|quality) social media\b/i,
+ /\bclick here\b/i,
+ /\bsocial media strategy\b/i,
+ /affiliate advertising/i,
+ /pay[ -]per[ -]click/i
# formats
/^(aid|assist) on (where|the place)/i,
/^A Background In/i,
@@ -126,22 +108,10 @@ mw.login(credentials['username'], credentials['password'])
/1st Impressions in/i,
/The (Selection|Choice|Decision) of the .* Is Your/i,
# unsorted
- /\b(chinchilla|jerseys?|vegan|shit|marketing|finance|footwear|shoes|muscle|lesbian|islamist|bodybuilding|nfl|nba|ejaculation|wholesale|nike|Hypertension|sherbet|bankrupt|stairlifts?|outfits|casinos?|surcharges?)\b/i,
+ /\b(chinchilla|shit|marketing|finance|footwear|shoes|islamist|wholesale|sherbet|bankrupt|outfits|casinos?|surcharges?)\b/i,
/(Plombier|Serrurier) paris/i,
- /Possum (Removalist|Infestation)/i,
- /Google Pagerank/i,
- /Twitter follower/i,
- /jewellery/i,
- /auto insurance/i,
- /apartment moves/i,
- /goji berr(ies|y)/i,
- /affiliate advertising/i,
- /hemorrhoids/i,
- /furniture removal/i,
- /cash online/i,
- /Braun 5270/i,
- /Focus T25/i,
- /pay[ -]per[ -]click/i
+ /\bcash (online|loan)/i,
+ /\bcredit (card|check|repair)\b/i,
]
def kw(title)
diff --git a/user-whitelist.rb b/user-whitelist.rb
index f6891a9..a9d3060 100755
--- a/user-whitelist.rb
+++ b/user-whitelist.rb
@@ -3,7 +3,6 @@
load 'mwapi.rb'
require 'yaml'
-require 'pp'
mw = MWApi.new('https://wiki.parabolagnulinux.org/api.php')
credentials = YAML.load_file('credentials.yml')
diff --git a/user-whitelist.txt b/user-whitelist.txt
deleted file mode 100644
index 5636806..0000000
--- a/user-whitelist.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Airon90
-Alfplayer
-Aurelien
-Brendan
-Coadde
-Danilovboas
-Djs
-ElkyDori
-Em3rgent0rdr
-Emulatorman
-Encyclomundi
-Erkan Yilmaz
-Fauno
-Fowlslegs
-Gaming4JC
-GNUtoo
-Habiloid
-Habstinat
-Icarious
-Jaycee
-Jbranso
-Jbsys
-Jorginho
-Jpgg
-Jyaworski
-Kobe
-Leth
-Lukeshu
-Monphey
-Mtjm
-Nicoals
-Opticnerve
-Otyugh
-Parabolawiki
-Quiliro
-Rakyi
-Sayurlodeh
-Sergi
-Shackra
-Smile4ever
-Smv
-Svitostar
-Sysfu
-T67t67
-T67t67t67
-Xihh
-Xylon
-Zykotick9