2025-02-09 19:55:34 +00:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
import cgi
|
|
|
|
import cgitb
|
|
|
|
from pathlib import Path
|
|
|
|
cgitb.enable()
|
|
|
|
|
|
|
|
form = cgi.FieldStorage()
|
|
|
|
|
|
|
|
print('Content-Type: text/plain\n')
|
|
|
|
|
|
|
|
content = form.getfirst('content')
|
2025-02-10 11:52:12 +00:00
|
|
|
map_id = form.getfirst('map_id')
|
2025-02-09 19:55:34 +00:00
|
|
|
|
2025-02-10 11:52:12 +00:00
|
|
|
with open(Path('..') / 'data' / f'markers-{map_id}.json', 'w') as f:
|
2025-02-09 19:55:34 +00:00
|
|
|
f.write(content)
|
|
|
|
|
|
|
|
print(content)
|