mirror of
https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data.git
synced 2025-04-11 10:09:29 +02:00
handle OSM tag lists being shown, not only ATP ones
This commit is contained in:
parent
55a7107128
commit
d7d5e784ff
2 changed files with 10 additions and 4 deletions
|
@ -236,8 +236,8 @@ def entry_to_presentation_object(checked_key, entry, judgment):
|
|||
{'type': 'link', 'value': {'text': 'OSM object', 'url': entry.osm_link}},
|
||||
{'type': 'text', 'value': entry.atp_tags.get(atp_key, "")},
|
||||
{'type': 'text', 'value': entry.osm_match_tags.get(checked_key, "")},
|
||||
{'type': 'text', 'value': show_data.tag_list_to_html(entry.atp_tags)},
|
||||
{'type': 'text', 'value': show_data.tag_list_to_html(entry.osm_match_tags)},
|
||||
{'type': 'text', 'value': show_data.tag_list_to_html(entry.atp_tags, atp_tag_list=True)},
|
||||
{'type': 'text', 'value': show_data.tag_list_to_html(entry.osm_match_tags, atp_tag_list=False)},
|
||||
{'type': 'text', 'value': ", ".join(judgment.get('mismatching_key_list', ""))},
|
||||
],
|
||||
'display_type': row_type
|
||||
|
|
10
show_data.py
10
show_data.py
|
@ -444,7 +444,7 @@ def get_center(dataset):
|
|||
|
||||
|
||||
|
||||
def tag_list_to_html(tags):
|
||||
def tag_list_to_html(tags, atp_tag_list=True):
|
||||
returned = ""
|
||||
normal_tags = ""
|
||||
dropped_tags = ""
|
||||
|
@ -461,7 +461,13 @@ def tag_list_to_html(tags):
|
|||
raise
|
||||
returned = normal_tags
|
||||
if dropped_tags != "":
|
||||
returned += "<br><br>tags present in ATP, very likely not usable directly in OSM<br>" + dropped_tags
|
||||
if atp_tag_list:
|
||||
# the same function may also be used for
|
||||
# listing OSM tags
|
||||
# these also may have some from ones marked as
|
||||
# bad/problematic/useless
|
||||
returned += "<br><br>tags present in ATP, very likely not usable directly in OSM<br>"
|
||||
returned += dropped_tags
|
||||
return returned
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue