Skip to content

Commit

Permalink
add link for new features to vmiklos.hu
Browse files Browse the repository at this point in the history
  • Loading branch information
vasony committed Oct 3, 2023
1 parent 6cbbe1d commit 40fa6fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ def get_missing_housenumbers_html(ctx: context.Context, relation: areas.Relation

ret = relation.write_missing_housenumbers()
todo_street_count, todo_count, done_count, percent, table = ret

with doc.tag("p"):
prefix = ctx.get_ini().get_uri_prefix()
prefix2 = "https://osm-gimmisn.vmiklos.hu/osm"

relation_name = relation.get_name()
doc.text(tr("OpenStreetMap is possibly missing the below {0} house numbers for {1} streets.")
.format(str(todo_count), str(todo_street_count)))
Expand All @@ -92,6 +94,9 @@ def get_missing_housenumbers_html(ctx: context.Context, relation: areas.Relation
doc.stag("br")
with doc.tag("a", href=prefix + "/missing-housenumbers/{}/view-result.chkl".format(relation_name)):
doc.text(tr("Checklist format"))
doc.stag("br")
with doc.tag("a", href=prefix2 + "/missing-housenumbers/" + relation_name + "/view-lints", target="_blank"):
doc.text(tr("View lints (vmiklos.hu)"))

doc.asis(util.html_table_from_list(table).getvalue())
doc.asis(util.invalid_refstreets_to_html(relation.get_invalid_refstreets()).getvalue())
Expand Down
2 changes: 2 additions & 0 deletions wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def missing_streets_view_result(ctx: context.Context, relations: areas.Relations

doc = yattag.doc.Doc()
prefix = ctx.get_ini().get_uri_prefix()

if not ctx.get_file_system().path_exists(relation.get_files().get_osm_streets_path()):
doc.asis(webframe.handle_no_osm_streets(prefix, relation_name).getvalue())
return doc
Expand Down Expand Up @@ -886,6 +887,7 @@ def our_application_txt(
"/street-housenumbers/": handle_street_housenumbers,
"/missing-housenumbers/": handle_missing_housenumbers,
"/housenumber-stats/": webframe.handle_stats,
"/lints/": webframe.handle_lints,
}


Expand Down
5 changes: 5 additions & 0 deletions wsgi_additional.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def additional_streets_view_result(

doc = yattag.doc.Doc()
prefix = ctx.get_ini().get_uri_prefix()
prefix2 = "https://osm-gimmisn.vmiklos.hu/osm"

if not ctx.get_file_system().path_exists(relation.get_files().get_osm_streets_path()):
doc.asis(webframe.handle_no_osm_streets(prefix, relation_name).getvalue())
elif not ctx.get_file_system().path_exists(relation.get_files().get_ref_streets_path()):
Expand Down Expand Up @@ -95,6 +97,9 @@ def additional_streets_view_result(
with doc.tag("a", href=prefix + "/additional-streets/" + relation_name + "/view-result.chkl"):
doc.text(tr("Checklist format"))
doc.stag("br")
with doc.tag("a", href=prefix2 + "/additional-streets/" + relation_name + "/view-result.gpx", target="_blank"):
doc.text(tr("GPX format (vmiklos.hu)"))
doc.stag("br")
with doc.tag("a", href=prefix + "/additional-streets/{}/view-turbo".format(relation_name)):
doc.text(tr("Overpass turbo query for the below streets"))

Expand Down

0 comments on commit 40fa6fe

Please sign in to comment.