Quake3World.com Forums
     Programming Discussion
        [^misantropia^] little insite if you have some time.


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: [^misantropia^] little insite if you have some time.

Gibblet
Gibblet
Joined: 09 Jan 2012
Posts: 15
PostPosted: 01-30-2012 07:56 PM           Profile Send private message  E-mail  Edit post Reply with quote


[^misantropia^],

You seem to know a bit about php, and development, even though this question isn't directly connected to the SDK or development for game enhancement, I was wondering if I could try to bounce some ideas off you. I'm not sure if you saw the site I'm making, but its not just for ufreeze (q3 mod) or just for quake, however I'm starting with Ufreeze(q3). In this I'm going to be archiving everything I can from dev libraries, to maps, to scripts, to mods, ect. Right now I'm starting with creating an archive of lvlworld and integrating the archive into the site, and I guess this is where the development question comes in. My question is the best approach to integration, Right now I have a script that is written in perl that reads a Directory that has the maps in it, and creates a simple 5 column table. What I'm wanting to do is create a script that unzip's the zip file to a tmp directoy, and then checks to see the content of that zip file. Most of the zip files have either one or more of the following: Img, txt, html, pk3.

So my idea is to:
Masterlist.txt

Read Dir
foreach zip{
unzip zip temp dir {
Read tempDir {
mkdir $pk3name;
if dir contains (txt, img, html) { rename(content to pk3 name)
if dir contains(txt) { open file, format to html; move html $pk3name; Print FILE $masterlist.txt "$pk3name:pk3name.html" }
if dir contains(img) { move $pk3name.img $pk3name; print file $masterlist.txt "$pk3name:pk3name.img"}
mv $Pk3namedir /mapdir/
}


Now after the masterlist.txt is full, editing the first perl script that creates that 5column table and doing a java overlib layout to display the images if the maps have images including the txt that was turned into html and or display the original html.

I'm currently using wordpress, If you have a better idea on the approach it would be appreciated.

Redonkuless -




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
PostPosted: 01-30-2012 11:55 PM           Profile   Send private message  E-mail  Edit post Reply with quote


Sorry to be so blunt, but what exactly is your question?




Top
                 

Gibblet
Gibblet
Joined: 09 Jan 2012
Posts: 15
PostPosted: 01-31-2012 09:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


ugh your right, question is, is there a better way to do this?




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 02-01-2012 08:06 AM           Profile Send private message  E-mail  Edit post Reply with quote


It's simple and if it works well for you, I wouldn't change it.

Watch out with `mkdir $pk3name`. If a hypothetical Mr. Attacker manages to sneak in arbitrary characters there, he could compromise your system. Think $pk3name == "foo; while true; do nc -l 0.0.0.0 8000 | xargs sh -c; done"




Top
                 

Gibblet
Gibblet
Joined: 09 Jan 2012
Posts: 15
PostPosted: 02-02-2012 07:48 AM           Profile Send private message  E-mail  Edit post Reply with quote


this would be a shell perl script that I would write, so its not web facing, its just going to generate the table html code.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.