< BACK
Bash tips, tricks and code snippets
Display weather from terminal
According to this posting, simply by using
curl wttr.in
e.g.
curl wttr.in/offenbach
it is possible to display the current weather and forecast:
Weather report: offenbach
\ / Sunny
.-. 15 °C
― ( ) ― ↙ 2 km/h
`-’ 10 km
/ \ 0.0 mm
┌─────────────┐
┌──────────────────────────────┬───────────────────────┤ Mon 18 May ├───────────────────────┬──────────────────────────────┐
│ Morning │ Noon └──────┬──────┘ Evening │ Night │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │
│ _ /"".-. 0..17 °C │ _ /"".-. 0..21 °C │ _ /"".-. 0..21 °C │ _ /"".-. 0..17 °C │
│ \_( ). ↖ 4-5 km/h │ \_( ). ↗ 6-7 km/h │ \_( ). ↘ 10-13 km/h │ \_( ). ↘ 8-14 km/h │
│ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │
│ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
┌─────────────┐
┌──────────────────────────────┬───────────────────────┤ Tue 19 May ├───────────────────────┬──────────────────────────────┐
│ Morning │ Noon └──────┬──────┘ Evening │ Night │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │
│ _ /"".-. 0..19 °C │ _ /"".-. 0..23 °C │ _ /"".-. 0..21 °C │ _ /"".-. 0..18 °C │
│ \_( ). ↗ 3-4 km/h │ \_( ). ↘ 4 km/h │ \_( ). ↘ 13-18 km/h │ \_( ). ↖ 12-17 km/h │
│ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │
│ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
┌─────────────┐
┌──────────────────────────────┬───────────────────────┤ Wed 20 May ├───────────────────────┬──────────────────────────────┐
│ Morning │ Noon └──────┬──────┘ Evening │ Night │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │ \ / Partly cloudy │
│ _ /"".-. 0..18 °C │ _ /"".-. 0..21 °C │ _ /"".-. 0..22 °C │ _ /"".-. 0..19 °C │
│ \_( ). ↓ 10-12 km/h │ \_( ). ↓ 12-13 km/h │ \_( ). ↓ 11-15 km/h │ \_( ). ↓ 8-13 km/h │
│ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │ /(___(__) 10 km │
│ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
Location: Offenbach am Main, Regierungsbezirk Darmstadt, Hessen, Deutschland [50.088766,8.766286]
Follow @igor_chubin for wttr.in updates