메뉴 닫기

콘솔에서 날씨확인 – wttr.in

장마가 오늘부터 시작이라네요…
검은 콘솔화면에서 간단히 날씨를 확인할수 있는 방법 하나 소개합니다.
날씨뿐만 아니라 온도와 바람속도, 방향, 강수량 확률까지도 나오니 정보를 확인하는데는 충분할듯 보이네요.

웹에서 URL(http://wttr.in) 을 통해 확인할수도 있고 콘솔에서는 curl 호출로 확인가능합니다.
스마일서브 본사가 있는 성남에 오늘날씨는 오후부터 흐려져 약한비가 내리겠고…저녁부터는 산발적인 비가 내린답니다. 퇴근시간즈음에는 비가 내릴것 같으니 우산은 미리들 준비하시길……

# curl wttr.in
sungnam


참고

https://github.com/chubin/wttr.in
https://github.com/schachmat/wego나

 

Sample)
1. 도시/국가 날씨 확인
# curl wttr.in/yanbian    :: 스마일서브 연길지사
Weather for City: Yanji, China

2. 공항날씨
# curl wttr.in/icn    :: 인천공항
Weather for IATA: icn, Incheon International Airport, South Korea

3. 아이피 or 도메인으로 소유국가/도시
# curl wttr.in/@google.com       :: 구글
Weather for City: Mountain View, United States of America
# curl wttr.in/@168.126.63.1     :: KT 네임서버
Weather for City: Seoul, South Korea

4. 도움말
# curl wttr.in/:help
Usage:
    $ curl wttr.in          # current location
    $ curl wttr.in/muc      # weather in the Munic airport

Supported location types:
    /paris                  # city name
    /muc                    # airport code (3 letters)
    /@stackoverflow.com     # domain name
    /94107                  # area codes

Special locations:
    /moon                   # Moon phase (add ,+US or ,+France for these cities)

Units:
    ?m                      # metric (SI) (used by default everywhere except US)
    ?u                      # USCS (used by default in US)

Special URLs:
    /:help                  # show this page

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다