User:TalBot/dickinson-uncat.sh


 * 1) !/bin/bash


 * 1) Remove pages from Emily Dickinson categories
 * 2) Copyright (C) 2006, GrafZahl (en.wikisource.org user)
 * 3) Licence: GPLv2
 * 4) Give throttle as argument
 * 1) Licence: GPLv2
 * 2) Give throttle as argument
 * 1) Give throttle as argument
 * 1) Give throttle as argument


 * 1) Category tree file was generated with category.py and then junk-chopped with
 * 2) sed(1)

PYTHON=/usr/bin/python CATSCRIPT=category.py TREEFILE=dickinson.tree


 * 1) Check throttle sanity

THROTTLE=$1

if [ -z $THROTTLE ]; then echo "(EEE) Please give a throttle as first argument"; exit 1; fi;

if [ $THROTTLE -lt 5 ]; then echo "(EEE) Throttle should be at least 5 seconds"; exit 1; fi;

while read category; do	# Sleep just to be sure echo "(III) Sleeping for $THROTTLE seconds"; sleep $THROTTLE; echo "(III) Removing Category $category from all pages"; $PYTHON $CATSCRIPT remove -from:"$category" -batch -putthrottle:$THROTTLE; done < $TREEFILE