You are not logged in.

#4301 2023-07-29 09:23:48

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sector11 wrote:
marens wrote:

@unklar

Open terminal.

1.Hold Ctrl + Shift and press U once, then without Ctrl + Shift type 1f305 and press Enter.
2.Same as above, just type 1f312.

Do you get unicode characters sunrise and moon in color?
Repeat the same with the text editor.
Is there a difference?

Not here: [Ctri][Shift]u

 28 Jul 23 @ 10:54:35 ~
   $ ?

dito here.

I also think it's because of the font.
However, it doesn't bother me because I want less 'color' in this case.  wink

Offline

#4302 2023-07-29 10:39:46

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Gis Weather

You know that there is no wind icon when it is calm (no wind).
I tried to change it and succeeded.

How?

Open gis-weather.py file.

Find this part:

                if icon_wind_now[0] != 'None': 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('wind'), a, a, icon_wind_now[0]+angel)

For @unklar find this part:

                if icon_wind_now[0] != 'None':
                    a = 44 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('wind'), a, a, icon_wind_now[0]+angel)

                   
Add above:

                # Marens Settings - Add Wind Calm Icon        
                if icon_wind_now[0] == 'None': 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('CLM'), a, a)
                # End Marens Settings

For @unklar add above:

                # Marens Settings - Add Wind Calm Icon        
                if icon_wind_now[0] == 'None':
                    a = 44 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('CLM'), a, a)
                # End Marens Settings

               
Save text editor.

Next:
Download this icon (CLM.png) and copy/paste in gis-weather folder > themes > icons >VClouds or any other theme.
Right click on image > Save Image As.

CLM.png

Done.

calm.png


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

Offline

#4303 2023-07-30 08:35:36

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Also a very nice idea, although I could swear I haven't experienced winstill here in months.  dsfgo1o.png


Unfortunately, no wind icon is displayed at all then.

#                if icon_wind_now[0] != 'None': 
#                    a = 44 
#                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('wind'), a, a, icon_wind_now[0]+angel)
                # Marens Settings - Add Wind Calm Icon        
                if icon_wind_now[0] == 'None':
                    a = 44 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('CLM'), a, a)
                # End Marens Settings

Offline

#4304 2023-07-30 11:08:25

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

You should have added this part ABOVE.
It should look like this:

                # Marens Settings - Add Wind Calm Icon        
                if icon_wind_now[0] == 'None':
                    a = 44 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('CLM'), a, a)
                # End Marens Settings                            
                        
                if icon_wind_now[0] != 'None':
                    a = 44  # Marens Settings - Added this Line 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('wind'), a, a, icon_wind_now[0]+angel)

Last edited by marens (2023-07-30 11:20:14)


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

Offline

#4305 2023-07-30 14:58:24

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

OK.
Now I'm waiting for wind calm....   27KAlfN.png

Offline

#4306 2023-07-30 16:56:03

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

OK.
Now I'm waiting for wind calm....   https://i.imgur.com/27KAlfN.png

I'm sure it works, but...

There is a better way.
If you are interested do this or just skip it.

I found where a value is defined in the script.
Remove the lines containing a = 44, it should look like this:

                # Marens Settings - Add Wind Calm Icon        
                if icon_wind_now[0] == 'None': 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('CLM'), a, a)
                # End Marens Settings                            
                        
                if icon_wind_now[0] != 'None': 
                    self.draw_scaled_image(cr, x0-a/2+font_NS/2, y0-a/2+3+font_NS/2, self.find_icon('wind'), a, a, icon_wind_now[0]+angel)

Then find this part:

            if show_block_wind_direct:
                ####-block wind direct-####
                left = block_wind_direct_left
                top = y + 30 # top
                r = 31     # radius
                a = 36     # width and height arrow (a < 2*r)

Replace with:

            if show_block_wind_direct:
                ####-block wind direct-####
                left = block_wind_direct_left
                top = y + 30 # top
                r = 31     # radius
                #a = 36     # width and height arrow (a < 2*r) Icon
                a = 44     # Marens Settings - Increase Wind Icon

Done.


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

Offline

#4307 2023-08-01 13:07:38

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

Now I'm waiting for wind calm....

You don't have to wait.
We will play (just for testing) with the $HOME/Downloads/gis-weather-master/services/gismeteo.py file.
Open file and find:

    # wind
    wind_speed_now = re.findall('<fact.*? ws="(.*?)"', source)
    wind_speed_now[0] = convert_from_ms(wind_speed_now[0])
    s = re.findall('<fact.*? wd="(.*?)"', source)[0]

Replace temporarily with:

# wind
    wind_speed_now = re.findall('<fact.*? ts="(.*?)"', source)
    wind_speed_now[0] = convert_from_ms(wind_speed_now[0])
    s = re.findall('<fact.*? ts="(.*?)"', source)[0]

Save the text editor, but do not close it.
Restart Gis Weather.

Is the CLM icon there?

Revert all changes in the $HOME/Downloads/gis-weather-master/services/gismeteo.py file back and save text editor.
Restart Gis Weather.

P.S.       
I added the CLM icon to the Additional Info Block (Wind, Pressure, Humidity ...) of Gis Weather.
I had to make a different icon, because the old one doesn't look good in this section.
I did not see from the screenshots that this block is used, but I will post it solution if anyone is interested.

calm.png


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

Offline

#4308 2023-08-01 15:53:12

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Yes Sir, all applied and working!  wink

A7EtdtJt.png

I am now resetting the script.   SLKhTwf.png

Offline

#4309 2023-08-01 16:43:23

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@unklar

Nice.

I think it would be better if you could improve the translation of the word 'Calm' into German.
Word 'Windstille' is too long.
That's why part of the word 'km/h' moves to the second row.

Let's try to fix it:

Open file $HOME/Downloads/gis-weather-master/po/de.po

Find this:

#: services/accuweather.py:277 utils/wind_direct_convert.py:17
msgid "Calm"
msgstr "Windstille"

Replace with:

#: services/accuweather.py:277 utils/wind_direct_convert.py:17
msgid "Calm"
msgstr "Calm"

or just try:

#: services/accuweather.py:277 utils/wind_direct_convert.py:17
#msgid "Calm"
#msgstr "Windstille"

Of course, now you don't have to wait for calm to test it.

Edit
I don't know if the word 'Ruhig' would be appropriate in the German translation?

#: services/accuweather.py:277 utils/wind_direct_convert.py:17
msgid "Calm"
msgstr "Ruhig"

Last edited by marens (2023-08-01 22:05:37)


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

Offline

#4310 2023-08-01 16:58:37

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

OK.
Now I'm waiting for wind calm....   https://i.imgur.com/27KAlfN.png

ME: Holding breath!

Does that help?


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4311 2023-08-02 09:58:14

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

marens wrote:

I think it would be better if you could improve the translation of the word 'Calm' into German.
Word 'Windstille' is too long.
That's why part of the word 'km/h' moves to the second row.

Thanks @marens, I hadn't seen that.

Instead of 'calm'(Ruhig) I chose 'no wind'(kein Wind).   wink

Offline

#4312 2023-08-02 10:01:30

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sector11 wrote:
unklar wrote:

OK.
Now I'm waiting for wind calm....   https://i.imgur.com/27KAlfN.png

ME: Holding breath!

Does that help?

Unfortunately, I am no longer the youngest. So it does not work for long .  wONLPnh.png   wink

Offline

#4313 2023-08-02 23:19:59

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

Instead of 'calm'(Ruhig) I chose 'no wind'(kein Wind).

I found a solution similar to Accuweather_conky_script:

Open file $HOME/Downloads/gis-weather-master/utils/wind_direct_convert.py and find line:

    if d == '0': direct = _('Calm')

Replace with:

    #if d == '0': direct = _('Calm')
    if d == '0': direct = _('Clm ')  # Marens settings - Change Calm Name

Test it and see if you like it.
The German translation for Calm will be disabled in this case.


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

Offline

#4314 2023-08-03 10:09:38

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Yes, I like this solution even better.  wink  Thanks!

Offline

#4315 2023-08-03 12:28:58

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

I like it too.
A small correction is needed.

I don't want the output to look like this: Clm , 0 km/h with a space between 'Clm' and ','.
I think this is better: CLM, 0 km/h.

if d == '0': direct = _('CLM')  # Marens settings - Change Calm Name

P.S.
Now make copies of $HOME/Downloads/gis-weather-master and $HOME/.config/gis-weather folders.
If Gis Weather is updated, we will lose all changes.
This way we will easily return them.
If we want to install Gis Weather on another machine, we just copy those two folders and paste them in the right place.
Everything will work as it should and all our settings will be there.

EDIT
CLM.png

Last edited by marens (2023-08-03 16:45:31)


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

Offline

#4316 2023-08-04 09:16:03

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

OK. All done as you suggested.

marens wrote:

If Gis Weather is updated, ...

Do you really believe that?  fXYDnDl.png


PS:
Apropos, the script called via the terminal produces this error because this package no longer exists in bookworm:

~/Downloads/gis-weather-master$ ./gis-weather.py
Gis Weather 0.8.4.20
Not found gir1.2-appindicator3-0.1 (libappindicator3)
Programmordner:
    /home/unklar/.config/gis-weather/gw_config1.json
...

gis-weather.py

...
try:
    gi.require_version('AppIndicator3', '0.1')
    from gi.repository import AppIndicator3
    HAS_INDICATOR=True
except:
    HAS_INDICATOR=False
    print('Not found gir1.2-appindicator3-0.1 (libappindicator3)')
...

In [ Boron ] these packages are responsible for this, one of which is installed:

apt policy libayatana-appindicator3-1 gir1.2-ayatanaappindicator3-0.1
libayatana-appindicator3-1:
  Installiert:           0.5.92-1
  Installationskandidat: 0.5.92-1
  Versionstabelle:
 *** 0.5.92-1 500
        500 https://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status
gir1.2-ayatanaappindicator3-0.1:
  Installiert:           (keine)
  Installationskandidat: 0.5.92-1
  Versionstabelle:
     0.5.92-1 500
        500 https://deb.debian.org/debian bookworm/main amd64 Packages

Do you think that the error would disappear if the script would search for the 'right' package?
However, I am unsure if the call is made from the 'gi.repository'.


BTW, it is 'windless' at the moment.  dsfgo1o.png

ZEWzgFMt.png

Last edited by unklar (2023-08-04 09:50:16)

Offline

#4317 2023-08-04 12:31:53

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

Do you really believe that?

The script has worked flawlessly for many years and the author has no reason to change anything (for now).
It might also depend on this:

Donations:
If you like the software, don't forget to donate to further development of it!
https://github.com/RingOV/gis-weather/wiki/Donate

I set it in the Preferences > General > Check for updates > NEVER.

unklar wrote:

Do you think that the error would disappear if the script would search for the 'right' package?
However, I am unsure if the call is made from the 'gi.repository'.

I don't think it matters if the indicator works in your panel.
I set it in the Preferences > Indicator Tab:
Show: Widget + Indicator
Icons: Sticker
Type: AppIndicator3

indicator.png

You can insert Gis Weather into the menu:

In $HOME/.local/share/applications make gis-weather.desktop file.

[Desktop Entry]
Name=Gis Weather
Exec=python3 "/home/unklar/Downloads/gis-weather-master/gis-weather.py"
Type=Application
Terminal=false
Icon=/home/unklar/Downloads/gis-weather-master/icon.png
Comment=Weather widget

Now look for Gis Weather in the menu.
If it's there, you don't need to run it from the terminal.

Last edited by marens (2023-08-04 12:40:09)


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

Offline

#4318 2023-08-04 14:24:35

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thank you for your thoughtfulness wink


I'm with bunsenlabs in the comfortable situtaion that here new applications are added to the menu/bar(tint2) basically without my intervention. So the user does not need to care.


There is only one difference between beryllium and [ boron ], which derives from the way of installation:

With beryllium I had downloaded and installed the gis-weather package as .deb. Therefore the two directories under

/usr/share/gis-weather
and
~/.config/gis-weather
Our above 'created' gis-weather-master must be copied from root to /usr/share/ and renamed.


Nothing changes with [ boron ] if you download it as .zip to ~/Downloads/ and unpack it there.

RjlgCCTt.jpg

Offline

#4319 2023-08-04 16:39:32

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@unklar

You have Gis Weather in the menu because you installed it as a .deb package.
I never do that.

You can uninstall (If you want) the .deb package and simply use Gis Weather from ~/Downloads/gis-weather-master folder.
It won't change anything in your settings (~/.config/gis-weather).
Everything will work as it should.

Why is that good?
It is always better to 'play' with the settings in ~/Downloads/gis-weather-master, rather than in the system folder.

P.S.
Check again ~/Downloads/gis-weather-master/services/gismeteo.py file.
Output: CLM, 4km/h is incorrect and should be CLM, 0km/h.
https://forums.bunsenlabs.org/viewtopic … 77#p128677

This part (as default) should look like this:

    # wind
    wind_speed_now = re.findall('<fact.*? ws="(.*?)"', source)
    wind_speed_now[0] = convert_from_ms(wind_speed_now[0])
    s = re.findall('<fact.*? wd="(.*?)"', source)[0]

Check if you have returned the file to its original state.


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

Offline

#4320 2023-08-04 17:44:20

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

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@marens,


please don't make the horses shy (that's what they say in germany).


- it doesn't matter if I install/set up this weather as .deb (in beryllium), or as .zip (in boron). In both cases it is afterwards in the menu/tint2 !
- all example values are reset and OK.
- the test of boron with its 'new' gis-weather-master was copied to beryllium and the old folder was replaced
- it is correctly displayed 'CLM, 0km/h.
The picture is wrong because there was no update of the weather data at the time of the recording. My mistake!


Are now all clarities removed ?   gdFOjMR.png

Offline

Board footer

Powered by FluxBB