You are not logged in.

#1 2026-04-17 00:54:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

MyForecast Script

The TAD script works great.
However, there is a problem with locations.

Some locations are redirected to the nearest airport even though it is usually far from the city.
Some locations are updated very rarely on the website (every three hours at my place).

I did a little research and found the source that is used.
Updates are regular here and there is a lot more data for conky.

You can download MyForecast here:
https://www.mediafire.com/file/c9qquyyo … ar.xz/file

1) Extract  MyForecast.tar.xz  and get the  MyForecast  folder

2) Copy/Paste  MyForecast  folder in HOME

3) Open the folder and you will see the  myforecast  script (file)

4) Open it with a text editor

5) At the beginning of the script you will see that it is set to  ## Paris, France  as an example and you need to change the addresses (daily and hourly)

HOW?

1) Visit https://www.myforecast.com website

2) Type your location in the search field

3) Once you find your location (not the airport), click  More Forecasts  >  Hourly

4) Right-click in the  URL bar  >  Copy

5) Paste in address_hourly (it must be in the same format as for Paris, FR)

6) Click on the  'hamburger menu' (top right)  >  Current conditions

7) Right-click in the  URL bar  >  Copy

8) Paste in address_daily (it must be in the same format as for Paris, FR)

Done.

Finally, open a terminal and run the  myforecast  script once:

bash $HOME/MyForecast/myforecast

Open the  MyForecat  folder and check if you get this:

myforecast1.png  myforecast2.png

Beautiful weather icons and lots of data for conky.
There is also information about the sun and moon.

It will take time for the new weather conky, but once you have it, share screenshots and code with others.

Enjoy.  smile

Last edited by marens (2026-04-17 01:00:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2 2026-04-17 09:02:08

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,932

Re: MyForecast Script

my mistake, I wrote 'dayli' and 'horly' tongue
done

Last edited by unklar (2026-04-17 09:09:56)

Offline

#3 2026-04-17 10:56:50

loutch
Member
Registered: 2015-12-12
Posts: 1,049

Re: MyForecast Script

hello

great but possible to have it in french

@
+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#4 2026-04-17 12:38:50

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

More details

Spanish (instead of English) and °F (instead of °C) are available.
I haven't tried it, but I think it's only necessary to adjust the addresses (daily and hourly) with:

lang=spanish

and

metric=false

If people would know how little brain is ruling the world, they would die of fear.

Offline

#5 2026-04-17 16:41:17

asqwerth
Member
Registered: 2015-10-08
Posts: 62

Re: MyForecast Script

@marens

I can't seem to access the https://www.myforecast.com/ site.   I get a '403 forbidden' message.

TAD script works well for me, but I'm certainly curious to test this new one out.

Offline

#6 2026-04-17 17:07:12

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

^ Try running the script with the default location (Paris, France).
If it works, give me your location so I can set up the correct addresses (hourly + daily) for you.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#7 Yesterday 09:48:15

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,932

Re: MyForecast Script

myForecast above, accuweather below

my-Fore-accu-Vergeleich-2026-04-18-11-37-26.png

I don't yet know where the 'boxes' in Writing come from, apparently there are still a few things going wrong...

Offline

#8 Yesterday 10:02:58

asqwerth
Member
Registered: 2015-10-08
Posts: 62

Re: MyForecast Script

marens wrote:

^ Try running the script with the default location (Paris, France).
If it works, give me your location so I can set up the correct addresses (hourly + daily) for you.

Nope, running script with default location does not work either.  I get lots of empty text files being generated, and no weather icons.  Similar to the old TAD script during the weekend changeover of data.

Even doing a web search of "myforecast" in the browser and then clicking on the relevant myforecast links brought up by the search results, leads to 403 Forbidden.

It appears that my location is geoblocked.  I enabled VPN and chose a Europe location -- website can be accessed.  When I switched the VPN location back to my own country, access was forbidden. 

Don't worry about it.  I'll continue with TAD.

Offline

#9 Yesterday 11:00:15

ceeslans
Member
Registered: 2015-09-30
Posts: 214

Re: MyForecast Script

unklar wrote:

I don't yet know where the 'boxes' in Writing come from, apparently there are still a few things going wrong...

Yep, also seeing these annoying 'box' glyphs  - and haven't got a clue what's causing it too.
Hopefully, @marens to-the-rescue ...

cheeese-20260418-125606.png

Offline

#10 Yesterday 13:01:10

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

^ I haven't made a conky yet, but I can guess what's going on.

While writing the script, I had a problem getting the images.
Everything looked fine in the text editor (terminal), but I realized that a 'phantom' blank space appeared at the end.

Try to avoid this by using the awk command in conky and printing only the first word.

Example for wind direction:

Instead:

$ sed -n '5p' $HOME/MyForecast/now
N

Use in conky:

$ sed -n '5p' $HOME/MyForecast/now | awk '{print $1}'
N

The first two words are required for the file time (hourly forecat):

Instead:

$ sed -n '1p' $HOME/MyForecast/hourly/time
7 AM

Use in conky:

sed -n '1p' $HOME/MyForecast/hourly/time | awk '{print $1, $2}'
7 AM

The result is the same in the terminal but this should remove the 'phantom' blank space at the end of the line.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#11 Yesterday 13:09:38

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

asqwerth wrote:

Don't worry about it.  I'll continue with TAD.

If your location is updated regularly on the website, everything stays the same.

If you like the MyForecast icons just copy and paste them into TAD.
You just need to rename them by adding 'wt-' to the beginning of each one.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#12 Yesterday 17:16:33

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,932

Re: MyForecast Script

^^Unfortunately awk doesn't help here, although it's ok in the terminal.
I actually only know this from fonts that cannot display an arrow for a trend.
But I don't see an arrow either. The same font is used in accuweather.
my-Fore-accu-Vergeleich2-2026-04-18-19-08-47.png

Offline

#13 Yesterday 17:19:24

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

Remove 'phantom' empty box

I really don't know why it appears.

If you open the 'now' file and place the cursor at the end of line 5 (wind direction) and then use the right arrow, the cursor goes down to the beginning of line 6.
There is no such empty box in the text editor.

I found the solution in test conky.

Wind direction example:

${texeci 600 sed -n '5p' $HOME/MyForecast/now | sed 's/.$//'}

Wherever you have an empty box, use the  sed 's/.$//'  command in MyForecast conky as in the example above.

P.S.
When I have time I will try to find a solution in the script that will remove all the 'phantom' characters.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#14 Yesterday 17:43:21

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,932

Re: MyForecast Script

^Thanks!

With the font 'FiraMono' there is a question mark in the box.  big_smile
fira-Mono-2026-04-18-19-35-39.png

Edit:
BINGO, Master!  clapping_mini.gif
sed-2026-04-18-19-54-23.png

Last edited by unklar (Yesterday 17:57:57)

Offline

#15 Yesterday 23:04:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,170

Re: MyForecast Script

Remove 'phantom' empty box

OK.

First of all, thank you guys for finding the bug.
Everything worked as expected in the text editor and terminal, but a empty box appears in conky.

marens wrote:

When I have time I will try to find a solution in the script that will remove all the 'phantom' characters.

I think a solution has been found.

Add this to the end of the  myforecast  script:

#### REMOVE ALL NON-PRINTABLE CHARACTERS

## Now
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/now

## Days
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/days

## Phrase (Daily)
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/phrase

## Sun
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/sun

## Moon
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/moon

## Temperature (Hourly)
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/hourly/temperature

## Phrase (Hourly)
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/hourly/phrase

## Time (Hourly)
sed -i 's/[^[:print:]]//g' $HOME/MyForecast/hourly/time

I checked all the above files in a test conky and the unexpected character was removed.

Note *
Those using my temporary solution with  sed 's/.$//'  must remove that command from conky

Thanks again and...
Enjoy.  smile

Last edited by marens (Today 00:50:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

Board footer

Powered by FluxBB