You are not logged in.

#4281 2023-06-24 16:39:44

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

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

ector1935 wrote:

Hi everyone,
thanks @marens for the link, now everything works again.
Thanks to the forum many problems are solved, as we would-I would do without,
Thanks again

marens wrote:

@ector1935
Ps) If anyone is in contact with @Teo, please greet me
See post:
https://forums.bunsenlabs.org/viewtopic … 42#p127942


If you are interested:

marens wrote:

Now, moon in conky looks same as on my 'favorite' site timeanddate.com and in the sky.

See post:
https://forums.bunsenlabs.org/viewtopic … 12#p127912


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

Offline

#4282 2023-07-13 07:31:11

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

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

Bonjour @loutch,

Avant-hier, j'ai trouvé une application (Breezy Weather) d'un de vos compatriotes pour les smartphones Android.
Donc, si vous possédez un smartphone Android, cela pourrait être quelque chose pour vous. Il comprend les services météorologiques

    Météo ouverte
    AccuWeather
    MET Norvège
    OpenWeatherMap
    Météo France
    Fournisseurs chinois mixtes

Je l'ai installé avec F-Droid.

===================================

Hello @loutch,

The day before yesterday I found an app from a countryman of yours for Android smartphones.
So if you own an Android smartphone, it might be something for you. It includes the weather services

    Open meteo
    AccuWeather
    MET Norway
    OpenWeatherMap
    Meteo France
    Mixed China providers

I installed it with F-Droid.  wink

Offline

#4283 2023-07-16 14:35:39

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Hello

Danke , arbeit gut mit Meteo France.

==========================

Tanks , work great with Meteo France.

@+


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

#4284 2023-07-20 13:53:07

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

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

Gis Weather

unklar wrote:

Do you have any other tips on how to remove the plus signs in front of the temperatures?

Open file $HOME/Downloads/gis-weather-master/utils/convert.py

This part:

def add_plus(t):
    if t[0] not in ('+', '-', '0'):
        t = "+"+t
    return t

Replace with:

def add_plus(t):
    if t[0] not in ('+', '-', '0'):
        #t = "+"+t
        t = " "+t
    return t

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

Offline

#4285 2023-07-20 16:44:33

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

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

You're the best!  wink  Thank you very much.

Gu5OGnTt.png

Offline

#4286 2023-07-22 02:26:20

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

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

Moongiant conky script  -  Illumination Angle and Visibility in Real Time


I have successfully completed tonight script testing (whole moon cycle +) and everything is working as expected.
I added small aesthetic changes.
For example, now you have the option to make moon images look more yellow.
At the beginning of the script, I have described in more details how to determine the UTC correction for your location using the terminal.
Of course, you must first replace the latitude and longitude for your city instead Paris, France.

I will repeat (briefly) how to properly install the script:

Download the astronomy ZIP file from GitHub:
https://github.com/cosinekitty/astronomy
* ( Code button > PopUpMenu > Download ZIP )

Extract the astronomy-master.zip file in ~/Downloads and Copy/Paste astronomy-master folder into Moongiant_conky_script.

Open moongiant file in Moongiant_conky_script folder and add script before last line (#Resume weather conky).

It should look like this:

#### Marens - Moon Illumination Angle and VisibilitY

#Example: Paris, France
#Replace to your city latitude, longitude
latitude=48.864716
longitude=2.349014

#Convert Time to Zulu (UTC)
#More details: www.techtarget.com/whatis/definition/Zulu-Zulu-time
#Terminal: date +%z  Output for me: +0200
#Missing correction -2 hours to UTC
#Examples for other locations (date +%z):
#Melbourne(Australia) +1000  Missing correction -10 hours to UTC
#Buenos Aires(Argentina) -0300  Missing correction +3 hours to UTC 
   
date=$(date -u +%Y-%m-%dT%H:%M:%SZ)

#Start python script
python3 $HOME/Moongiant_conky_script/astronomy-master/demo/python/camera.py $latitude $longitude $date > $HOME/Moongiant_conky_script/illumination_angle 

#Moon Illumination Angle and Moon Visibility (Visible/Under Horizon)
rotation=$(cat $HOME/Moongiant_conky_script/illumination_angle | grep -oP '(?<=Moon = )[^ ]*' | awk -F'.' '{print $1}')
altitude=$(cat $HOME/Moongiant_conky_script/illumination_angle | grep -oP '(?<=altitude = )[^ ]*' | awk -F'.' '{print $1}')

#Illumination Angle
if [[ $rotation -ge 0 ]]; then
  illumination_angle=$(echo 90-$rotation | bc)
else
  #rotation absolute value 
  illumination_angle=$(echo ${rotation#-}-90 | bc)
fi
  
#Control
#echo $rotation
#echo $altitude
#echo $illumination_angle 

#Visibility
altitude1=$(cat $HOME/Moongiant_conky_script/illumination_angle | grep -oP '(?<=altitude = )[^ ]*' | sed 's/.//2g')
#if [[ $altitude -ge 0 ]]; then
if [[ "$altitude1" != "-" ]]; then
  echo 'Visible' > $HOME/Moongiant_conky_script/visibility
else
  echo 'Under Horizon' > $HOME/Moongiant_conky_script/visibility
fi

##Images

for szFile in $HOME/Moongiant_conky_script/*.png
do
 
#Old Moon Images 
#    convert "$szFile" -background 'none' -virtual-pixel 'none' -distort SRT $illumination_angle $HOME/Moongiant_conky_script/"$(basename "$szFile")" ;

#More Yellow Moon Images  
    convert "$szFile" -background 'none' -virtual-pixel 'none' +level-colors ,#fff480 -distort SRT $illumination_angle $HOME/Moongiant_conky_script/"$(basename "$szFile")" ; 

done

#### END Marens - Moon Illumination Angle and VisibilitY 

#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"

Restart conky.

Now the moon images is more yellow (default).
If you want to revert old images just add '#' before the second convert command and remove '#' before first convert command.


How to check if the script is working properly?

Visually, just wait night and look for the moon in the sky.

or

Visit:
https://www.timeanddate.com/astronomy/france/paris
In the search field, type your location and select it in the popup menu.
You will get a moon image for your location in real time.
It should be similar (same) as in conky.
The timeanddate site also gives the percentage of illumination in real time, so there may be small differences in the moon images.


Default moon (more yellow) images:

moon-yellow.png

Old moon images:

moon-old.png


Issues

Sometimes it can happen (not often) that the illumination_angle file looks like this:

Moon horizontal position: azimuth = 203.470, altitude = 14.310
Moon check: (1.00000000, 0.00000000, 0.00000000, 2023-06-08T14:20:00.000Z)
Excessive error in moon check (y).

The reason is tolerance.
At the beginning of the camera.py script:

def Camera(observer, time):
    tolerance = 1.0e-15

and next:       

if abs(vec.x - 1.0) > tolerance:
        print("Excessive error in moon check (x).")
        return 1

    if abs(vec.y) > tolerance:
        print("Excessive error in moon check (y).")
        return 1

    if abs(vec.z) > tolerance:
        print("Excessive error in moon check (z).")
        return 1

When this 'error' occurs, we get the old 'vertical' moongiant images without illuminations angle.
After a few minutes (next conky update), everything works (again) as expected.

Any question?

P.S.
More details about visibility and illumination_angle files and how to use them in conky in my old post:
https://forums.bunsenlabs.org/viewtopic … 12#p127912

Last edited by marens (2024-03-09 13:15:45)


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

Offline

#4287 2023-07-23 13:28:34

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

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

I forgot to post a simple MoonReal test conky.
Configuration is usual, just set minimum_size 200 0.

${texeci 500 bash $HOME/Moongiant_conky_script/moongiant}${voffset 5}${alignc}${color gold}${texeci 600 date +%R}
${if_match "${texeci 600 sed -n '1p' $HOME/Moongiant_conky_script/visibility}" == "Under Horizon"}${color A40000}${voffset 50}${alignc}${texeci 600 sed -n '1p' $HOME/Moongiant_conky_script/visibility}${voffset -50}${else}${endif}
${voffset 100}${alignc}${color 0098FF}altitude:  ${color FF6060}${texeci 600 cat $HOME/Moongiant_conky_script/illumination_angle | grep -oP '(?<=altitude = )[^ ]*'}°
${alignc}${color 0098FF}azimuth:  ${color FF6060}${texeci 600 cat $HOME/Moongiant_conky_script/illumination_angle | grep -oP '(?<=azimuth = )[^ ]*' | awk -F',' '{print $1}'}°${voffset 5}\
${image $HOME/Moongiant_conky_script/0.png -p 60,45 -s 80x80}

MoonReal.png

EDIT
Moon Altitude is the vertical angle the Moon makes with the horizon.
When Atitude < 0 Moon is Under Horizon (Invisible).
Moon Azimuth is specified as the horizontal angle the object makes with a reference direction, such as true north.
More details:
https://www.timeanddate.com/astronomy/h … ystem.html

Last edited by marens (2023-07-23 16:04:36)


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

Offline

#4288 2023-07-27 13:35:30

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

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

I edited the sunrise/sunset/duration section of Gis Weather.
I think it looks better now.

Unfortunately, some unicode characters cannot be displayed in the code tags.

You can download the file with instructions here:
https://workupload.com/file/3Yed9BfkJMQ

Just extract file gis-weather-sunrise.tar.xz and open it with a text editor.

EDIT

gis-weather-sunrise.png

Last edited by marens (2023-07-27 14:34:21)


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

Offline

#4289 2023-07-27 14:36:28

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

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

Thanks for the sha256. Great service!

The result:

PBY10uQt.png


I personally like the old version better   wink

Another question. I tried to enlarge the wind icon. It could be bigger for my taste. Unfortunately the script doesn't seem to accept it. So, it does not change.

Last edited by unklar (2023-07-27 14:38:35)

Offline

#4290 2023-07-27 15:11:45

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

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

unklar wrote:

Thanks for the sha256. Great service!

The result:

https://i.imgur.com/PBY10uQt.png


I personally like the old version better   wink

Another question. I tried to enlarge the wind icon. It could be bigger for my taste. Unfortunately the script doesn't seem to accept it. So, it does not change.

It seems that your system font does not support the new characters properly.

Wind icon

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)

                   
Replace with:

                if icon_wind_now[0] != 'None':
                    a = 48 
                    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)

Edit
I am currently testing with a = 44.
It's a bit smaller wind icon than a = 48, but it looks better to me.

With wind icon (a = 44):
gis-wind-icon.png

Last edited by marens (2023-07-27 21:43:58)


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

Offline

#4291 2023-07-27 15:22:51

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Hello

Tanks marens work great

Capture-d-cran-2023-07-27-17-21-56.png

, i have any question

moon indicator don't work by me and work it by you??

@+


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

#4292 2023-07-27 15:53:49

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

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

loutch wrote:

Hello

Tanks marens work great

https://i.postimg.cc/D0ZTStZt/Capture-d-cran-2023-07-27-17-21-56.png

, i have any question

moon indicator don't work by me and work it by you??

@+


See post:
https://forums.bunsenlabs.org/viewtopic … 14#p128414

Just follow the instructions.
Right click on wind-rose icon in post > Save Image As.

loutch wrote:

moon indicator don't work by me and work it by you??

I think everything is fine.
You have the same unicode symbol for sunset as me.
You use a background image in Gis Weather and that's why it looks a little different.

Edit
Sorry, I'm not sure what the moon indicator is.

Last edited by marens (2023-07-27 16:20:48)


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

Offline

#4293 2023-07-28 08:58:50

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

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

You were right, it looks better at 44.  wink


@marens, thanks for your help! I have appreciated this very much.

Offline

#4294 2023-07-28 13:32:10

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

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

@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?


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

Offline

#4295 2023-07-28 13:59:06

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

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

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 ~
   $ ?

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4296 2023-07-28 16:08:27

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

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

@Sector11


Probably a different system (font) causing problems.
This is how it looks in my text editor (gedit) and font settings (Ubuntu 20.04.6 LTS).

gedit.png gnome-tweaks.png

My Document Text font is set to Sans Regular 11 by default (Ubuntu).

I use the Ubuntu font for conky, but I always have to change it for special (unicode) characters (arrow up, arrow down...).
So I think the key is in the Sans Regular font.


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

Offline

#4297 2023-07-28 17:17:07

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

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

@ marens

No offence but I use nothing Ubuntu.

My text editors and termainal all use: Fira Code Medium

Arrow up ([Alt Gr][Shift]u) ↑ and down [Alt Gr]u ↓ is a keyboard thing from my "latam" keyboard setup
And most of my running conkys use wither Fira Code Medium or Fira Mono Medium fonts.
I prefer "monospaced" fonts in conky - easier to set spaces.

Other than my clock on the top.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4298 2023-07-28 22:15:48

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

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

@Sector11


No two people like exactly the same things.

Last year I had several bad sectors on a drive with five different linux distributions (Mint Cinnamon, Mint Mate, Xubuntu, Lubuntu, Ubuntu).
I replaced the drive and decided to stop installing new distros.
It became hard to maintain all that.

There are many things I don't like about Ubuntu (I always uninstall snap first) and that's why I only use LTS versions that have five years of support and are very stable and fast.
RAM after boot is ~800MB and never exceeded 2GB (for me).
Ubuntu was my first Linux many years (10+) ago and now I'm back to my roots.


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

Offline

#4299 2023-07-28 22:50:33

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

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

@marens

I have no problem with anything anyone does with their computer or what they use.
We all do our thing.  I just wanted to point out that the symbols didn't work for me and as you said:

Probably a different system (font) causing problems.

Not problems, just that some things are different  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4300 2023-07-28 23:23:38

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

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

Sector11 wrote:

Not problems, just that some things are different

Yes, I agree.
My favorite WM is Compiz.
But I couldn't use it often because it is not supported by most distributions.
That's why it's important to have a choice.
Let everyone take what he likes.


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

Offline

Board footer

Powered by FluxBB