シェルスクリプトでLINEに天気を投稿する
880 ワード
いきなり本題
よくわからないけどこれで投稿出来た。
Weather Hacks
LINE Notify
jqコマンドインストール
#!/bin/bash
api=`curl -s http://weather.livedoor.com/forecast/webservice/json/v1\?city\=016010 | jq -r '.forecasts[] | select(.dateLabel == "今日").telop'`
headers={"Authorization":"Bearer"}
ACCESS_TOKEN=line_token
MSG="今日の天気は$apiです。"
curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -F "message=$MSG" https://notify-api.line.me/api/notify
Author And Source
この問題について(シェルスクリプトでLINEに天気を投稿する), 我々は、より多くの情報をここで見つけました https://qiita.com/siba4848/items/46bab1c65e4afeb543ee著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .