完成初版选点提取坐标
This commit is contained in:
@@ -48,6 +48,8 @@ class APIHandler(SimpleHTTPRequestHandler):
|
||||
elif path == '/' or path == '/index.html':
|
||||
# 默认访问使用 api=1
|
||||
self.serve_file('index.html', query='api=1')
|
||||
elif path == '/coords' or path == '/coordinate.html':
|
||||
self.serve_file('coordinate.html')
|
||||
else:
|
||||
# 处理静态文件请求
|
||||
# 移除开头的 /
|
||||
@@ -130,6 +132,7 @@ def run():
|
||||
httpd = ThreadingHTTPServer(server_address, APIHandler)
|
||||
print(f'Server running on http://localhost:{port}')
|
||||
print(f'支持的接口: /, /api/1, /api/2, /api/3, /api/4, /api/5, /api/6, /api/7, /api/11-16')
|
||||
print(f'坐标提取工具: /coords')
|
||||
print('按 Ctrl+C 停止服务器')
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user