c++ 从命令行获取参数_从命令行获取天气
c++ 从命令行获取参数
There's an awesome script making the rounds on Twitter and I've been as excited as everyone else so I thought I'd show it. Many of us live eight hours a day within the command line (although I'm not a vim hippie like some of you) so I try to find new ways to accomplish tasks from within iTerm (like getting bitcoin value or stock quotes). Many of these solutions include using cURL and this awesomeness is no exception!
Twitter上有一个很棒的脚本来回合,我和其他所有人一样兴奋,所以我想展示一下。 我们中的许多人每天都在命令行中生活8个小时(尽管我不像你们中的某些人那样活跃),所以我尝试寻找新的方法来完成iTerm中的任务(例如获得比特币价值或股票报价 )。 这些解决方案中的许多解决方案都包括使用cURL,这一点也不例外!
You can get weather information from command line using cURL and wttr.in
:
您可以使用cURL和wttr.in
从命令行获取天气信息:
# Allow geolocation
curl -4 wttr.in
# Request a city
curl -4 wttr.in/Madison
wttr.in
does well to guess location if one isn't provided so in most cases you wont need to provide your city.
wttr.in
很容易猜测是否未提供位置,因此在大多数情况下,您不需要提供城市。
There you go, another awesome way to get the information you need from command line!
到这里,从命令行获取所需信息的另一种很棒的方法!
c++ 从命令行获取参数
上一篇: 从命令行获取以太坊值
下一篇: Android系统获取GPU、屏幕信息