Talk:Official Maps in SVN

From Red Eclipse Wiki
Jump to: navigation, search

In case this is useful, here this is the shell script I used to generate this page. Map lists are taken from http://svn.icculus.org/*checkout*/redeclipse/data/config/version.cfg

(Only difference: This also lists sv_allowedmaps)


echo '
==Main maps==

<gallery>'
gawk '
    /mainmaps/{
        gsub("\"","")
        for (i=2; i<=NF;i++) {
            sub(".",substr(toupper($i),1,1),$i)
            print "file:"$i".png |[[Map_"$i"|"$i"]]"
        }
    }
' version.cfg
echo ' </gallery>

==Race maps==
<gallery>'
gawk '
    /racemaps/{
        gsub("\"","")
        for (i=2; i<=NF;i++) {
            sub(".",substr(toupper($i),1,1),$i)
            print "file:"$i".png |[[Map_"$i"|"$i"]]"
        }
    }
' version.cfg
echo ' </gallery>

==Map lists==
{|'
gawk '
    /duel/{
        print "|}"
        print "{|"
    }
    /bomber/{
        print "|}"
        print "{|"
    }
    /maps/{
        gsub("\"","")
        print "|"$1
        for (i=2; i<=NF;i++) {
            sub(".",substr(toupper($i),1,1),$i)
            print "* [[Map_"$i"|"$i"]]"
        }
    }
' version.cfg
echo '|}'