mirror of https://gitlab.com/bashrc2/epicyon
Rename function
parent
de2da71381
commit
b325afa070
|
@ -403,7 +403,7 @@ from crawlers import blocked_user_agent
|
||||||
from crawlers import load_known_web_bots
|
from crawlers import load_known_web_bots
|
||||||
from qrcode import save_domain_qrcode
|
from qrcode import save_domain_qrcode
|
||||||
from importFollowing import run_import_following_watchdog
|
from importFollowing import run_import_following_watchdog
|
||||||
from maps import kml_from_tagmaps_path
|
from maps import map_format_from_tagmaps_path
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -17093,8 +17093,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# hashtag map kml
|
# hashtag map kml
|
||||||
if self.path.startswith('/tagmaps/') or \
|
if self.path.startswith('/tagmaps/') or \
|
||||||
(authorized and '/tagmaps/' in self.path):
|
(authorized and '/tagmaps/' in self.path):
|
||||||
map_str = kml_from_tagmaps_path(self.server.base_dir, self.path,
|
map_str = \
|
||||||
self.server.map_format)
|
map_format_from_tagmaps_path(self.server.base_dir, self.path,
|
||||||
|
self.server.map_format)
|
||||||
if map_str:
|
if map_str:
|
||||||
msg = map_str.encode('utf-8')
|
msg = map_str.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
|
6
maps.py
6
maps.py
|
@ -619,9 +619,9 @@ def _get_tagmaps_time_periods() -> {}:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def kml_from_tagmaps_path(base_dir: str, path: str,
|
def map_format_from_tagmaps_path(base_dir: str, path: str,
|
||||||
map_format: str) -> str:
|
map_format: str) -> str:
|
||||||
"""Returns kml for a given tagmaps path
|
"""Returns gpx/kml for a given tagmaps path
|
||||||
/tagmaps/tagname-time_period
|
/tagmaps/tagname-time_period
|
||||||
"""
|
"""
|
||||||
if '/tagmaps/' not in path:
|
if '/tagmaps/' not in path:
|
||||||
|
|
Loading…
Reference in New Issue