topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday April 18, 2024, 6:44 am
  • 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
Hello! WeatherToText v0.6.0 released:


It has a new /O:<filename> argument.

Example:

c:\WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/timmar/ yellow /N /T 1900 /O:Weather.txt

Using /O:Weather.txt writes parsed output to the "Weather.txt" file.

Enjoy!
:Thmbsup:
Vic
-publicdomain (March 13, 2022, 10:44 AM)

Hello
Weather2Text has stoped working on Windows 7, it works on Windows 10.  :o :o :o
The error i get is "Error: The request was aborted: Could not create SSL/TLS secure channel."

I dont know if this helps: https://stackoverflo...l-tls-secure-channel

2
Post New Requests Here / Re: Detect change in marked area
« on: March 24, 2022, 04:37 PM »
Yes, Lets revive this yet post again, I would realy like a program like this!

Usage: I would use a webcam pointed to my heater (see picture)
The program could watch the stream or I can snap picutures at intervalls that the program could look at.
If the ALARM lamp turns red = run a program.
Alarm is the lamp marked with an "!" in a rectangle and it can turn red or stay off.
Vatten.jpg

Alarm is the most important, but if possible I would like to look at the other lights to.


3
Hello! WeatherToText v0.6.0 released:


It has a new /O:<filename> argument.

Example:

c:\WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/timmar/ yellow /N /T 1900 /O:Weather.txt

Using /O:Weather.txt writes parsed output to the "Weather.txt" file.

Enjoy!
:Thmbsup:
Vic
-publicdomain (March 13, 2022, 10:44 AM)

Works great! :up:

4

Yup.  Do you want it timestamped or "fixed"? (i.e. Weather2Text.txt all the time or formatted like: YYYY-MM-DD-HH-MM-SS.txt)

Im not sure that I understand.
Im thinking it should look the same in text as it does in comand prompt. Just redirecting the output. (colors choise would be ignored ofcourse)
Like I can do with "dir > Output-File.txt" for example.

But if i run WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/timmar/  > Weather.txt
The text file Weather.txt just contains "Error: The handle is invalid."  :o

 ;D


5
Hi,

I have some ideas for changes for the new  "14 day output" version.
I dont The Moon phase "månfas" is not very usefull, it can be removed and replaced with thunder probability, that is much more useful.

Thunder is called "Sannolikhet åska" and like the current version of Weather2Text only a percentage is needed, not the text part.
The page writes "Sannolikhet åska Ingen (0%)" (translated: probability thunder None (0%)"

If we get the possibility to do the Weather2Text ouput to a textfile Im thinking of scheduling the output to a webpage and break free from big weathers telementry data and their apps.  :D

6

Thanks for a great program,
I have a few update ideas.

1. Ouput the data to a text file.
c:\WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/timmar/ yellow > Weather.txt

2. Get weather overview from the "14 day output" page.
https://www.klart.se.../v%C3%A4der-alberga/
Note that the page says "14 dagar" (dagar = days) but it gives a forcast well beyond, up to 24th december at this point.
(This doesnt need to be the same program if it easier to make a seperate program)

Im thinking something like this would give the forcast for 10 days, yellow output and 10 day output.
c:\WeatherToText.exe https://www.klart.se/se/södermanlands-län/väder-alberga/ yellow /D 10

Text.png
Klart.png
You can get the moon phase by clicking "Detaljvy" (marked with a big arrow in the picture)

Translations
Swedish -> English
  • Lägsta = Lowest
  • Sol      =Sun
  • Upp     = Up
  • Ned     = Down
  • Regn    = Rain
  • Månfas  = Moon phase
  • Tilltagande = Increasing
  • Avtagande = Decreasing
  • Fullmånde = Full moon
  • Detaljvy    = Detail view
  • Dagar     = Days
  • Idag       = Today
  • Måndag  = Monday
  • Tisdag    = Tuesday
  • Onsdag   = Wednesday
  • Torsdag  = Thursday
  • Fredag   = Friday
  • Lördag   = Saturday
  • Söndag  = Sunday

7
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.

8
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.

9
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.

10
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

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


13
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.

15
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. :-)


16
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

17
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

18
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

19
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:

20
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.

21
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.

22
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]