pywargame works on modules (.vmod) as well as saves (.vsav), logs (.vlog), and extensions (.vmdx), though the support for logs is far from complete, and there’s stuff in saves that need to be coded by the user.
You can use the utility vsavdump.py to show the content of a save or log file in somewhat plain text.
If you look at the code used by vsavdump.py - in particular pywargame.vassal.SaveIO.dumpSave - you will see that log and save files consists of lines. Lines generally start with a tag - for example + to add a piece.
If you look at VASSAL.build.module.map.Flare you see that the tag of flares is the string FLARE\t followed by an identifier (set by the module developer), then a \t, the X (pixel) coordinate, another \t and the Y (pixel) coordinate (see also VASSAL.module.build.map.Flare#encode and VASSAL.module.build.map.Flare#decode).
Thus, if you use If you look at the code used by vsavdump.py - in particular pywargame.vassal.SaveIO.readSave to read in the save and split into lines, then you can filter out any lines that contain the FLARE tag:
#!/usr/bin/env python
if __name__ == '__main__':
from argparse import ArgumentParser, FileType
from pywargame.vassal.save import SaveIO
ap = ArgumentParser(description='Remove flares from log')
ap.add_argument('input', type=FileType('r'), help='Input file')
ap.add_argument('output',type=FileType('w'), help='Output file')
args = ap.parse_args()
key, lines, savemeta, modulemeta = SaveIO.readSave(args.input, True)
newlines = [line for line in lines if not line.startswith('FLARE\t')]
SaveIO.writeSave(args.output, key, newlines, savemeta, modulemeta)
(above is untested).
See if that does the trick for you.
I will leave that as an exercise for the interested reader
Of course, I will gladly accept contributions to pywargame - and give proper credit.
Yours,
Christian