mirror of
https://github.com/chubin/wttr.in
synced 2024-12-25 03:13:06 +00:00
new option: F (no follow line) (fixes #214)
This commit is contained in:
parent
8607e8ce0e
commit
6dfd809694
3 changed files with 7 additions and 4 deletions
|
@ -72,6 +72,8 @@ def parse_query(args):
|
||||||
result['no-caption'] = True
|
result['no-caption'] = True
|
||||||
if 'Q' in q:
|
if 'Q' in q:
|
||||||
result['no-city'] = True
|
result['no-city'] = True
|
||||||
|
if 'F' in q:
|
||||||
|
result['no-follow-line'] = True
|
||||||
|
|
||||||
for key, val in args.items():
|
for key, val in args.items():
|
||||||
if val == 'True':
|
if val == 'True':
|
||||||
|
|
|
@ -241,10 +241,10 @@ def wttr(location, request):
|
||||||
url=request.url,
|
url=request.url,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if query.get('days', '3') != '0' and not query.get('no-follow-line'):
|
||||||
if html_output:
|
if html_output:
|
||||||
output = add_buttons(output)
|
output = add_buttons(output)
|
||||||
else:
|
else:
|
||||||
if query.get('days', '3') != '0':
|
|
||||||
#output += '\n' + get_message('NEW_FEATURE', lang).encode('utf-8')
|
#output += '\n' + get_message('NEW_FEATURE', lang).encode('utf-8')
|
||||||
output += '\n' + get_message('FOLLOW_ME', lang).encode('utf-8') + '\n'
|
output += '\n' + get_message('FOLLOW_ME', lang).encode('utf-8') + '\n'
|
||||||
return output
|
return output
|
||||||
|
|
|
@ -29,6 +29,7 @@ View options:
|
||||||
0 # only current weather
|
0 # only current weather
|
||||||
1 # current weather + 1 day
|
1 # current weather + 1 day
|
||||||
2 # current weather + 2 days
|
2 # current weather + 2 days
|
||||||
|
F # do not show the "Follow" line
|
||||||
n # narrow version (only day and night)
|
n # narrow version (only day and night)
|
||||||
q # quiet version (no "Weather report" text)
|
q # quiet version (no "Weather report" text)
|
||||||
Q # superquiet version (no "Weather report", no city name)
|
Q # superquiet version (no "Weather report", no city name)
|
||||||
|
|
Loading…
Reference in a new issue