mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
b325afa070
commit
2dfd323e10
4
maps.py
4
maps.py
|
@ -587,7 +587,7 @@ def _hashtag_map_within_hours(base_dir: str, tag_name: str,
|
||||||
int((datetime.datetime.utcnow() -
|
int((datetime.datetime.utcnow() -
|
||||||
datetime.datetime(1970, 1, 1)).total_seconds())
|
datetime.datetime(1970, 1, 1)).total_seconds())
|
||||||
end_hours_since_epoch = int(secs_since_epoch / (60 * 60))
|
end_hours_since_epoch = int(secs_since_epoch / (60 * 60))
|
||||||
start_hours_since_epoch = end_hours_since_epoch - hours
|
start_hours_since_epoch = end_hours_since_epoch - abs(hours)
|
||||||
if map_format == 'gpx':
|
if map_format == 'gpx':
|
||||||
map_str = \
|
map_str = \
|
||||||
_hashtag_map_to_gpx(base_dir, tag_name,
|
_hashtag_map_to_gpx(base_dir, tag_name,
|
||||||
|
@ -637,7 +637,6 @@ def map_format_from_tagmaps_path(base_dir: str, path: str,
|
||||||
endpoint_str = \
|
endpoint_str = \
|
||||||
'/tagmaps/' + tag_name + '-' + period_str2.replace(' ', '_')
|
'/tagmaps/' + tag_name + '-' + period_str2.replace(' ', '_')
|
||||||
if path == endpoint_str:
|
if path == endpoint_str:
|
||||||
hours = abs(hours)
|
|
||||||
return _hashtag_map_within_hours(base_dir, tag_name,
|
return _hashtag_map_within_hours(base_dir, tag_name,
|
||||||
hours, map_format)
|
hours, map_format)
|
||||||
return None
|
return None
|
||||||
|
@ -656,7 +655,6 @@ def html_hashtag_maps(base_dir: str, tag_name: str,
|
||||||
html_str = ''
|
html_str = ''
|
||||||
map_str = None
|
map_str = None
|
||||||
for period_str, hours in time_period.items():
|
for period_str, hours in time_period.items():
|
||||||
hours = abs(hours)
|
|
||||||
new_map_str = \
|
new_map_str = \
|
||||||
_hashtag_map_within_hours(base_dir, tag_name, hours,
|
_hashtag_map_within_hours(base_dir, tag_name, hours,
|
||||||
map_format)
|
map_format)
|
||||||
|
|
Loading…
Reference in New Issue