wttr.in
wttr.in copied to clipboard
explicit request for HTML
currently, wttr.in uses user agent strings to determine the best response to return to the client.
by default, curl gets ANSI in response. but let's say, someone is trying to render the HTML instead of PNG because it's so low res.
the only option here is to change the user agent to something else that does not contain the keyword curl anywhere in the string of the user agent (not even spaces around curl work)
proposals (sorted from most preferred to least preferred of personal choice and misc.):
- a long argument (similar to
langarg)output_formatorformatwhich can=toPNG,HTML,ANSI,plain,JSON, etc. Hargument for getting HTML (similar to usingMfor getting meter/s wind speeds)_arguments.html(similar to png format request)
all which ignore the user agent and returns HTML anyways.
currently, wttr.in uses user agent strings to determine the best response to return to the client.
by default,
curlgets ANSI in response. but let's say, someone is trying to render the HTML instead of PNG because it's so low res.the only option here is to change the user agent to something else that does not contain the keyword
curlanywhere in the string of the user agent (not even spaces aroundcurlwork)proposals (sorted from most preferred to least preferred of personal choice and misc.):
- a long argument (similar to
langarg)output_formatorformatwhich can=toPNG,HTML,ANSI,plain,JSON, etc.Hargument for getting HTML (similar to usingMfor getting meter/s wind speeds)_arguments.html(similar to png format request)all which ignore the user agent and returns HTML anyways.
https://wttr.in/:help
currently, wttr.in uses user agent strings to determine the best response to return to the client. by default,
curlgets ANSI in response. but let's say, someone is trying to render the HTML instead of PNG because it's so low res. the only option here is to change the user agent to something else that does not contain the keywordcurlanywhere in the string of the user agent (not even spaces aroundcurlwork) proposals (sorted from most preferred to least preferred of personal choice and misc.):
- a long argument (similar to
langarg)output_formatorformatwhich can=toPNG,HTML,ANSI,plain,JSON, etc.Hargument for getting HTML (similar to usingMfor getting meter/s wind speeds)_arguments.html(similar to png format request)all which ignore the user agent and returns HTML anyways.
https://wttr.in/:help
yes, what about that?
Then why not add a mode? Or use https://github.com/chubin/wttr.in/blob/5782f4f53e1c22bf7b7d6eb7a83e37f976ae62a7/share/ansi2html.sh client-side?
Also, https://github.com/chubin/wttr.in/blob/5782f4f53e1c22bf7b7d6eb7a83e37f976ae62a7/share/help.txt
It is a good feature. Accepted :+1: