An open API service indexing awesome lists of open source software.

https://github.com/dbrgn/showtemp

Short rust program to retrieve the current weather for a location in Switzerland.
https://github.com/dbrgn/showtemp

Last synced: about 1 month ago
JSON representation

Short rust program to retrieve the current weather for a location in Switzerland.

Awesome Lists containing this project

README

          

# Showtemp

Show the current temprature, sunshine and precipitation for a location in
Switzerland.

This is nothing fancy at all, I just wanted to learn a bit of
[Rust](http://rustbyexample.com/).

## Building

You need the current nightly version of Rust to build this. I used `0.13.0`.

$ cargo build
Compiling unsafe-any v0.1.1 (https://github.com/reem/rust-unsafe-any#eb3fe87b)
Compiling gcc v0.1.1 (https://github.com/alexcrichton/gcc-rs#d35c34c8)
Compiling mucell v0.1.2 (https://github.com/chris-morgan/mucell#d198c660)
Compiling url v0.2.4 (https://github.com/servo/rust-url#79f8034a)
Compiling mime v0.0.1 (https://github.com/hyperium/mime.rs#7898f1c2)
Compiling pkg-config v0.1.1
Compiling openssl-sys v0.2.3 (https://github.com/sfackler/rust-openssl#9754b8e4)
Compiling time v0.1.2 (https://github.com/rust-lang/time#0e923089)
Compiling openssl v0.2.3 (https://github.com/sfackler/rust-openssl#9754b8e4)
Compiling cookie v0.1.0 (https://github.com/alexcrichton/cookie-rs#272ac27b)
Compiling hyper v0.0.1 (https://github.com/hyperium/hyper#d19cfed4)
Compiling showtemp v0.0.1 (file:///home/danilo/Projects/showtemp)

## Example

Just start the binary with a 3 letter station as argument.

$ target/showtemp SMA
3.8C 10h 0mm

Possible stations:

ABO (Adelboden)
AIG (Aigle)
ALT (Altdorf)
AND (Andeer)
ATT (Les Attelas)
BAS (Basel / Binningen)
BER (Bern / Zollikofen)
BEZ (Beznau)
BIE (Bière)
BIZ (Bischofszell)
BOL (Boltigen)
BOU (Bouveret)
BRZ (Brienz)
BUF (Buffalora)
BUS (Buchs / Aarau)
CDF (La Chaux-de-Fonds)
CGI (Nyon / Changins)
CHA (Chasseral)
CHD (Château-d'Oex)
CHU (Chur)
CIM (Cimetta)
CMA (Crap Masegn)
COM (Acquarossa / Comprovasco)
COV (Piz Corvatsch)
CRM (Cressier)
DAV (Davos)
DEM (Delémont)
DIS (Disentis / Sedrun)
DOL (La Dôle)
EBK (Ebnat-Kappel)
EGH (Eggishorn)
EGO (Egolzwil)
EIN (Einsiedeln)
ELM (Elm)
ENG (Engelberg)
EVO (Evolène / Villa)
FAH (Fahy)
FRE (Bullet / La Frétaz)
GEN (Monte Generoso)
GIH (Giswil)
GLA (Glarus)
GOE (Gösgen)
GOR (Gornergrat)
GRA (Fribourg / Posieux)
GRE (Grenchen)
GRH (Grimsel Hospiz)
GRO (Grono)
GSB (Col du Grand St-Bernard)
GUE (Gütsch ob Andermatt)
GUT (Güttingen)
GVE (Genève-Cointrin)
HAI (Salen-Reutenen)
HLL (Hallau)
HOE (Hörnli)
INT (Interlaken)
JUN (Jungfraujoch)
KLO (Zürich / Kloten)
KOP (Koppigen)
LAE (Lägern)
LAG (Langnau i.E.)
LEI (Leibstadt)
LUG (Lugano)
LUZ (Luzern)
MAG (Magadino / Cadenazzo)
MER (Meiringen)
MLS (Le Moléson)
MOA (Mosen)
MOE (Möhlin)
MRP (Monte Rosa-Plattje)
MUB (Mühleberg)
MVE (Montana)
NAP (Napf)
NAS (Naluns / Schlivera)
NEU (Neuchâtel)
ORO (Oron)
OTL (Locarno / Monti)
PAY (Payerne)
PIL (Pilatus)
PIO (Piotta)
PLF (Plaffeien)
PMA (Piz Martegnas)
PRE (St-Prex)
PUY (Pully)
QUI (Quinten)
RAG (Bad Ragaz)
REH (Zürich / Affoltern)
ROB (Poschiavo / Robbia)
ROE (Robièi)
RUE (Rünenberg)
SAE (Säntis)
SAM (Samedan)
SBE (S. Bernardino)
SBO (Stabio)
SCM (Schmerikon)
SCU (Scuol)
SHA (Schaffhausen)
SIO (Sion)
SMA (Zürich / Fluntern)
SMM (Sta. Maria
Val Müstair)
SPF (Schüpfheim)
STG (St. Gallen)
STK (Steckborn)
TAE (Aadorf / Tänikon)
THU (Thun)
TIT (Titlis)
ULR (Ulrichen)
VAB (Valbella)
VAD (Vaduz)
VIS (Visp)
WAE (Wädenswil)
WFJ (Weissfluhjoch)
WYN (Wynau)
ZER (Zermatt)

## License

GPLv3 License.