27 Feb 13, 07:09AM
I've created a very simple site that allows you to copy/paste map .cfgs and submit them to be automatically "cleaned":
http://bukz.xrd.me/mapcfg/
The PHP script will do the following to your input:
Not only does this process usually greatly reduce the file sizes of map .cfgs, but also can sometimes "fix" older, buggy configs because of the fact that it removes "junk" lines:
Example Input (~31.3 KB)
Example Output (~15.1 KB)
Take note of the "junk" data at the end of the input .cfg
You may submit map .cfgs up to 128 kilobytes in size. This should be more than enough for any AssaultCube map config. If you run into a scenario where it isn't, I want to hear about it. In a futile attempt to prevent people/bots from spamming the site, you must submit at least 4 kilobytes worth of data for the script to do anything.
Questions/comments/feedback are all very much welcome. I hope someone out there will find this as useful as I do. Cheers :)
P.S. I may be willing to share the PHP source code with you if you are interested, just send me a PM asking about it. Also, please report any bugs or weird errors you may notice in the output, thanks!
http://bukz.xrd.me/mapcfg/
The PHP script will do the following to your input:
- Removes all comments.
- Removes all leading and trailing whitespace.
- Removes all blank lines.
- Removes all lines containing "junk" non-ascii characters.
Not only does this process usually greatly reduce the file sizes of map .cfgs, but also can sometimes "fix" older, buggy configs because of the fact that it removes "junk" lines:
Example Input (~31.3 KB)
Example Output (~15.1 KB)
Take note of the "junk" data at the end of the input .cfg
You may submit map .cfgs up to 128 kilobytes in size. This should be more than enough for any AssaultCube map config. If you run into a scenario where it isn't, I want to hear about it. In a futile attempt to prevent people/bots from spamming the site, you must submit at least 4 kilobytes worth of data for the script to do anything.
Questions/comments/feedback are all very much welcome. I hope someone out there will find this as useful as I do. Cheers :)
P.S. I may be willing to share the PHP source code with you if you are interested, just send me a PM asking about it. Also, please report any bugs or weird errors you may notice in the output, thanks!