Update readme
This commit is contained in:
parent
64bd02a104
commit
4b911c61cf
|
@ -70,6 +70,7 @@ Some servers may return an additional player count number, which may be present
|
||||||
Supported Games
|
Supported Games
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!--- BEGIN GENERATED GAMES -->
|
||||||
* Age of Chivalry (ageofchivalry)
|
* Age of Chivalry (ageofchivalry)
|
||||||
* Age of Empires 2 (aoe2) [[Separate Query Port](#separate-query-port)]
|
* Age of Empires 2 (aoe2) [[Separate Query Port](#separate-query-port)]
|
||||||
* Alien Arena (alienarena) [[Separate Query Port](#separate-query-port)]
|
* Alien Arena (alienarena) [[Separate Query Port](#separate-query-port)]
|
||||||
|
@ -81,8 +82,8 @@ Supported Games
|
||||||
* America's Army 3 (americasarmy3) [[Separate Query Port](#separate-query-port)]
|
* America's Army 3 (americasarmy3) [[Separate Query Port](#separate-query-port)]
|
||||||
* America's Army: Proving Grounds (americasarmypg) [[Separate Query Port](#separate-query-port)]
|
* America's Army: Proving Grounds (americasarmypg) [[Separate Query Port](#separate-query-port)]
|
||||||
* ArmA Armed Assault 1 (arma)
|
* ArmA Armed Assault 1 (arma)
|
||||||
* ArmA Armed Assault 2 (arma2)
|
* ArmA Armed Assault 2 (arma2) [[Separate Query Port](#separate-query-port)]
|
||||||
* ArmA Armed Assault 3 (arma3)
|
* ArmA Armed Assault 3 (arma3) [[Separate Query Port](#separate-query-port)]
|
||||||
* Armagetron (armagetron)
|
* Armagetron (armagetron)
|
||||||
* Baldur's Gate (baldursgate) [[Separate Query Port](#separate-query-port)]
|
* Baldur's Gate (baldursgate) [[Separate Query Port](#separate-query-port)]
|
||||||
* Battlefield 1942 (bf1942) [[Separate Query Port](#separate-query-port)]
|
* Battlefield 1942 (bf1942) [[Separate Query Port](#separate-query-port)]
|
||||||
|
@ -288,6 +289,7 @@ Supported Games
|
||||||
* Xpand Rally (xpandrally) [[Separate Query Port](#separate-query-port)]
|
* Xpand Rally (xpandrally) [[Separate Query Port](#separate-query-port)]
|
||||||
* Zombie Master (zombiemaster)
|
* Zombie Master (zombiemaster)
|
||||||
* Zombie Panic: Source (zps)
|
* Zombie Panic: Source (zps)
|
||||||
|
<!--- END GENERATED GAMES -->
|
||||||
|
|
||||||
Don't see your game listed here?
|
Don't see your game listed here?
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
|
||||||
|
var TypeResolver = require('../lib/typeresolver');
|
||||||
|
var generated = TypeResolver.printReadme();
|
||||||
|
|
||||||
|
var readmeFilename = __dirname+'/../README.md';
|
||||||
|
var readme = fs.readFileSync(readmeFilename, {encoding:'utf8'});
|
||||||
|
|
||||||
|
var marker_top = '<!--- BEGIN GENERATED GAMES -->';
|
||||||
|
var marker_bottom = '<!--- END GENERATED GAMES -->';
|
||||||
|
|
||||||
|
var start = readme.indexOf(marker_top);
|
||||||
|
start += marker_top.length;
|
||||||
|
while(readme.charAt(start) == "\n" || readme.charAt(start) == "\r") { start++; }
|
||||||
|
|
||||||
|
var end = readme.indexOf(marker_bottom);
|
||||||
|
|
||||||
|
var updated = readme.substr(0,start)+generated+readme.substr(end);
|
||||||
|
fs.writeFileSync(readmeFilename, updated);
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
var TypeResolver = require('../lib/typeresolver');
|
|
||||||
TypeResolver.printReadme();
|
|
||||||
|
|
|
@ -76,14 +76,16 @@ module.exports = {
|
||||||
return query;
|
return query;
|
||||||
},
|
},
|
||||||
printReadme: function() {
|
printReadme: function() {
|
||||||
|
var out = '';
|
||||||
for(var key in games) {
|
for(var key in games) {
|
||||||
var game = games[key];
|
var game = games[key];
|
||||||
var out = "* "+game.pretty+" ("+key+")";
|
out += "* "+game.pretty+" ("+key+")";
|
||||||
if(game.options.port_query_offset || game.options.port_query)
|
if(game.options.port_query_offset || game.options.port_query)
|
||||||
out += " [[Separate Query Port](#separate-query-port)]";
|
out += " [[Separate Query Port](#separate-query-port)]";
|
||||||
if(game.params.doc_notes)
|
if(game.params.doc_notes)
|
||||||
out += " [[Additional Notes](#"+game.params.doc_notes+")]"
|
out += " [[Additional Notes](#"+game.params.doc_notes+")]"
|
||||||
console.log(out);
|
out += "\n";
|
||||||
}
|
}
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue