backend/feature/add-description #63
@@ -312,10 +312,10 @@ class LandmarkManager:
|
||||
if importance is None :
|
||||
if len(tags.keys()) < 5 :
|
||||
return None, None
|
||||
if len(tags.keys()) < 10 :
|
||||
elif len(tags.keys()) < 10 :
|
||||
description = f"{name} is a well known {place_type}."
|
||||
|
||||
if len(tags.keys()) < 17 :
|
||||
elif len(tags.keys()) < 17 :
|
||||
importance = 'national'
|
||||
description = f"{name} is a {place_type} of national importance."
|
||||
else :
|
||||
@@ -334,10 +334,10 @@ class LandmarkManager:
|
||||
# Format the visitor number
|
||||
if n_visitors is not None :
|
||||
n_visitors = int(n_visitors)
|
||||
if n_visitors > 1000 :
|
||||
description += f" {name} welcomes {int(n_visitors/1000)} thousand visitors every year."
|
||||
if n_visitors > 1000000 :
|
||||
description += f" {name} welcomes {round(n_visitors/1000000, 1)} millionvisitors every year."
|
||||
if n_visitors < 1000000 :
|
||||
description += f" It welcomes {int(n_visitors/1000)} thousand visitors every year."
|
||||
else :
|
||||
description += f" It welcomes {round(n_visitors/1000000, 1)} million visitors every year."
|
||||
|
||||
# Set the keywords.
|
||||
keywords = {"importance": importance,
|
||||
|
Reference in New Issue
Block a user