core.legends_processor module¶
A module to compress and sort legends exports from DF 0.40.09 and later.
.bmp converted to .png where possible.
Create an archive for Legends Viewer if possible, or just compress the (huge) xml.
Sort files into region folder, with maps subfolders, and move to user content folder if this folder exists.
- core.legends_processor.call_optipng()[source]¶
Calling optipng can work well, but isn’t very portable.
- core.legends_processor.choose_region_map()[source]¶
Returns the most-preferred region map available, or fallback.
- core.legends_processor.create_archive()[source]¶
Creates a legends archive, or zips the xml if files are missing.
- core.legends_processor.get_region_info()[source]¶
Returns a tuple of strings for an available region and date. Eg: (‘region1’, ‘00250-01-01’)