User:Jasonjason/UDtoolList: Difference between revisions
Jasonjason (talk | contribs) (out of the sandbox, you. This needs its own page.) |
Jasonjason (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
And edit your path so that you can run scripts there | And edit your path so that you can run scripts there | ||
<code><nowiki>$ PATH=$PATH:~/scripts</nowiki></code> | <code><nowiki>$ PATH=$PATH:~/scripts</nowiki></code> | ||
If you don't have curl installed on your computer and you're using a distro that uses apt-get: | |||
<code><nowiki>$ sudo apt-get install curl</nowiki></code> | |||
Copy and paste this and save it as updateUDtool.sh in your scripts folder: | Copy and paste this and save it as updateUDtool.sh in your scripts folder: |
Revision as of 21:51, 5 March 2010
Daily auto-updating UDtool list on Linux with the RG list and the zerg liste which requires no work on your part once it's set up. Commands that should be typed at the command line start with $ to indicate your command prompt, omit it if copy/pasting commands into your terminal.
Make a folder to house scripts, if you don't already have one:
$ mkdir scripts
And edit your path so that you can run scripts there
$ PATH=$PATH:~/scripts
If you don't have curl installed on your computer and you're using a distro that uses apt-get:
$ sudo apt-get install curl
Copy and paste this and save it as updateUDtool.sh in your scripts folder:
#!/bin/bash
# removing the old list to start
rm ~/UDtoolList.txt
# colors for the lists come first
echo "#00ff64,Zergs
#770000,Wanted
#FF7256,Past PKers" > ~/UDtoolList.txt
# grabbin' the zerg list
wget -O ~/zerglist.txt http://zombies.dementiastudios.org/boards/index.php?topic=12.0
sed 's/<br \/>/\n/g' ~/zerglist.txt | grep "Zergs,Zerger" >> ~/UDtoolList.txt
# grabbin' the RG list
curl -d State="UD Tool list" "http://www.ud-malton.info/Rogues_Gallery.cgi" | grep -v "#" >> ~/UDtoolList.txt
rm ~/zerglist.txt
Make the file executable:
$ chmod +x ~/scripts/updateUDtool.sh
Run it for the first time:
$ ~/scripts/updateUDtool.sh
Now change your UDtool settings to use the new list, called UDtoolList.txt and located in your home folder.
Now, copy paste this to a text editor and save it as updateUDtool.cron in your scripts folder
20 4 * * * ~/scripts/updateUDtool.sh
And type this in your terminal to set that as a cron job:
$ crontab ~/scripts/updateUDtool.cron
Then, your UD tool list will be updated every day at 4:20 am. You can change the time by changing the updateUDtool.cron file. If you found this useful, let me know.