Compare commits

..

2 Commits

Author SHA1 Message Date
0046f47d88 Format code 2024-07-21 18:43:13 -07:00
877494749e Add marker 2024-07-21 18:36:08 -07:00
5 changed files with 14 additions and 2 deletions

BIN
marker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -9,8 +9,9 @@
import sys
import os.path
def fix_path(path):
if getattr(sys, 'frozen', False):
if getattr(sys, "frozen", False):
return os.path.join(sys._MEIPASS, "files", path)
else:
return path

View File

@ -24,5 +24,4 @@ def run(link):
except tk.TclError:
pass
window.mainloop()

View File

@ -1,5 +1,6 @@
import threading
import asyncio
import base64
import tornado
import navpoint.content
@ -9,10 +10,20 @@ class GetHandler(tornado.web.RequestHandler):
self.write(navpoint.content.content)
class ImageHandler(tornado.web.RequestHandler):
def get(self):
self.write(
base64.b64decode(
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAXnAAAF5wGk6LX5AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAABH1JREFUWIWl10mPVUUUB/Bf3TZCYhSjKHSrGEU04IhGhgQJuFAXTmHoOHwAJaJbJQzdIMYhxpUMfgAjNqDiQg0LB1ABA9GFAkFkQSuDQqShSdRAl4tb7716l9f4iCeppKrO8D+npnMqaJviCMzGw7gNY3BdYvbjKH7Ex/iS8E/7ts8P3EVcQxwgxjbbCeIq4tj/AzySuJJ4+gKAq22QuDytXksKw4B34iNMqTDOYAs249fU4NrUHsBMXFTR24Y5hCPtRH4Hsb8SyQBxMfGKNvSvIC5psWX9pe3zK3e2AH+fOLoNz6u2riKub+FEZy6VbUEcia80lj2iBysJsS7WpwPTMUVwLRjSr7DDT7brNZTZDFiW7NSwtmM24a+qAyuxOHNuGeHl+ugTI5y2QPQihjvdR/Aa1uiWXcPYg95MbgWhJ3MgdmEfLqnHyRP1yDe63lmbcOcwwFX6AY/pdjDZD8nmvMQfxATCkZoDa/BsYp7EeMKxDHwb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def main():
app = tornado.web.Application(
[
(r"/navpoint.kml", GetHandler),
(f"/marker.png", ImageHandler),
]
)
app.listen(8888, address="127.0.0.1")

View File

@ -2,6 +2,7 @@ import navpoint.local_server
import navpoint.phone_server
import navpoint.gui
def run():
navpoint.local_server.run()
link = navpoint.phone_server.run()