mappyfile takes a Mapfile as input and parses it into an Abstract syntax tree (AST) using lark a Python parsing library. mappyfile can then transform the AST into a dictionary structure, containing keys and values of dicts, and lists familiar to Python programmers. This structure can be edited directly. Alternatively new objects can be added by parsing further Mapfile text and inserting into the dictionary structure.
mappyfile also includes a “pretty printer” to export this dictionary structure back to a Mapfile, with keyword formatting and indentation.
An online-editor built on mappyfile is available at https://app.mapserverstudio.net/.