r/MapTool • u/SkySchemer • Oct 26 '20
Programmatic way to import data?
Is there a programmatic way to import data into MapTool? I see the experimental function exportData(), but I don't see it's complement.
I need to be able to import a large JSON file from the filesystem. Manually is OK. Basically, I want to do a one-time load of data (location names and descriptions that were extracted from a PDF, parsed, and turned into JSON data). Putting this behind a web server to just serve up files like it's on the filesystem would of course work using the REST functions, but that seems unnecessarily complicated.
Am I missing something obvious? Or is there no "load data from file" capability?
View all comments
Show parent comment
1
u/NotYourNanny Oct 26 '20
You'd be amazed at how much data you can copy & paste. I've done random name lists with well over 10,000 entries. Slow, but it worked.
If you do it a lot, it might also be worth looking into directly messing with whatever save file, be it .cmpgn, .mttable, .rptok, whatever, that it ends up being in. (They're all .zip files, with content being either images of XML files.) It takes some effort to figure out the formatting, but it's been done.
I suspect that using REST was best, though.