I added a script to the repo to also automate text file editing. This means you can easily edit convars in server.cfg
or add a map to mapcycle.txt
and sort it without having to download the file manually first, even if you use the uploading script to deploy it to all servers.
- Backup - Create a backup of the specified file. backup variable at the bottom must be set to True
- Print - Dump the contents of the text file to console.
- Sort - Sorts the lines in the text file alphabetically (without blank lines).
- Find - Search the text file with regex search
- FindDuplicates - Search the text file with regex search and remove subsequent lines with duplicate matches.
- Insert - Insert a line into the text file relative to regex after, before, or at the end of the file if neither are specified.
- Replace - Replace a line in the text file matching regex search with replace (regex capture groups permitted)
- Delete - Delete a line in the text file matching regex search
- All edit operations support failover of another Edit Operation and rcon for rcon commands (string or list of strings)