Poll

Do you like my map downloader?

Yes
2 (66.7%)
Yes
1 (33.3%)

Total Members Voted: 3

Voting closed: December 09, 2006, 02:34:24 pm

Author Topic: My Linux Map Downloader thingy  (Read 7086 times)

AzraelUK

  • Posts: 15
  • Turrets: +0/-0
My Linux Map Downloader thingy
« on: December 09, 2006, 02:34:24 pm »
I made a script to download all the 3rd party maps off of tremulous.info's servers into your base directory.

Instructions:
1. Copy+paste the code into a text document, and save it as 'tremmaps'.
2. Open up the console, and type in 'chmod u+x tremmaps'
3. Then type './tremmaps'. You no longer have to be root like in previous versions because David pointed out that tremulous reads from ~/.tremulous as well as /usr/local/share/games/tremulous.

Code:
Code: [Select]
#!/bin/sh
#!/bin/sh
clear
version="0.4"
currentdir=$PWD
BOLD="\033[1m"
END="\033[0m"
ERR="\033[31m"
cd ~/.tremulous/base
echo "Tremulous Map downloader v$version"
echo "Copyright 2006 Peter \"Azrael\" Bunyan"
echo
echo $BOLD">> Beginning File Download..."$END
wget -nv -rN -r -l1 -A "*.pk3" http://mercenariesguild.net/base/ -nd && echo $BOLD"-- Files downloaded."$END || echo $ERR"!! Files did not download properly!"$END
echo $BOLD"Done!"$END
cd $currentdir
exit 0


Edit: I should point out that this TremMaps thing is as much of a learning experience for me as it is a utility for you. As such, any constructive criticism will be welcomed. This version will be under development all the time, so I've added a version variable.
quote="Aziere"]Azrael is the only one who ain't an idiot it seems. [/quote]

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
My Linux Map Downloader thingy
« Reply #1 on: December 09, 2006, 02:58:02 pm »
You have to be root?
No way I'm running that.

Code: [Select]
#!/bin/bash
cd ~/.tremulous/base
wget http://www.techmight.com/base/ -c -nv -np -r -l1 -nd -nH -A*.pk3


does exactly the same....

EDIT: Nice poll...
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Caveman

  • Guest
My Linux Map Downloader thingy
« Reply #2 on: December 09, 2006, 03:08:28 pm »
The second option should read "Hello NO!"

khalsa

  • Administrator
  • Posts: 597
  • Turrets: +187/-132
    • http://www.mercenariesguild.net
My Linux Map Downloader thingy
« Reply #3 on: December 09, 2006, 03:19:38 pm »
A) I doubt you have permission to leech off tremulous.info

B) Your script,poll, and ascii art suxorz.

C) David's script pwned yours. Does the same thing, gives you access to many many more maps, and is still fresh in the morning.

D) Your poll is stupid. I voted no.

Khalsa
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

AzraelUK

  • Posts: 15
  • Turrets: +0/-0
My Linux Map Downloader thingy
« Reply #4 on: December 09, 2006, 04:00:18 pm »
Quote from: "khalsa"
A) I doubt you have permission to leech off tremulous.info

B) Your script,poll, and ascii art suxorz.

C) David's script pwned yours. Does the same thing, gives you access to many many more maps, and is still fresh in the morning.

D) Your poll is stupid. I voted no.

Khalsa


Thanks for that. I can learn a lot from what you just said.

Quote from: "Azrael"

As such, any constructive criticism will be welcomed.


Not sure you lot noticed the word 'CONSTRUCTIVE'. Jackass.

Quote from: "David"
You have to be root?
No way I'm running that.

Code: [Select]
#!/bin/bash
cd ~/.tremulous/base
wget http://www.techmight.com/base/ -c -nv -np -r -l1 -nd -nH -A*.pk3


does exactly the same....

EDIT: Nice poll...


I use Ubuntu, so I'm used to using sudo. It doesn't like it without sudo.

I've never heard of techmight, I'll update it to use that if I can get permission from them.
quote="Aziere"]Azrael is the only one who ain't an idiot it seems. [/quote]

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: My Linux Map Downloader thingy
« Reply #5 on: December 09, 2006, 04:10:36 pm »
First, the maps should go in the ~/.tremulous/base folder, of if not, it should let you run it as some other user account.
Lots of servers will have a trem account, and some not root access.
You can use test -w to check if you can write there.

Also, tremulous.info has before asked people not to take maps from there with scripts.

Also, remembering the folder isn't necessary, as unless you run it with . ./tremmaps, the change will not be remembered. (I used to make the same mistake).

Sorry my last post was so critical.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

AzraelUK

  • Posts: 15
  • Turrets: +0/-0
My Linux Map Downloader thingy
« Reply #6 on: December 09, 2006, 04:33:24 pm »
Thanks for the info David - do you know about techmight.com's policy on script downloading?
quote="Aziere"]Azrael is the only one who ain't an idiot it seems. [/quote]

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
My Linux Map Downloader thingy
« Reply #7 on: December 09, 2006, 04:38:38 pm »
Khalsa just moved it all to http://mercenariesguild.net/base/
I think techmight is going to redirect to there.

afaik its free for all.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Caveman

  • Guest
My Linux Map Downloader thingy
« Reply #8 on: December 09, 2006, 05:28:56 pm »
Quote from: "AzraelUK"

Not sure you lot noticed the word 'CONSTRUCTIVE'. Jackass.


What kahlsa did was constructive, but maybe you need a ubuntu-gui if you can not access the information directly :P

Anyhows, you introduced yourself quite nicely and made sure that you get loads less help after this.

As for your script... didn't it cross your mind that downloading without any checks can screw up your game to the point you have to reinstall?

Another thing...
Code: [Select]
echo "Copyright 2006 Peter \"Azrael\" Bunyan"
that line is totally inapropriate as you did not invent something new, granted it does boost one's ego to see a copyright with one's name in it, but that is all it does in this instance.

khalsa

  • Administrator
  • Posts: 597
  • Turrets: +187/-132
    • http://www.mercenariesguild.net
My Linux Map Downloader thingy
« Reply #9 on: December 09, 2006, 05:55:18 pm »
I was in the process of moving things from techmight to the main MG website when David posted this, this morning.

Everyone is welcome to use www.mercenariesguild.net/base for their scripts, in-game http downloads, or any other use you come up with.


Khalsa
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

Caveman

  • Guest
My Linux Map Downloader thingy
« Reply #10 on: December 09, 2006, 05:57:25 pm »
Thanks Khalsa, highly appreciated. If the traffic gets too much, talk to me :)

khalsa

  • Administrator
  • Posts: 597
  • Turrets: +187/-132
    • http://www.mercenariesguild.net
My Linux Map Downloader thingy
« Reply #11 on: December 09, 2006, 06:03:23 pm »
Quote from: "Caveman"
Thanks Khalsa, highly appreciated. If the traffic gets too much, talk to me :)


No problem. If the traffic gets to be around 50-60gb per month for that directory + the main MG website(www.mercenariesguild.net , check it out lot's of cool things :-P [shameless plug] )  I'll spread it around some other servers (like techmight), or I will definitely contact you.

Thanks for the offer of help!


Khalsa
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ