new option: F (no follow line) (fixes #214)

This commit is contained in:
Igor Chubin 2019-01-11 12:48:00 +01:00
parent 8607e8ce0e
commit 6dfd809694
3 changed files with 7 additions and 4 deletions

View file

@ -72,6 +72,8 @@ def parse_query(args):
result['no-caption'] = True
if 'Q' in q:
result['no-city'] = True
if 'F' in q:
result['no-follow-line'] = True
for key, val in args.items():
if val == 'True':

View file

@ -241,10 +241,10 @@ def wttr(location, request):
url=request.url,
)
if query.get('days', '3') != '0' and not query.get('no-follow-line'):
if html_output:
output = add_buttons(output)
else:
if query.get('days', '3') != '0':
#output += '\n' + get_message('NEW_FEATURE', lang).encode('utf-8')
output += '\n' + get_message('FOLLOW_ME', lang).encode('utf-8') + '\n'
return output

View file

@ -29,6 +29,7 @@ View options:
0 # only current weather
1 # current weather + 1 day
2 # current weather + 2 days
F # do not show the "Follow" line
n # narrow version (only day and night)
q # quiet version (no "Weather report" text)
Q # superquiet version (no "Weather report", no city name)