Author Topic: Automatic Tremulous Map Downloader  (Read 53292 times)

Glunnator

  • Posts: 865
  • Turrets: +5/-6
Automatic Tremulous Map Downloader
« Reply #30 on: August 15, 2006, 11:50:23 am »
Aw, nuts! :)

Quote from: (Cebt)Glunnator
HAVE FUN PPL, IT'S THE MEANING OF LIFE TO LOOK AT THE BRIGHT SIDE OF IT! ;)

Aninhumer

  • Posts: 116
  • Turrets: +0/-0
Automatic Tremulous Map Downloader
« Reply #31 on: August 15, 2006, 11:58:57 am »
While I would like an apt repository for the maps, the app works fine under wine.
I'll just run it now so I don't have to worry about maps until there is an update.

Somethief

  • Posts: 284
  • Turrets: +1/-1
    • http://www.somethief.net/
Automatic Tremulous Map Downloader
« Reply #32 on: August 15, 2006, 12:05:10 pm »
Quote from: "Aninhumer"
While I would like an apt repository for the maps, the app works fine under wine.
I'll just run it now so I don't have to worry about maps until there is an update.


But under wine it cant directly copy files to trem dir?
The list of maps is public btw, http://tremmap.omgwtf.nl/tremmapdownload.php holds list of files the server has (starting from third line).
url=http://fi.tremulous.net/]Tremulous Suomi[/url]
My blog

Bajsefar

  • Posts: 597
  • Turrets: +49/-39
Automatic Tremulous Map Downloader
« Reply #33 on: August 15, 2006, 01:40:25 pm »
Quote from: "Lava Croft"
Good job Somethief, I think you made a lot of lazy people really happy:)


Lazy people like me.

http://tremulous.net/phpBB2/viewtopic.php?t=1409

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #34 on: August 15, 2006, 02:29:22 pm »
Quote from: "Somethief"
The list of maps is public btw, http://tremmap.omgwtf.nl/tremmapdownload.php holds list of files the server has (starting from third line).


WOOT!!!
i'll make somthing to exploit this in a min.
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.

Somethief

  • Posts: 284
  • Turrets: +1/-1
    • http://www.somethief.net/
Automatic Tremulous Map Downloader
« Reply #35 on: August 15, 2006, 02:33:28 pm »
Quote from: "David"


WOOT!!!
i'll make somthing to exploit this in a min.


I guess so too -.-
url=http://fi.tremulous.net/]Tremulous Suomi[/url]
My blog

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #36 on: August 15, 2006, 03:15:35 pm »
Code: [Select]
#!/bin/bash

#get the list
wget http://tremmap.omgwtf.nl/tremmapdownload.php -O /tmp/tremmaplist

#drop the first 3 lines
Lines=`wc -l < /tmp/tremmaplist`
tail -n $(($Lines-3)) /tmp/tremmaplist > /tmp/tremmaplist2

#download the files
wget -i /tmp/tremmaplist2 -B http://tremmap.omgwtf.nl/

#del the temp files
rm /tmp/tremmaplist
rm /tmp/tremmaplist2


this *should* stick the maps in the folder where it run.
it works for me, hopefuly it will for you.
relesed under GPL, no warrenty and all that.
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.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #37 on: August 15, 2006, 04:42:20 pm »
this is a bit of a hack but... you should add -c to wget so you don't download maps that you already have (plus things work better if your internet connection goes out on you for some reason as it did to me when i tested this script)
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

WolfWings ShadowFlight

  • Posts: 140
  • Turrets: +0/-0
Improved Linux auto-downloader script...
« Reply #38 on: August 15, 2006, 04:45:34 pm »
http://wolfwings.us/tremulous/mapupdate.sh.gz

Code: [Select]
#!/bin/bash

#get the raw file list
Files=`wget http://tremmap.omgwtf.nl/tremmapdownload.php -q -O -`

#line count
Lines=`echo -e "$Files" | wc -l`

#download the files (skip the first 3 lines, they are a header)
echo -e "$Files" | tail --lines=$[$Lines - 3] - | wget -i - -B http://tremmap.omgwtf.nl;


I removed the need for temporary files except for the actual downloading part. It still stores the files in the 'current' directory as your version did.
img]http://wolfwings.us/sigs/WolfWings.jpg[/img]

WolfWings ShadowFlight

  • Posts: 140
  • Turrets: +0/-0
Automatic Tremulous Map Downloader
« Reply #39 on: August 15, 2006, 04:47:32 pm »
Quote from: "kevlarman"
this is a bit of a hack but... you should add -c to wget so you don't download maps that you already have (plus things work better if your internet connection goes out on you for some reason as it did to me when i tested this script)


If you don't kill the script, wget will automatically retry and continue the download where it left off without the -c option once the connection comes back up.
img]http://wolfwings.us/sigs/WolfWings.jpg[/img]

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #40 on: August 15, 2006, 04:50:33 pm »
the $[ ] has been deprecated and is going to be removed, so for future proofing

Code: [Select]
#!/bin/bash

#get the raw file list
Files=`wget http://tremmap.omgwtf.nl/tremmapdownload.php -q -O -`

#line count
Lines=`echo -e "$Files" | wc -l`

#download the files (skip the first 3 lines, they are a header)
echo -e "$Files" | tail --lines=$(($Lines - 3)) - | wget -i - -c -B http://tremmap.omgwtf.nl/


i also added the -c
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.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #41 on: August 15, 2006, 04:54:26 pm »
Quote from: "David"
the $[ ] has been deprecated and is going to be removed, so for future proofing

Code: [Select]
#!/bin/bash

#get the raw file list
Files=`wget http://tremmap.omgwtf.nl/tremmapdownload.php -q -O -`

#line count
Lines=`echo -e "$Files" | wc -l`

#download the files (skip the first 3 lines, they are a header)
echo -e "$Files" | tail --lines=$(($Lines - 3)) - | wget -i - -c -B http://tremmap.omgwtf.nl/


i also added the -c
all right, it's official: i needto get a clue about bash scripting.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #42 on: August 15, 2006, 05:08:11 pm »
For all you windows users out there? see the power of open source?
i posted it, and with in half an hour it has been massivly upgraded by lots of people all working togever.
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.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #43 on: August 15, 2006, 05:12:54 pm »
Quote from: "David"
For all you windows users out there? see the power of open source?
i posted it, and with in half an hour it has been massivly upgraded by lots of people all working togever.
that and the fact that you did it in 3 lines of code (and could have done it in 1.5 in perl)
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

[db@]Megabite

  • Posts: 613
  • Turrets: +3/-0
    • http://www.tremulous.info
Automatic Tremulous Map Downloader
« Reply #44 on: August 15, 2006, 05:18:15 pm »
Windows and Open Source are no real enemies... I use Windows at home (for gaming reasons mostly ;)) and use open source software most of the time... firefox, thunderbird, gimp, gaim, tremulous...

I love sh though, greatly helps administrating my servers... can't wait to use the Windows Vista scripting console once it is done... :D

Danny

P.S.: Posted the final script on tremulous.info
url=http://www.tremulous.info][/url]


kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #45 on: August 15, 2006, 05:25:36 pm »
Quote from: "[db@
Megabite"]Windows and Open Source are no real enemies... I use Windows at home (for gaming reasons mostly ;)) and use open source software most of the time... firefox, thunderbird, gimp, gaim, tremulous...

I love sh though, greatly helps administrating my servers... can't wait to use the Windows Vista scripting console once it is done... :D

Danny

P.S.: Posted the final script on tremulous.info
windows vista is a resource hog, so i wouldn't recommend using it (for gaming reasons;))
i had to dual boot for a while this summer to run some software that only works on windows, and i absolutely couldn't stand working with windows after i was spoiled by ubuntu dapper, so i don't know how you do it, now my windows install never gets to execute any code outside vmware.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Nosfore

  • Posts: 116
  • Turrets: +0/-0
Automatic Tremulous Map Downloader
« Reply #46 on: August 15, 2006, 05:31:33 pm »
Quote from: "David"
Quote from: "Odin"
Wouldn't it be much better if it worked like apt?

lets submit a tremulous-maps-beta package!
then someone has to keep it up to date, and all is sorted!.


Oh my god! Greatest idea of the week.

I DEMAND a Tremulous Map package!

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #47 on: August 15, 2006, 05:34:02 pm »
Quote from: "Nosfore"
Quote from: "David"
Quote from: "Odin"
Wouldn't it be much better if it worked like apt?

lets submit a tremulous-maps-beta package!
then someone has to keep it up to date, and all is sorted!.


Oh my god! Greatest idea of the week.

I DEMAND a Tremulous Map package!
technically it should be a meta-package that depends on the packages of the individual maps, so you don't have to download 50MB every time someone releases a new map.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

WolfWings ShadowFlight

  • Posts: 140
  • Turrets: +0/-0
Automatic Tremulous Map Downloader
« Reply #48 on: August 15, 2006, 05:38:26 pm »
Quote from: "David"
the $[ ] has been deprecated and is going to be removed


Looking at http://www.gnu.org/software/bash through the FAQ, current reference manual, and every mailing list I was able to find with Google, I was unable to find any statement to this effect. Source, please?
img]http://wolfwings.us/sigs/WolfWings.jpg[/img]

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #49 on: August 15, 2006, 07:52:22 pm »
Quote from: "WolfWings ShadowFlight"
Quote from: "David"
the $[ ] has been deprecated and is going to be removed


Looking at http://www.gnu.org/software/bash through the FAQ, current reference manual, and every mailing list I was able to find with Google, I was unable to find any statement to this effect. Source, please?


i'm on xubuntu drapper.
when i do man bash, about line 1445 onwards reads
Quote from: "man bash"
Arithmetic Expansion
       Arithmetic  expansion allows the evaluation of an arithmetic expression
       and the substitution of the result.  The format for  arithmetic  expan‐
       sion is:

              $((expression))

       The  old  format  $[expression]  is  deprecated  and will be removed in
       upcoming versions of bash.


       The expression is treated as if it were within  double  quotes,  but  a
       double  quote  inside  the  parentheses  is not treated specially.  All
       tokens in the expression undergo parameter expansion, string expansion,
       command  substitution, and quote removal.  Arithmetic expansions may be
       nested.



Quote from: "kevlarman"
that and the fact that you did it in 3 lines of code (and could have done it in 1.5 in perl)

could have been 1 in bash. remove comments and put ; between commands.
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.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Automatic Tremulous Map Downloader
« Reply #50 on: August 15, 2006, 07:55:38 pm »
Quote from: "David"

could have been 1 in bash. remove comments and put ; between commands.

i meant without cheating.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Teiman

  • Posts: 286
  • Turrets: +0/-0
Re: Automatic Tremulous Map Downloader
« Reply #51 on: August 15, 2006, 08:26:33 pm »
On Linux, with wine, fail. Try to download then show a error. Also the directory where the files are searched and downloaded are not visible, that is a important feature you sould code.

WolfWings ShadowFlight

  • Posts: 140
  • Turrets: +0/-0
Automatic Tremulous Map Downloader
« Reply #52 on: August 15, 2006, 11:23:19 pm »
Quote from: "David"
i'm on xubuntu drapper.
when i do man bash, about line 1445 onwards reads


Thanks, was able to back-track between my version and that version and trace through the chngelog. Apparently Gentoo updated 'around' that depreciated statement. I still haven't been able to find any discussion on the actually BASH-development mailing lists about this though, so the depreciation may have been retroactively cancelled, or they may be proceeding. Thanks for the heads up though. :-)
img]http://wolfwings.us/sigs/WolfWings.jpg[/img]

[db@]Megabite

  • Posts: 613
  • Turrets: +3/-0
    • http://www.tremulous.info
Automatic Tremulous Map Downloader
« Reply #53 on: August 15, 2006, 11:39:27 pm »
Quote from: "kevlarman"
windows vista is a resource hog, so i wouldn't recommend using it (for gaming reasons;))
i had to dual boot for a while this summer to run some software that only works on windows, and i absolutely couldn't stand working with windows after i was spoiled by ubuntu dapper, so i don't know how you do it, now my windows install never gets to execute any code outside vmware.


Vista is not finished yet, and will not be finished by its release date... we will have to wait at least half a year or so until it is usable after release. Serious gaming will harldly go on without it as direct3d10 will only come on vista and there is not even a usable direct3d9 implementation for Linux yet. Yes, I have tried Cedega...

I am using my machine at home 90% for gaming so I am kinda bound to windows. Otherwise I would happily run Gentoo... ;)
At work I have to cope with Windows, Linux, MacOS and others... so I am used to all the good and bad sides of all systems. None of them is perfect, all of them have faults... it is just a decision of what you want to use your machine for which operation system to use.
I am not a windows fan, but I am not a Linux fan either. They are both not black or white but different shades of gray.

Danny
url=http://www.tremulous.info][/url]


David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #54 on: August 15, 2006, 11:43:17 pm »
Quote from: "[db@
Megabite"]Serious gaming will harldly go on without it as direct3d10 will only come on vista


yes, but no games will requre dx10  for a LONG time.
all games will suppory dx9 and win XP untill the migroity of the users have vista.  afaik there are no dx10 games in the pipeline (bar MS games)
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.

Thorn

  • Guest
Automatic Tremulous Map Downloader
« Reply #55 on: August 15, 2006, 11:49:28 pm »
Quote from: "David"
Quote from: "[db@
Megabite"]Serious gaming will harldly go on without it as direct3d10 will only come on vista


yes, but no games will requre dx10  for a LONG time.
all games will suppory dx9 and win XP untill the migroity
 of the users have vista.  afaik there are no dx10 games in
 the pipeline (bar MS games)



What really pissed me off is the fact that there
 WILL BE NO DX10 FOR WIN XP.of course somebody
 will crack dx10. but ofcourse ms want money STILL.

hi , im bill gates , im the richest man on the planet. Btw do
you have any spare cash in your wallet that youd like to give me?

[db@]Megabite

  • Posts: 613
  • Turrets: +3/-0
    • http://www.tremulous.info
Automatic Tremulous Map Downloader
« Reply #56 on: August 16, 2006, 12:06:52 am »
1. There is Crysis by Crytek, the makers of Far Cry. DX9 version will be okay, but geeks like me want all the eye-candy... ;)

2. If I owned a company like Microsoft and had several hundred developers working for years on a project like Vista costing millions of $ I would expect people to pay for the new features the new OS brings and I had payed for developing. Where is the problem with that?

3. Nobody compels you to buy vista. Stay with XP or Ubuntu or whatever you want. Nobody comples you to drive a Porsche, stay with a Volkswagen or whatever you want... ;)

Danny
url=http://www.tremulous.info][/url]


David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Automatic Tremulous Map Downloader
« Reply #57 on: August 16, 2006, 12:13:19 am »
so its,
ubuntu = porch
xp = dump truck with moped moter
vista = dump truck full of lead with moped moter
 :)
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.

Thorn

  • Guest
Automatic Tremulous Map Downloader
« Reply #58 on: August 16, 2006, 12:15:15 am »
WRONG . Everything compels you to to buy vista. they are dropping ALL 3d support for XP.

oh and Crysis? OH BOY OH BOY!!!!!! If only i could play right now!!! i watched the 15mins of ingame footage and things. Pretty fricken neat!

ok now were taking this TO far of topic

the Auto download idea looks neat btw

[db@]Megabite

  • Posts: 613
  • Turrets: +3/-0
    • http://www.tremulous.info
Automatic Tremulous Map Downloader
« Reply #59 on: August 16, 2006, 12:15:45 am »
Sure, I'd love to see you fire up Call of Duty2 on Ubuntu 1680x1050, 4XFSAA, 8xAnisotropic Filtering and get steady 125FPS. ;)

Danny
url=http://www.tremulous.info][/url]