topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday July 28, 2021, 2:48 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - user45454 [ switch to compact view ]

Pages: [1]
1
Could we add the option to load also tomorrows forcast ?

Yes, sure! :) What do you have in mind? Extra parameter added to the program? (i.e. for passing "tomorrow" as argument).

It can also be integrated into regular operation, perhaps having 24-hour data always displayed on screen (regardless of day boundaries).

Fell free to express! I'm here to code it :up:

Vic
-publicdomain (June 19, 2021, 01:51 PM)

Is it possible to load the next comming day but only after a certain time ?
Im runnning this program 24/7 and realoading it once an hour.

Something like (or maybe not at all, but you understand)
C:\WeatherToText.exe /?
Displays the hourerly weather forcast for a given location from klart.se.

/N Display the next day forcast
/T Specifies at what time WeatherToText shall load the next day forcast

c:\WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/timmar/ yellow /N /T 1900
Would only start loading the next day when my clock is 19:00 or after (7 pm) and until 00:00, otherwise it would loop forever.

2
I managed to get this solved via the API and a bit of Cygwin.
Feel free to continue the work, but for me im happy with the result as I have it.

3
This is looking real great now!

Please check v0.3.0: https://www.donation....msg445163#msg445163

:Thmbsup:
-publicdomain (June 10, 2021, 12:20 AM)


Could we add the option to load also tomorrows forcast ?
The data is on the same site to be read.
Im running this at home, reloading once an hour, works great!  :up:
But the later it gets the more I would like to see whats happens after midnight.

4
I'm in! :)
-publicdomain (June 13, 2021, 06:41 PM)

I found an API - https://opendata-dow...rsion/2/messages.xml
Using Cygwin and below code.

<code>
   Curl  https://opendata-dow...rsion/2/messages.xml > eldrisk1.txt
   if DIFF -s eldrisk1.txt eldrisk1b.txt; then exit;
   fi
   cat eldrisk1.txt | egrep -i "<(text)>" | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*//g' > eldrisk2.txt

   if test -s eldrisk2.txt; then
   iconv -f UTF-8 -t ISO-8859-15 eldrisk2.txt > eldrisk3.txt
   else
   echo "Ingen eldvarning utfärdad" > eldrisk3.txt
   fi
   cp eldrisk1.txt eldrisk1b.txt
</code>

This gives me
"Risken för bränder i skog och mark är stor eller mycket stor på flera håll i Götaland, Sörmland och Hälsingland"
(It says "Risk of fires in forest and ground is big or very big in several places in Götaland, Sörmland and Hälsingland)

There is another API with more info here: https://opendata-dow...version/2/alerts.xml

5
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.
SMHI1.png

I will put the text togehter with my other scripts as shown in this picture.
smhi2.png
smhi3.png

With 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"


7
WeatherToText v0.2.0 is out! [ Invalid Attachment ]

Download + info: https://www.donationcoder.com/forum/index.php?topic=51403.0

Cross-platform:

[ Invalid Attachment ]
Windows

[ Invalid Attachment ]
Linux

Enjoy! [ Invalid Attachment ]
Vic
-publicdomain (May 19, 2021, 05:16 PM)


This is looking real great now!  :up: :D

Just a few things.
Picture 1:Picture4.png
1) You can see in the picture that I get an "Â" between the numer and the grade sign.
2) And the sunset is getting the "Å" letter wrong, "21:34 SolnedgÃ¥ng".
At the time of writing Sun rise is gone but I think sun rise aka "Soluppgång" was correct, "åska" and "nederbörd" is also working fine.


Picture2:Picture5.png
1) I would  like to have the whole part that is in between the "()" removed.
See picture two what I mean.
2) It looks like the program forcing yellow ouput ?
We dont need to do that, some day we might want to change output color.

9
Fixed the cross-platform code from the report:

"Error: The request was aborted: Could not create SSL/TLS secure channel."

v0.1.1 has been released! :)

WeatherToText topic updated to reflect it: https://www.donation...ex.php?topic=51403.0

Tested on Windows & Linux. Both running:

Picture3.png

[ Invalid Attachment ]

Cheers! :Thmbsup:
-publicdomain (May 16, 2021, 03:06 AM)

Things are really starting to take form.
Looking good :-)
Is it possible to make it look like picture provided?
No borders, removed "(by)" more compact with row separtion for "nederbörd" & "åska" and no letter "A" after the temp.
Picture3.png

For future release
If the weather location could be made as an input like this
"WeatherToText.exe https://www.klart.se...4der-alberga/timmar/"
"WeatherToText.exe https://www.klart.se...4der-caracas/timmar/"
It would be usable for alot more people.

Right now it is hardcoded so the program is only usable for about the 100 people
that lives in my small town. :-)


10
Hi,

A short translation of what the Swedish words mean.


Tid=Time
Känns=Feels (känns som=feels like)
BY = Gust of wind (should say "vindby" because vind=wind)
Sannolikhet nederbörd =  Probability of precipitation
Sannolikhet åska = Probability of thunder
Soluppgång = Sun Rise
Solnedgång = Sun set

11
So, this isn't exactly what you asked for, but it was an interesting problem, so I did it anyway :)

Wowie!!! Thanks for your willingness to help a fellow!



Note that I changed some tittles in the command line version.

WeatherToText v0.1.0 is released: https://www.donation...ex.php?topic=51403.0

Text substitution comes @ v0.1.1

Please check what's there suits you Cheers!
-publicdomain (May 15, 2021, 07:55 AM)

Verry nice but I get this error
"Error: The request was aborted: Could not create SSL/TLS secure channel."

 :o

12
What I want: To display the weather from www.klart.se in the command line.

From this page https://www.klart.se...4der-alberga/timmar/
I want a program that gets the today weather forcast part (part marked in screen shot 1) and saves it to a textfile so it can be typed into into a command line window, or directly types it into the command line window (see screen shot 2).
Note that I changed some tittles in the command line version.
The text on the webpage is in Swedish, I hope it is not a problem.

Picture1.pngPicture2.png

13
Local server, 192.168.0.232.
But I only need the timer part, the call to ther server can be done with curl.

Got it! DonationTimer.exe it is with DonationTimer.wav as sound file :Thmbsup:

I'm @ it! https://github.com/p...domain/donationtimer

UPDATE: Code's finished :)
-publicdomain (April 02, 2021, 11:21 PM)

Hi,
Many thanks for the program.
Im testing it now and this should be exactly what I need.

 :D :-* :up:

14
Hi & thanks for your request! It's all possible via .exe :)

4) The .bat file makes a HTTP call via curl to my IoT-server

What's the target IoT server's IP? (to set as default address for your use case)

Cheers!
-publicdomain (March 31, 2021, 11:26 PM)

Hi,
 :)
Local server, 192.168.0.232.
But I only need the timer part, the call to ther server can be done with curl.
I attached a picture of what im thinking.

15
I kind of solved it with the following.

set /P time2="Set delay"
start /wait HourglassPortable.exe %time2%

App used: https://chris.dziemb....com/apps/hourglass/

The problem is I need to write "H" to get hourglass to understand that I want hours.
Example: "1h25" will get me 1 hour and 25 minutes.

It would be nice to be able to skip the "H" and also have it all in comand prompt.

16
What I want: A command line timer for a computer with the screen off, basically a better pause.exe that accepts hour and minutes as input.
Why: To let me know when the washing machine and dryer are done.

Use case
On a computer that has the screen turned off
1) I Press a hotkey that launch a bat file.
2) Bat file Plays a wav file (So I know I started the right bat file).
3a) Timer.exe is started and waiting for my input                                                                          <------------- This is where I need your help.
3c) I input the time with H MM (Example:132=1 hour & 32 min) and press return.                          <------------- This is where I need your help.
3b) The program plays a wave-file (or beeps) to let me know it accepted the input and start the countdown <------------- This is where I need your help.
3c) When the countdown is done the program exists and the bat file can continue.                          <------------- This is where I need your help.
4) The .bat file makes a HTTP call via curl to my IoT-server that in turn will notify me via a voice message on the speakers and a Telegram notification.

I will make two .bat-files, one for washer and one for the dryer.
I'm thinking that an enhanced version of pause.exe or timeout.exe should do the trick.

Pages: [1]