Change /plain to /p

This commit is contained in:
Ceda EI 2019-01-11 00:55:30 +05:30
parent 5d67e85b78
commit fae99965c6
2 changed files with 8 additions and 8 deletions

View File

@ -14,4 +14,4 @@ To check weather for your location simply run the following command in a termina
+ Weather for one week - `curl sky.webionite.com/f/location`
+ Weather for today - `curl sky.webionite.com/f/location/t`
Replace sky.webionite.com/ with sky.webionite.com/plain/ on Windows
Replace sky.webionite.com/ with sky.webionite.com/p/ on Windows

View File

@ -150,7 +150,7 @@ def index():
"In Fahrenheit\n"
"+ Weather for one week - curl sky.webionite.com/f/location \n"
"+ Weather for today - curl sky.webionite.com/f/location/t\n\n"
"Replace sky.webionite.com/ with sky.webionite.com/plain/ on "
"Replace sky.webionite.com/ with sky.webionite.com/p/ on "
"Windows \n\n"
+ config.source + "\n")
return text
@ -186,26 +186,26 @@ app.add_url_rule('/f/<location>/', 'location_f/', lambda location:
app.add_url_rule('/f/<location>/t', 'today_location_f', lambda location:
main(location, geocoder, cache_db, "hourly", "f"))
app.add_url_rule('/plain/<location>', 'plain_location', lambda location:
app.add_url_rule('/p/<location>', 'plain_location', lambda location:
strip_colors(main(location, geocoder, cache_db, "daily",
"c")))
app.add_url_rule('/plain/<location>/', 'plain_location/', lambda location:
app.add_url_rule('/p/<location>/', 'plain_location/', lambda location:
strip_colors(main(location, geocoder, cache_db, "daily",
"c")))
app.add_url_rule('/plain/<location>/t', 'plain_today_location', lambda
app.add_url_rule('/p/<location>/t', 'plain_today_location', lambda
location: strip_colors(main(location, geocoder, cache_db,
"hourly", "c")))
app.add_url_rule('/plain/f/<location>', 'plain_location_f', lambda location:
app.add_url_rule('/p/f/<location>', 'plain_location_f', lambda location:
strip_colors(main(location, geocoder, cache_db, "daily",
"f")))
app.add_url_rule('/plain/f/<location>/', 'plain_location_f/', lambda location:
app.add_url_rule('/p/f/<location>/', 'plain_location_f/', lambda location:
strip_colors(main(location, geocoder, cache_db, "daily",
"f")))
app.add_url_rule('/plain/f/<location>/t', 'plain_today_location_f', lambda
app.add_url_rule('/p/f/<location>/t', 'plain_today_location_f', lambda
location: strip_colors(main(location, geocoder, cache_db,
"hourly", "f")))