Integrating mapmerge2 checks into Travis (#5616)

Okay, this update is kinda big. Summary:

- Trimmed unused keys in Exodus telecomms

- Adds script that will run mapmerge2 on Travis to check branch for unused keys or key overflow, etc.

- Fixes matching indentation style in tag-matcher and converts it to use Python 3.6

- Converts mapmerge2 to be used by Python 3.4 and above. Instead of 3.6

- Removes Windows 1252 characters from Communication-blackout.dm that were not able to be seen in UTF-8 format.

Note: the last commit will fail because currently main level is broken

Example of no map issues:
![2018-11-15_li](https://user-images.githubusercontent.com/25555314/48592180-0fd7be80-e8fc-11e8-80b9-cd5af32540e3.jpg)

Example of issues:
![2018-11-15_li 2](https://user-images.githubusercontent.com/25555314/48592190-15cd9f80-e8fc-11e8-99bd-6da4b4c2b9d8.jpg)
This commit is contained in:
Mykhailo Bykhovtsev
2018-11-20 11:14:21 -08:00
committed by Werner
parent d230a60a20
commit 779f8a0733
9 changed files with 162 additions and 284 deletions

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# Common code for the frontend interface of map tools
import sys
import os
@@ -93,26 +94,26 @@ def process(settings, verb, *, modify=True, backup=None):
return
if modify:
print(f"Maps WILL{'' if settings.tgm else ' NOT'} be converted to tgm.")
print("Maps WILL{} be converted to tgm.".format('' if settings.tgm else ' NOT'))
if backup:
print("Backups will be created with a \".before\" extension.")
else:
print("Warning: backups are NOT being taken.")
print(f"\nWill {verb} these maps:")
print("\nWill {} these maps:".format(verb))
for path_str in maps:
print(pretty_path(settings, path_str))
try:
confirm = input(f"\nPress Enter to {verb}...\n")
confirm = input("\nPress Enter to {}...\n".format(verb))
except KeyboardInterrupt:
confirm = "^C"
if confirm != "":
print(f"\nAborted.")
print("\nAborted.")
return
for path_str in maps:
print(f' - {pretty_path(settings, path_str)}')
print(" - {}".format(pretty_path(settings, path_str)))
if backup:
shutil.copyfile(path_str, path_str + ".before")
@@ -120,7 +121,7 @@ def process(settings, verb, *, modify=True, backup=None):
try:
yield path_str
except Exception as e:
print(f"Error: {e}")
print("Error: {}".format(e))
else:
print("Succeeded.")