-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTC 时间转换 & 温度单位转换 #3
Comments
weather-units bughttps://github.com/chubin/wttr.in#weather-units $ curl wttr.in/Shanghai?u
$ curl wttr.in/Shanghai?m
but the default is OK$ curl wttr.in/Shanghai
|
#!/bin/sh
# ???
set -eux
# 设置 env
LANGUAGE="zh-CN"
CITY=Shanghai
UNIT=m
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"
# 文档见 wttr.in
curl \
-H "Accept-Language: $LANGUAGE" \
-H "User-Agent: $UA" \
-o result.html \
wttr.in/$CITY
# wttr.in/$CITY?format=4\&$UNIT
https://github.com/xgqfrms/weather-email-action/blob/main/weather.sh /Users/xgqfrms-mbp/Documents/GitHub/gitHub-secrets-all-in-one/weather.sh #!/bin/sh
# ???
set -eux
# 设置 env
LANGUAGE="zh-CN"
CITY=Shanghai
# m === °C
UNIT=m
# u === °F (default)
# UNIT=u
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"
# 文档见 wttr.in
curl \
-H "Accept-Language: $LANGUAGE" \
-H "User-Agent: $UA" \
-o result.html \
wttr.in/$CITY?$UNIT
# wttr.in/$CITY
# wttr.in/$CITY?format=4\&$UNIT
|
# fix zsh bug
$ curl "wttr.in/Shanghai?u"
$ curl "wttr.in/Shanghai?m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UTC 时间转换 & 温度单位转换
https://www.cnblogs.com/xgqfrms/p/14097254.html
The text was updated successfully, but these errors were encountered: