On this page the Swedish weather service is presenting weather warnings.
https://www.smhi.se/...age=wpt-warning-alla(I could not find an API to get the information from).
I want to be able to run something like this and get the respons in plain text, and be able to send the output to a text file.
C:\> SMHIvarning.exe
https://www.smhi.se/...age=wpt-warning-alla"Inga varningar i Västmanlands län"
Or change to this that at the time of writing have a forrest fire warning
C:\> SMHIvarning.exe
https://www.smhi.se/...age=wpt-warning-alla"RISK SKOGSBRAND Kronobergs län, västra delen"
Or this that at the time of writing have a class one storm warning
C:\> SMHIvarning.exe
https://www.smhi.se/...age=wpt-warning-alla"VARNING KLASS 1 KULING Bottenviken"
Notice that the "district" in the url changes
Picture also provided to give information.
[SOLVED VIA WORK AROUND] Get warnings from SMHI to textI will put the text togehter with my other scripts as shown in this picture.
[SOLVED VIA WORK AROUND] Get warnings from SMHI to text[SOLVED VIA WORK AROUND] Get warnings from SMHI to textWith the output from C:\> SMHIvarning.exe
https://www.smhi.se/...age=wpt-warning-alla > SMHIvastmanland.txt
i will use this "code" this is the way most of the output in above picture is created.
<code>
Echo |set /p=Varningar:
Type SMHIvastmanland.txt
</code>
Translations:
"Inga varningar i Västmanlands län" = "No warnings in Västmanlands län"
VARNING KLASS 1 KULING = "Warning class 1 gale"
RISK SKOGSBRAND "Risk Forest fire"