You are not logged in.

#2641 2019-08-26 21:22:51

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

You're saying that if anyone wants to contribute to the project, the .gitignore file will protect them from pushing unnecessary files to the project, like daily_forecast, hourly or even forecast images.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#2642 2019-08-26 21:56:15

morfik
Member
From: Europe/Poland
Registered: 2016-09-08
Posts: 169
Website

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

Yes, something like that. Basically they won't be notified about any changes to those files, and they can focus only on those files that really matter.

Offline

#2643 2019-08-27 05:36:35

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

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

TeoBigusGeekus wrote:

But this time I actually did it and I'm very glad about it; thanks again mate!

That's nice to hear!

Sector11 wrote:

@ohnonot:  gevile or msevil what's the difference? MS acquired GitHub in Oct 2018

A valid remark.
I never recommended github specifically (however they do still have the best documentation).
And oh, TBG already moved on to gitlab.com!
Well done.

FWIW, there's some valid concerns about gitlab.com as well. Not to the point of recommending to avoid it, but still.

PS: incidentally found this while searching. Could come in handy big_smile

Last edited by ohnonot (2019-08-27 05:54:07)

Offline

#2644 2019-08-27 07:51:20

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)

@Teo,
Thank you so much for doing this! In this short time and all the work with the two scripts.
I am impressed with the ease with which you do it.  O:)

@morfik, many thanks also to you for your support in setting up gitlab. cool

@ohnonot, thanks for your informative links. I didn't know that and am surprised - and, also again not! So, the conscious Linuxer goes round in circles, so to speak.   8.(

Offline

#2645 2019-08-27 07:57:17

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)

Teo,
my experiences when changing from github - gitlab, you can do a lot wrong. wink

I am such a guy who likes to pick up old and proven ones. At the latest, when github asks me this morning for the user password, I knew it.
Old braids must be consistently cut off, otherwise the new one works, practical procedures not!

git clone https://gitlab.com/teobigusgeekus/1_accuweather.git
fatal: Zielpfad '1_accuweather' existiert bereits und ist kein leeres Verzeichnis.

Both scripts (accuweather + wu) are working fine so far and I'm still looking for the practical implementation in my files.   big_smile

Offline

#2646 2019-08-27 14:23:38

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

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

Man oh man what a flurry of activity.

To echo unklar:  Teo - as usual you are the man!  Thank you so much for what you do.

ohnonot & morfik - awesome support and very very much appreciated.

Real Life, like Teo, is eating up much of my time.  I have yet to get the latest scripts but this is my working Wunderground script - I think it is the second one Teo came out with. Had to modify it a tad to get spacing issues sorted, and I've put it in a box as this is the only weather I have currently. It will be re-formatted to S11 style eventually.   But I have an entry in OpenBox, call it up, look at it and close it.

2019-08-27_110550_Scrot11.th.jpg

And the conky v1.9 code.

# pkill -xf "conky -c /media/5/Conky/2_Wunderground/wunder.conky" &
# works perfect - Tue 27 Aug 2019 11:19:16

###  Begin Window Settings  ##################################################
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints below,skip_taskbar,skip_pager #,undecorated
own_window_class Conky
own_window_title Wunder Conky

# Use the Xdbe extension? (eliminates flicker)
double_buffer yes

minimum_size 385 0  ## w|h
maximum_width 385

gap_x 80 #0 # l|r
gap_y 80 #0 # u|d


alignment tl # mm
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Fantasque Sans Mono:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes #### <<<----- To see it easier on light screens.
default_shade_color 000000
draw_outline no #### <<<----- Amplifies text if yes OJO with changing fonts
default_outline_color 000000

#default_color DCDCDC #220 220 220	Gainsboro
default_color C0C0C0 #192 192 192 Silver
#default_color B0E0E6 #176 224 230 PowderBlue
#default_color F5F5DC # Beige
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 D8BFD8 #216 191 216 Thistle
color3 87CEFA #135 206 250 LightSkyBlue
color4 48D1CC # 72 209 204 MediumTurquoise
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 B0E0E6 #176 224 230 PowderBlue
color8 FFFFE0 #255 255 224 LightYellow
color9 CD5C5C #205  92  92 IndianRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40

#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

## Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value
## if you use $image lots.		Set to 0 to disable the image cache.
imlib_cache_size 0
##############################################  End Miscellaneous Section  ###
update_interval 1

TEXT
${color FDB72E}WEATHER ${hr 2}${color}${texeci 500 bash /media/5/Conky/2_Wunderground/2_wun}
${image /media/5/Conky/2_Wunderground/Forecast_Images/current.png -p 0,15 -s 155x155}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/Moon_phase.png -p 285,45 -s 40x40}\
${goto 180}${execpi 600 sed -n '88p' /media/5/Conky/2_Wunderground/curr_cond|cut -c1-20}
${goto 180}${execpi 600 sed -n '88p' /media/5/Conky/2_Wunderground/curr_cond|cut -c21-40}
${goto 180}${execpi 600 sed -n '52p' /media/5/Conky/2_Wunderground/curr_cond}° \
(${execpi 600 sed -n '58p' /media/5/Conky/2_Wunderground/curr_cond}°)
${goto 180}${execpi 600 sed -n '1p' /media/5/Conky/2_Wunderground/moon_data}\



${goto 180}${color FDB72E}        WIND: ${color}${execpi 600 sed -n '82p' /media/5/Conky/2_Wunderground/curr_cond} \
${execpi 600 sed -n '86p' /media/5/Conky/2_Wunderground/curr_cond}km/h
${goto 180}${color FDB72E}  VISIBILITY: ${color}${execpi 600 sed -n '78p' /media/5/Conky/2_Wunderground/curr_cond} km
${goto 180}${color FDB72E}    PRESSURE: ${color}${execpi 600 sed -n '30p' /media/5/Conky/2_Wunderground/curr_cond}hPa
${goto 180}${color FDB72E}    HUMIDITY: ${color}${execpi 600 sed -n '36p' /media/5/Conky/2_Wunderground/curr_cond} %
${goto 180}${color FDB72E}    UV INDEX: ${color}${execpi 600 sed -n '72p' /media/5/Conky/2_Wunderground/curr_cond}
${goto 180}${color FDB72E}PRECIP. (6h): ${color}${execpi 600 sed -n '22p' /media/5/Conky/2_Wunderground/curr_cond} mm
 ${color FDB72E}SUNRISE: ${color}${execpi 600 sed -n '44p' /media/5/Conky/2_Wunderground/curr_cond|cut -c1-5}\
${goto 180}${color FDB72E}MOONRISE: ${color}${execpi 600 sed -n '2p' /media/5/Conky/2_Wunderground/moon_data|cut -c1-5}
  ${color FDB72E}SUNSET: ${color}${execpi 600 sed -n '48p' /media/5/Conky/2_Wunderground/curr_cond|cut -c1-5}\
${goto 180}${color FDB72E} MOONSET: ${color}${execpi 600 sed -n '3p' /media/5/Conky/2_Wunderground/moon_data|cut -c1-5}
${hr 1}
${if_match "${execpi 600 sed -n '2p' /media/5/Conky/2_Wunderground/10days}" == "Tonight"}${color FDB72E}\
${execpi 600 sed -n '2p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}ZD\
${goto 210}${execpi 600 sed -n '100p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}${color}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/1.png -p 0,235 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/2.png -p 190,235 -s 55x55}
${goto 70}- /${execpi 600 sed -n '12p' /media/5/Conky/2_Wunderground/10days}°\
${goto 260}${execpi 600 sed -n '110p' /media/5/Conky/2_Wunderground/10days}°/${execpi 600 sed -n '208p' /media/5/Conky/2_Wunderground/10days}°
${goto 70}${execpi 600 sed -n '46p' /media/5/Conky/2_Wunderground/10days} ${execpi 600 sed -n '42p' /media/5/Conky/2_Wunderground/10days}km/h\
${goto 260}${execpi 600 sed -n '144p' /media/5/Conky/2_Wunderground/10days} ${execpi 600 sed -n '140p' /media/5/Conky/2_Wunderground/10days}km/h
${goto 70}${execpi 600 sed -n '26p' /media/5/Conky/2_Wunderground/10days}\
${goto 260}${execpi 600 sed -n '124p' /media/5/Conky/2_Wunderground/10days}
${hr}
${color FDB72E}${execpi 600 sed -n '296p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${goto 135}${execpi 600 sed -n '492p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${goto 260}${execpi 600 sed -n '688p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/4.png -p 0,305 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/6.png -p 130,305 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/8.png -p 255,305 -s 55x55}${color}

${goto 070}${execpi 600 sed -n '306p' /media/5/Conky/2_Wunderground/10days}°\
${goto 200}${execpi 600 sed -n '502p' /media/5/Conky/2_Wunderground/10days}°\
${goto 325}${execpi 600 sed -n '698p' /media/5/Conky/2_Wunderground/10days}°
${goto 080}${execpi 600 sed -n '404p' /media/5/Conky/2_Wunderground/10days}°\
${goto 210}${execpi 600 sed -n '600p' /media/5/Conky/2_Wunderground/10days}°\
${goto 335}${execpi 600 sed -n '796p' /media/5/Conky/2_Wunderground/10days}°

${execpi 600 sed -n '320p' /media/5/Conky/2_Wunderground/10days}\
${goto 135}${execpi 600 sed -n '516p' /media/5/Conky/2_Wunderground/10days}\
${goto 260}${execpi 600 sed -n '712p' /media/5/Conky/2_Wunderground/10days}
${hr 1}
${color FDB72E}${goto 22}${execpi 600 sed -n '884p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 87}${execpi 600 sed -n '1080p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 150}${execpi 600 sed -n '1276p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 215}${execpi 600 sed -n '1472p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 280}${execpi 600 sed -n '1668p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 345}${execpi 600 sed -n '1864p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}${color}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/10.png -p 0,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/12.png -p 65,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/14.png -p 130,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/16.png -p 195,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/18.png -p 260,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/20.png -p 325,405 -s 50x50}




${execpi 600 sed -n '894p' /media/5/Conky/2_Wunderground/10days}°\
${goto 72}${execpi 600 sed -n '1090p' /media/5/Conky/2_Wunderground/10days}°\
${goto 135}${execpi 600 sed -n '1286p' /media/5/Conky/2_Wunderground/10days}°\
${goto 200}${execpi 600 sed -n '1482p' /media/5/Conky/2_Wunderground/10days}°\
${goto 265}${execpi 600 sed -n '1678p' /media/5/Conky/2_Wunderground/10days}°\
${goto 332}${execpi 600 sed -n '1874p' /media/5/Conky/2_Wunderground/10days}°
${color3}${goto 35}${execpi 600 sed -n '992p' /media/5/Conky/2_Wunderground/10days}°\
${goto 100}${execpi 600 sed -n '1188p' /media/5/Conky/2_Wunderground/10days}°\
${goto 165}${execpi 600 sed -n '1384p' /media/5/Conky/2_Wunderground/10days}°\
${goto 230}${execpi 600 sed -n '1580p' /media/5/Conky/2_Wunderground/10days}°\
${goto 290}${execpi 600 sed -n '1776p' /media/5/Conky/2_Wunderground/10days}°\
${goto 360}${execpi 600 sed -n '1972p' /media/5/Conky/2_Wunderground/10days}°
${else}${color FDB72E}${execpi 600 sed -n '2p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${goto 210}${execpi 600 sed -n '100p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}${color}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/1.png -p 0,235 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/2.png -p 190,235 -s 55x55}
${goto 100}${execpi 600 sed -n '12p' /media/5/Conky/2_Wunderground/10days}°\
${goto 290}- /${execpi 600 sed -n '110p' /media/5/Conky/2_Wunderground/10days}°
${goto 100}${execpi 600 sed -n '46p' /media/5/Conky/2_Wunderground/10days} ${execpi 600 sed -n '42p' /media/5/Conky/2_Wunderground/10days}km/h\
${goto 290}${execpi 600 sed -n '144p' /media/5/Conky/2_Wunderground/10days} ${execpi 600 sed -n '140p' /media/5/Conky/2_Wunderground/10days}km/h
${goto 100}${execpi 600 sed -n '26p' /media/5/Conky/2_Wunderground/10days}\
${goto 290}${execpi 600 sed -n '124p' /media/5/Conky/2_Wunderground/10days}
${hr 1}
${color FDB72E}${execpi 600 sed -n '200p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${goto 150}${execpi 600 sed -n '396p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}\
${goto 280}${execpi 600 sed -n '592p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z}${color}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/3.png -p 0,305 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/5.png -p 130,305 -s 55x55}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/7.png -p 255,305 -s 55x55}

${goto 70}${execpi 600 sed -n '208p' /media/5/Conky/2_Wunderground/10days}°\
${goto 200}${execpi 600 sed -n '404p' /media/5/Conky/2_Wunderground/10days}°\
${goto 325}${execpi 600 sed -n '600p' /media/5/Conky/2_Wunderground/10days}°
${goto 80}${execpi 600 sed -n '306p' /media/5/Conky/2_Wunderground/10days}°\
${goto 210}${execpi 600 sed -n '502p' /media/5/Conky/2_Wunderground/10days}°\
${goto 335}${execpi 600 sed -n '698p' /media/5/Conky/2_Wunderground/10days}°

${execpi 600 sed -n '222p' /media/5/Conky/2_Wunderground/10days}\
${goto 150}${execpi 600 sed -n '418p' /media/5/Conky/2_Wunderground/10days}\
${goto 280}${execpi 600 sed -n '614p' /media/5/Conky/2_Wunderground/10days}
${hr 1}
${color FDB72E}${goto 25}${execpi 600 sed -n '786p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 87}${execpi 600 sed -n '982p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 150}${execpi 600 sed -n '1178p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 215}${execpi 600 sed -n '1374p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 280}${execpi 600 sed -n '1570p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}\
${goto 345}${execpi 600 sed -n '1766p' /media/5/Conky/2_Wunderground/10days|tr a-z A-Z|cut -c1-3}${color}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/9.png -p 0,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/11.png -p 65,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/13.png -p 130,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/15.png -p 195,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/17.png -p 260,405 -s 50x50}\
${image /media/5/Conky/2_Wunderground/Forecast_Images/19.png -p 325,405 -s 50x50}




${execpi 600 sed -n '796p' /media/5/Conky/2_Wunderground/10days}°\
${goto 72}${execpi 600 sed -n '992p' /media/5/Conky/2_Wunderground/10days}°\
${goto 135}${execpi 600 sed -n '1188p' /media/5/Conky/2_Wunderground/10days}°\
${goto 200}${execpi 600 sed -n '1384p' /media/5/Conky/2_Wunderground/10days}°\
${goto 265}${execpi 600 sed -n '1580p' /media/5/Conky/2_Wunderground/10days}°\
${goto 332}${execpi 600 sed -n '1776p' /media/5/Conky/2_Wunderground/10days}°
${color3}${goto 35}${execpi 600 sed -n '894p' /media/5/Conky/2_Wunderground/10days}°\
${goto 100}${execpi 600 sed -n '1090p' /media/5/Conky/2_Wunderground/10days}°\
${goto 165}${execpi 600 sed -n '1286p' /media/5/Conky/2_Wunderground/10days}°\
${goto 230}${execpi 600 sed -n '1482p' /media/5/Conky/2_Wunderground/10days}°\
${goto 290}${execpi 600 sed -n '1678p' /media/5/Conky/2_Wunderground/10days}°\
${goto 360}${execpi 600 sed -n '1874p' /media/5/Conky/2_Wunderground/10days}°
${endif}

NOTE:  Everything under TEXT should work perfectly in a v1.10+ conky


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2647 2019-08-27 14:46:56

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

great job all !
I made another, and add a blinking blue command in case of cold T° under 5°... Ready for winter smile

${font Fira Mono:Style=Bold:size=15}${goto 100}${if_match ${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}<5}°${color lightblue}${blink ${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}°}${else}${color orange}${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}°${endif}${font}${color}\

conky-wu-v-10-10-hours:

conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	own_window = true,
	own_window_type = 'normal',
	--own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
	own_window_argb_visual = true,
	own_window_argb_value = 100,
-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,
	text_buffer_size = 2048,
-- fiddle with window
	use_spacer = 'none',
	use_xft = true,
	background = true,
-- Update interval in seconds
	update_interval = 1,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
-- Minimum size of text area
	minimum_width = 255, minimum_height = 280,
	maximum_width = 255,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = false,
	default_shade_color = '#000000',
	draw_outline = true,
	default_outline_color = '#000000',
-- Text stuff
	draw_outline = true,-- amplifies text if yes
	draw_borders = false,
--font freesans -12
	--fonts tests:
--JD LCD Rounded:style=Bold
--LCDMono2
--Lucida Sans
--Neogrey
--PF Tempesta Five Condensed
--PF Tempesta Five Compressed
--Visitor TT1 BRK:Medium:size=9
--Anonymous Pro:Medium:size=8
--Terminus
--Fira Mono
	font = 'Fira Mono:size=10', --important for shades
	template0 = 'Fira Mono:size=11',
	template1 = 'Fira Mono:size=11',

	uppercase = false,-- set to yes if you want all text to be in uppercase

-- Stippled borders?
	stippled_borders = 3,

--border_inner_margin = '9',
-- border width
	border_width = 10,

-- Default colors and also border colors, grey90 == #e5e5e5
	--default_color = '#cbcbcb',
	--color1  = '#505454', 
	--own_window_colour = 'brown',
	--own_window_transparent = true,
-- color
	default_color = 'cbcbcb',
	color0 = '98FB98', --PaleGreen
	color1 = '778899', --LightSlateGray
	color2 = 'FFD700', --Gold
	color3 = 'B0E0E6', --PowderBlue
	color4 = 'F4A460', --SandyBrown
	color5 = 'DEB887', --BurlyWood
	color6 = '00BFFF', --DeepSkyBlue
	color7 = '5F9EA0', --CadetBlue
	color8 = 'FFA500', --Orange
	color9 = 'FF4500', --OrangeRed
	

-- Text alignment, other possible values are commented
--alignment top_right
--alignment top_left
	alignment = 'top_left',
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text
	gap_x = 50,
	gap_y = 80,

	imlib_cache_size = 0,
-- script lua	
	lua_load = '~/.conky/script/image.lua',
--[[
#${lua conky_draw_bg 4 0 0 0 155 0x000000 0.3}\
#${lua conky_draw_bg 4 0 165 0 50 0x000000 0.3}\
#${lua conky_draw_bg 4 0 225 0 65 0x000000 0.3}\
#${lua conky_draw_bg 4 0 0 0 290 0x000000 0.4}\
--]]
};

conky.text = [[
${execi 600 bash $HOME/2_Wunderground/2_wun}\
${voffset -10}${font Fira Mono:Style=Bold:size=15}${color1}${alignc}${time %A %e %B}${color}${font}
${font Fira Mono:Style=Bold:size=15}${goto 100}${if_match ${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}<5}°${color lightblue}${blink ${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}°}${else}${color orange}${execpi 600 sed -n '52p' $HOME/2_Wunderground/curr_cond}°${endif}${font}${color}\
${alignr}${voffset 10}${font Open Sans:size=7}${execpi 600 sed -n '1p' $HOME/2_Wunderground/moon_data}${font}
${alignc}${execpi 600 sed -n '88p' $HOME/2_Wunderground/curr_cond|cut -c1-20}
${alignc}${execpi 600 sed -n '88p' $HOME/2_Wunderground/curr_cond|cut -c21-40}${color}
${voffset -30}
${goto 4}Wind ${execpi 600 sed -n '82p' $HOME/2_Wunderground/curr_cond} \
${alignr}${execpi 600 sed -n '88p' $HOME/2_Wunderground/curr_cond|cut -c21-40}
${goto 4}${execpi 600 sed -n '86p' $HOME/2_Wunderground/curr_cond} km/h\
${alignr}${execpi 600 sed -n '36p' $HOME/2_Wunderground/curr_cond} % Hum
${goto 4}${execpi 600 sed -n '30p' $HOME/2_Wunderground/curr_cond} mb\
${alignr}${execpi 600 sed -n '22p' $HOME/2_Wunderground/curr_cond} mm Prec
${goto 4}Sunrise: ${color8}${execpi 600 sed -n '44p' $HOME/2_Wunderground/curr_cond|cut -c1-5} \
${alignr}${color}Sunset: ${color1}${execpi 600 sed -n '48p' $HOME/2_Wunderground/curr_cond|cut -c1-5}${color}
${goto 4}± ${execpi 600 sed -n '58p' $HOME/2_Wunderground/curr_cond}°\
${alignr}Vis ${execpi 600 sed -n '78p' $HOME/2_Wunderground/curr_cond} Km${color}
#${goto 4}UV Index: ${execpi 600 sed -n '72p' $HOME/2_Wunderground/curr_cond}
${color5}${hr 1}
##--bloc heures##
${voffset 30}${goto 4}${execi 600 echo `date --date "2 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 60}${execi 600 echo `date --date "4 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 116}${execi 600 echo `date --date "6 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 172}${execi 600 echo `date --date "8 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 228}${execi 600 echo `date --date "10 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${voffset 15}${color8}${goto 4}${execpi 600  sed -n '80p' $HOME/2_Wunderground/hourly}°\
${goto 60}${execi 600  sed -n '226p' $HOME/2_Wunderground/hourly}°\
${goto 116}${execi 600  sed -n '372p' $HOME/2_Wunderground/hourly}°\
${goto 172}${execi 600  sed -n '518p' $HOME/2_Wunderground/hourly}°\
${goto 228}${execi 600  sed -n '664p' $HOME/2_Wunderground/hourly}°\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/Moon_phase.png 220 10 40 40}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/current.png 90 70 75 75}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/h2.png 3 185 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/h4.png 59 185 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/h6.png 115 185 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/h8.png 171 185 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/h10.png 227 185 30 30}${color}\
##-fin-bloc heures#
${voffset 50}${goto 6}${execi 600 echo `date --date "1 day" +%a|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 62}${execi 600 echo `date --date "2 day" +%a|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 118}${execi 600 echo `date --date "3 day" +%a|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 174}${execi 600 echo `date --date "4 day" +%a|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${goto 230}${execi 600 echo `date --date "5 day" +%a|sed -e 's/\(.\{1\}\)/\U\1/'`}\
${voffset 15}${color3}${goto 6}${execpi 600  sed -n '110p' $HOME/2_Wunderground/10days}°\
${goto 66}${execi 600  sed -n '208p' $HOME/2_Wunderground/10days}°\
${goto 122}${execi 600  sed -n '306p' $HOME/2_Wunderground/10days}°\
${goto 178}${execi 600  sed -n '404p' $HOME/2_Wunderground/10days}°\
${goto 234}${execi 600  sed -n '502p' $HOME/2_Wunderground/10days}°\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/2.png 3 310 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/3.png 59 310 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/4.png 115 310 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/5.png 171 310 30 30}\
${lua fDrawImage $HOME/2_Wunderground/Forecast_Images/6.png 227 310 30 30}\
${voffset 40}${color8}${goto 16}${execpi 600 sed -n '112p' $HOME/2_Wunderground/10days}°\
${goto 76}${execpi 600 sed -n '210p' $HOME/2_Wunderground/10days}°\
${goto 132}${execpi 600 sed -n '308p' $HOME/2_Wunderground/10days}°\
${goto 188}${execpi 600 sed -n '406p' $HOME/2_Wunderground/10days}°\
${goto 244}${execpi 600 sed -n '504p' $HOME/2_Wunderground/10days}°${color}\
]];

pic:
wu-10hrs_2019-08-27_16-45-46.png

Offline

#2648 2019-08-27 15:33:55

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

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

Hello


@ theo

i modify my accuweather script with new syntax & it work great

1566919828.png

Great Job


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

Online

#2649 2019-08-27 16:12:27

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

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

@ ragamatrix & loutch

Both really nice stuff.

Teo does great work!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2650 2019-08-27 16:21:42

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

morfik wrote:

Yes, something like that. Basically they won't be notified about any changes to those files, and they can focus only on those files that really matter.

Whenever I push a conky script it's from the clean folder. No images or script output files present.

ohnonot wrote:

PS: incidentally found this while searching. Could come in handy big_smile

Bookmarked!

unklar wrote:

@Teo,
Thank you so much for doing this! In this short time and all the work with the two scripts.
I am impressed with the ease with which you do it.  O:)

Sector11 wrote:

To echo unklar:  Teo - as usual you are the man!  Thank you so much for what you do.

ragamatrix wrote:

great job all !

loutch wrote:

Great Job

Thank you guys for your kind words and your feedback; loutch that's a work of art!

PS: Shit has hit the fan again workwise. I might be gone again for a few days, ...or maybe not...
We'll see.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#2651 2019-08-27 16:36:13

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

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

ohnonot wrote:

PS: incidentally found this while searching. Could come in handy big_smile

hahahahahahahaha
hahahahahahahaha
hahahahahahahaha
hahahahahahahaha
hahahahahahahaha

bookmarked  Thank you!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2652 2019-08-28 09:34:47

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

hello,
I would like to re-use an old weather conky configuration style that I really enjoyed, the problem is LUA...
I would draw circular lines and put the weather data of teo inside like the first conky on top right of this picture:
peachy_lua_code
I know it's may be crazy, but I still have the code of this lua script but I would use it only for drawing the circle without using the weather datas which are inside it...? big_smile
Is it possible to re-write this lua code only for drawing circles?
weathercircle.lua:

--even more weather by mrpeachy 12/31/11
require 'cairo'
require 'imlib2'
function string:split(delimiter)
local result = { }
local from  = 1
local delim_from, delim_to = string.find( self, delimiter, from  )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from  = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from  )
end
table.insert( result, string.sub( self, from  ) )
return result
end

function conky_weather()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
local home = os.getenv("HOME")
--#########################################################################################################
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
secs=1800--set update interval
web="http://www.intellicast.com/Local/Forecast.aspx?unit=C&location=SZXX0014"--insert unit=C& after? for C
--get web address by going to the intellicast site and entering your location in the box
--for version 3 you must get click on "Extended Forecast" to get the necessary address
--set location of weather images
weathericons="~/v9000/additional_files/weathericons/"
weathericons=string.gsub(weathericons, "~", home)
--set defaults
default_font="FreeSans"--font must be in quotes
default_font_size=10
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
--#########################################################################################################
--############start of timed section#######################################################################
--#########################################################################################################
local updates=tonumber(conky_parse('${updates}'))
local timer=(updates %secs)+1
--#######################################
if timer==secs or updates==6 then--######
--#######################################
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
if allweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
end
if allweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
end
allweather=string.gsub(allweather,"[\n\r]","")
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
if nowweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
end
if nowweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
end
nowweather=string.gsub(nowweather,"[\n\r]","")
if allweather==nil then 
allweather=""
nowweather="" 
print "error curl operation failed"
end
--intellicast to conky weather icon conversion
wimage={
wx_65="32",
wx_66="30",
wx_67="26",
wx_68="32",
wx_69="28",
wx_70="20",
wx_71="32",
wx_72="21",
wx_73="36",
wx_74="14",
wx_75="28",
wx_76="18",
wx_77="14",
wx_78="23",
wx_79="05",
wx_80="15",
wx_81="15",
wx_82="11",
wx_83="16",
wx_84="00",
wx_85="32",
wx_86="25",
wx_87="09",
wx_88="05",
wx_89="18",
wx_90="18",
wx_91="39",
wx_92="39",
wx_93="39",
wx_94="39",
wx_95="37",
wx_96="37",
wx_97="31",
wx_98="29",
wx_99="27",
wx_100="47",
wx_101="47",
wx_102="33",
wx_103="26",
wx_104="20",
wx_105="45",
wx_106="45",
wx_107="11",
wx_108="46",
wx_109="46",
wx_110="06",
wx_111="18",
wx_112="06",
wx_113="46",
wx_114="46",
wx_115="31",
wx_116="47",
}--end w image table
--convert intellicast icons to weather font
wfont={
wx_65="a",
wx_66="c",
wx_67="f",
wx_68="a",
wx_69="d",
wx_70="0",
wx_71="a",
wx_72="9",
wx_73="5",
wx_74="p",
wx_75="d",
wx_76="w",
wx_77="p",
wx_78="6",
wx_79="x",
wx_80="8",
wx_81="8",
wx_82="h",
wx_83="q",
wx_84="m",
wx_85="a",
wx_86="-",
wx_87="h",
wx_88="x",
wx_89="w",
wx_90="w",
wx_91="g",
wx_92="g",
wx_93="g",
wx_94="g",
wx_95="k",
wx_96="k",
wx_97="A",
wx_98="C",
wx_99="D",
wx_100="K",
wx_101="K",
wx_102="B",
wx_103="f",
wx_104="0",
wx_105="G",
wx_106="G",
wx_107="h",
wx_108="O",
wx_109="O",
wx_110="x",
wx_111="w",
wx_112="x",
wx_113="O",
wx_114="O",
wx_115="A",
wx_116="K",
}--end w font table
--conversion day and month tables
dayshort={Monday="Lun",Tuesday="Mar",Wednesday="Mer",Thursday="Jeu",Friday="Ven",Saturday="Sam",Sunday="Dim",x=""}
monthshort={January="Jan",February="Fev",March="Mar",April="Avr",May="Mai",June="Jui",July="Jui",August="Aoû",September="Sep",October="Oct",November="Nov",December="Dec",x=""}
moonfontt={New="=",Full="@",FirstQuarter="G",LastQuarter="T",WaningGibbous="R",WaningCrescent="V",WaxingCrescent="E",WaxingGibbous="I"}
windfontt={S="9",SSW=":",SW=";",WSW="<",W="=",WNW=">",NW="?",NNW="@",N="1",NNE="2",NE="3",ENE="4",E="5",ESE="6",SE="7",SSE="8"}
--setup tables for forecast weather
forecast_day={}
forecast_day_caps={}
forecast_day_lc={}
forecast_day_short={}
forecast_day_short_caps={}
forecast_day_short_lc={}
forecast_month={}
forecast_month_caps={}
forecast_month_lc={}
forecast_month_short={}
forecast_month_short_caps={}
forecast_month_short_lc={}
forecast_date={}
weather_icon={}
weather_font={}
high_temp={}
low_temp={}
conditions={}
conditions_caps={}
conditions_lc={}
sun_rise={}
sun_rise_lc={}
moon_rise={}
moon_rise_lc={}
sun_set={}
sun_set_lc={}
moon_set={}
moon_set_lc={}
humidity={}
precipitation={}
snow={}
cloud_cover={}
moon_phase={}
moon_phase_caps={}
moon_phase_lc={}
moon_font={}
wind_mph={}
wind_km={}
wind_kts={}
wind_direction={}
wind_font={}
wind_deg={}
wind_nesw={}
uv_index_num={}
uv_index_txt={}
uv_index_txt_caps={}
uv_index_txt_lc={}
-----------------
--extract information into tables
local start=0
local f=1
while f~=nil do
--match forecast day name and date
s,f,t=string.find(allweather,"<td colspan=\"2\"><strong>([%a,%s%d]*)</strong></td>",start)
	if t~=nil then
	--split name from month and date
	a,b,day=string.find(t,"(%a*),%s")
	a,b,month=string.find(t,",%s(%a*)%s")
	a,b,date=string.find(t,"(%d*)$")
	--ser day names, regular, caps, lowercase and short
	table.insert(forecast_day,day)
	table.insert(forecast_day_caps,string.upper(day))
	table.insert(forecast_day_lc,string.lower(day))
	table.insert(forecast_day_short,dayshort[day])
	table.insert(forecast_day_short_caps,string.upper(dayshort[day]))
	table.insert(forecast_day_short_lc,string.lower(dayshort[day]))
	--set month types
	table.insert(forecast_month,month)
	table.insert(forecast_month_caps,string.upper(month))
	table.insert(forecast_month_lc,string.lower(month))
	table.insert(forecast_month_short,monthshort[month])
	table.insert(forecast_month_short_caps,string.upper(monthshort[month]))
	table.insert(forecast_month_short_lc,string.lower(monthshort[month]))
	--set date
	table.insert(forecast_date,date)
	end
--intellicast weather icon match
s,f,t=string.find(allweather,"40_white/(wx_..).png\"",start)
--convert to conkyweather icon
	if t~=nil then
	table.insert(weather_icon,weathericons..wimage[t]..".png")
	--convert to weather font
	table.insert(weather_font,wfont[t])
	end
--match conditions
s,f,t=string.find(allweather," /><br />([%a%s/]*)</td>",start)
	if t~=nil then
	table.insert(conditions,t)
	table.insert(conditions_caps,string.upper(t))
	table.insert(conditions_lc,string.lower(t))
	end
--match high temp
s,f,t=string.find(allweather,"\"Hi\">(%d*)&deg",start)
table.insert(high_temp,t)
--match low temp
s,f,t=string.find(allweather,"\"Lo\">(%d*)&deg",start)
table.insert(low_temp,t)
--match sunrise and set-- alt="Sunrise" style="vertical-align:bottom;" /><strong>Rise:</strong> 7:19 AM</td>            <td><strong>Set:</strong> 4:54 PM</td>
--match sun rise times
s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",start)
	if t~=nil then
	table.insert(sun_rise,t)
	table.insert(sun_rise_lc,string.lower(t))
	end
--match sun set times
s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then	
	table.insert(sun_set,t)
	table.insert(sun_set_lc,string.lower(t))
	end
--moon rise
s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then
	table.insert(moon_rise,t)
	table.insert(moon_rise_lc,string.lower(t))
	end
--moon set
s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then
	table.insert(moon_set,t)
	table.insert(moon_set_lc,string.lower(t))
	end
--match uv index
s,f,tuv=string.find(allweather,"UV Index:</strong> (%d%s*%(%a*%)) <br />",start)
	if tuv~=nil then
	a,b,t=string.find(tuv,"(%d*)%s*%(%a*%)")
	table.insert(uv_index_num,t)
	a,b,t=string.find(tuv,"%d*%s*%((%a*)%)")
	table.insert(uv_index_txt,t)
	table.insert(uv_index_txt_caps,string.upper(t))
	table.insert(uv_index_txt_lc,string.lower(t))
	end
--match humidity
s,f,t=string.find(allweather,"Humidity:</strong> (%d*)<br />",start)
table.insert(humidity,t)
--match ppt
s,f,t=string.find(allweather,"Precipitation:</strong> (%d*)<br />",start)
table.insert(precipitation,t)
--match snow %
s,f,t=string.find(allweather,"Snow Probability:</strong>             (%d*)<br />",start)
table.insert(snow,t)
--match cloud coveage
s,f,t=string.find(allweather,"Cloud Coverage:</strong> (%d*)<br />",start)
table.insert(cloud_cover,t)
--match moon phase
s,f,t=string.find(allweather,"Moon Phase:</strong> ([%a%s]*) <br />",start)
--set moon phase text
	if t~= nil then
	table.insert(moon_phase,t)
	table.insert(moon_phase_caps,string.upper(t))
	table.insert(moon_phase_lc,string.lower(t))
	--set moon phase font
	mp=string.gsub(t," ","")
	table.insert(moon_font,moonfontt[mp])
	end
--match wind speeds
s,f,t=string.find(allweather,"Wind Speed:</strong> (%d*)Mph",start)
table.insert(wind_mph,t)
s,f,t=string.find(allweather,"Mph%s*%((%d*)Km,",start)
table.insert(wind_km,t)
s,f,t=string.find(allweather,"Km,%s*(%d*)Kts%)",start)
table.insert(wind_kts,t)
--match wind direction
s,f,twd=string.find(allweather,"Wind Direction:</strong> ([%d&;%s%(%a%)]*)        </div>",start)
	if twd~=nil then
	a,b,t=string.find(twd,"(%d*)&deg;")
	table.insert(wind_deg,t)
	--match wind font and nesw   
	a,b,t=string.find(twd,"%((%a*)%)")
	table.insert(wind_font,windfontt[t])
	table.insert(wind_nesw,t)
	end
if f==nil then break end
start=f
end--while
--#########################################################################################################################################
--end--of timed section
--format now weather
--extract current data
now={}
monthlong={Jan="January",Feb="February",Mar="March",Apr="April",May="May",Jun="June",Jul="July",Aug="August",Sep="September",Oct="October",Nov="November",Dec="December"}
s,f,tnow=string.find(nowweather,"<div style=\"float:right;color:#666;\">  As of ([%d%p%a%s]*) %(Local Time%)")
s,f,t=string.find(tnow,"(%d*%p%d*%s%a*) on")
now["time"]=t
now["time_lc"]=string.lower(t)
s,f,t=string.find(tnow,"on (%a*)%s%d*")
now["day"]=t
now["day_caps"]=string.upper(t)
now["day_lc"]=string.lower(t)
ds=dayshort[t]
now["day_short"]=ds
now["day_short_caps"]=string.upper(ds)
now["day_short_lc"]=string.lower(ds)
s,f,t=string.find(tnow,"%s(%d%d)%s")
now["date"]=t
s,f,t=string.find(tnow,"%d%d%s(%a*)%s%d")
now["month_short"]=t
now["month_short_caps"]=string.upper(t)
now["month_short_lc"]=string.lower(t)
ml=monthlong[t]
now["month"]=ml
now["month_caps"]=string.upper(ml)
now["month_lc"]=string.lower(ml)
s,f,t=string.find(tnow,"%a%a%a%s(%d%d%d%d)")
now["year"]=t
s,f,t=string.find(nowweather,"40_white/(wx_%d*).png")
now["weather_icon"]=weathericons..wimage[t]..".png"
now["weather_font"]=wfont[t]
s,f,t=string.find(nowweather,"class=\"Icon\" /> (%a*(%s%a*))%s*</td>")
now["conditions"]=t
now["conditions_caps"]=string.upper(t)
now["conditions_lc"]=string.lower(t)
s,f,t=string.find(nowweather,"Temperature\">([%p%d]*)&deg")
now["temp"]=t
s,f,t=string.find(nowweather,">Feels Like: ([%p%d]*)&deg;</a>")
now["feels_like"]=t
s,f,t=string.find(nowweather,">Wind Chill: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["wind_chill"]=t
s,f,t=string.find(nowweather,">Ceiling: </a></td>%s*<td>([%a%d]*)</td>")
if t~="Unl" then
s,f,t=string.find(t,"(%d*)")
t=t.." mi"
end
now["ceiling"]=t
now["ceiling_caps"]=string.upper(t)
now["ceiling_lc"]=string.lower(t)
s,f,t=string.find(nowweather,">Heat Index: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["heat_index"]=t
s,f,t=string.find(nowweather,">Visibility: </a></td>%s*<td>([%a%d]*)</td>")
if t~="Unl" then
s,f,t=string.find(t,"(%d*)")
t=t.." mi"
end
now["visibility"]=t
now["visibility_caps"]=string.upper(t)
s,f,t=string.find(nowweather,">Dew Point: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["dew_point"]=t
s,f,t=string.find(nowweather,">Wind: </a></td>%s*<td>(%d*)mph</td>")
now["wind_mph"]=t.." mph"
s,f,t=string.find(nowweather,">Humidity: </a></td>%s*<td>(%d*)</td>")
now["humidity"]=t
s,f,twd=string.find(nowweather,">Direction: </a></td>%s*<td style=[%p%a]*>([%d&;%s%(%a%)]*)</td>%s*</tr>")
a,b,t=string.find(twd,"(%d*)&deg;")
now["wind_deg"]=t
a,b,t=string.find(twd,"%((%a*)%)")
now["wind_nesw"]=t
now["wind_font"]=windfontt[t]
s,f,t=string.find(nowweather,">Pressure: </a></td>%s*<td>([%d%p]*)\"</td>")
now["pressure"]=t
s,f,t=string.find(nowweather,">Gusts: </a></td>%s*<td>([%d%a]*)</td>")
if t~="NA" then
s,f,t=string.find(t,"(%d*)")
t=t.." mph"
end
now["wind_gusts"]=t
now["wind_gusts_caps"]=string.upper(t)
--###############end of data processing########################
--###########################
end--of timed section########
--###########################
--write lines here to show in conky
--these tables hold the top left coordinates for each repeat as set lower, do not edit
top_left_x_coordinate={}
top_left_y_coordinate={}
--write settings, c=color,a=alpha,f=font,fs=font size,x=x position, y=y position, txt=text or data to show
--eg out({c=0xffff00,a=1,f="Sans",fs=14,x=100,y=100,txt="hello world"})
--image settings, x=top left x position, y=top left y position, w=width of image(0=full size), h=height(0=full size),file=file location
--eg image({x=0,y=35,w=60,h=60,file=now[weather_icon]})
--########################################################
--######### write or paste setups below ##################
--########################################################
midx=160
midy=160
radouter=150
radinner=50
radforecast=90
radhilo=125
radfctxt=130
radcond=110
radsmall=25
fcangle1=0
fcangle2=45
fcangle3=90
fcangle4=135
fcangle5=180
wcr,wcg,wcb,wca=1,1,1,0.3
---------------------------------------------
cairo_set_line_width (cr,1)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
--draw outer circle
cairo_arc (cr,midx,midy,radouter,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
--draw inner circle
cairo_arc (cr,midx,midy,radinner,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
--draw forecast line and text
astr=270
aend=350
cairo_arc (cr,midx,midy,radfctxt,(math.pi/180)*(astr-90),(math.pi/180)*(aend-90))
cairo_stroke (cr)
cwt={text="Previsions",font="FreeSans",fsize=16,radius=radfctxt+3,xpos=midx,ypos=midy,position=1,start=astr,finish=aend,justify=1,letterdeg=5,};cw(cwt)
--set start and end angle for conditions box
astr=205
aend=335
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
cairo_arc (cr,midx,midy,radcond,(math.pi/180)*(astr-90),(math.pi/180)*(aend-90))
cairo_stroke (cr)
cwt={text="Conditions courantes",font="FreeSans",fsize=14,radius=radcond+3,xpos=midx,ypos=midy,position=1,start=astr,finish=aend,justify=1,letterdeg=5,};cw(cwt)
--print current temps
trad=radcond-16
cwt={text="TMP: "..now["temp"].."C° / RES: "..now["feels_like"].."C° ",font="FreeSans",fsize=14,radius=trad,xpos=midx,ypos=midy,position=2,start=astr+5,finish=aend-5,justify=1,letterdeg=5.5,};cw(cwt)
--print current conditions wrap to length
--wrap settings
line_text=now["conditions_caps"]
max_string_len=16
indent=""
clines=to_lines(line_text,max_string_len,indent)
--set radius for conditions lines (shouldnt need more than 2)
crad1=trad-16
crad2=crad1-16
cwt={text=clines[1],font="FreeSans",fsize=14,radius=crad1,xpos=midx,ypos=midy,position=2,start=astr+5,finish=aend-10,justify=1,letterdeg=7,};cw(cwt)
cwt={text=clines[2],font="FreeSans",fsize=14,radius=crad2,xpos=midx,ypos=midy,position=1,start=astr+5,finish=aend-10,justify=1,letterdeg=8,};cw(cwt)
--connect lines to form curent box
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*astr
xs1=0+radcond*(math.sin(arc))
ys1=0-radcond*(math.cos(arc))
arc=(math.pi/180)*astr
xe1=0+radinner*(math.sin(arc))
ye1=0-radinner*(math.cos(arc))
cairo_move_to (cr,midx+xs1,midy+ys1)
cairo_line_to (cr,midx+xe1,midy+ye1)
cairo_stroke (cr)
arc=(math.pi/180)*aend
xs2=0+radcond*(math.sin(arc))
ys2=0-radcond*(math.cos(arc))
arc=(math.pi/180)*aend
xe2=0+radinner*(math.sin(arc))
ye2=0-radinner*(math.cos(arc))
cairo_move_to (cr,midx+xs2,midy+ys2)
cairo_line_to (cr,midx+xe2,midy+ye2)
cairo_stroke (cr)
--individual fc circles and forecast data
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle1
xfc1=0+radforecast*(math.sin(arc))
yfc1=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc1,midy+yfc1,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
radst=14
	arc=(math.pi/180)*fcangle1
	xfc1hl=0+(radsmall+radst)*(math.sin(arc))
	yfc1hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc1hl+xfc1,y=midy+yfc1hl+yfc1,txt=forecast_day_short_caps[1]})
	out({x=midx+xfc1hl+xfc1,y=midy+yfc1hl+yfc1+12,txt=high_temp[1].."C°|"..low_temp[1].."C°"})
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle2
xfc2=0+radforecast*(math.sin(arc))
yfc2=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc2,midy+yfc2,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle2
	xfc2hl=0+(radsmall+radst)*(math.sin(arc))
	yfc2hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc2hl+xfc2,y=midy+yfc2hl+yfc2,txt=forecast_day_short_caps[2]})
	out({x=midx+xfc2hl+xfc2,y=midy+yfc2hl+yfc2+12,txt=high_temp[2].."C°|"..low_temp[2].."C°"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle3
xfc3=0+radforecast*(math.sin(arc))
yfc3=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc3,midy+yfc3,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle3
	xfc3hl=0+(radsmall+radst)*(math.sin(arc))
	yfc3hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc3hl+xfc3,y=midy+yfc3hl+yfc3,txt=forecast_day_short_caps[3]})
	out({x=midx+xfc3hl+xfc3,y=midy+yfc3hl+yfc3+12,txt=high_temp[3].."C°|"..low_temp[3].."C°"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle4
xfc4=0+radforecast*(math.sin(arc))
yfc4=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc4,midy+yfc4,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle4
	xfc4hl=0+(radsmall+radst)*(math.sin(arc))
	yfc4hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc4hl+xfc4,y=midy+yfc4hl+yfc4,txt=forecast_day_short_caps[4]})
	out({x=midx+xfc4hl+xfc4,y=midy+yfc4hl+yfc4+12,txt=high_temp[4].."C°|"..low_temp[4].."C°"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle5
xfc5=0+radforecast*(math.sin(arc))
yfc5=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc5,midy+yfc5,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle5
	xfc5hl=0+(radsmall+radst)*(math.sin(arc))
	yfc5hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc5hl+xfc5,y=midy+yfc5hl+yfc5,txt=forecast_day_short_caps[5]})
	out({x=midx+xfc5hl+xfc5,y=midy+yfc5hl+yfc5+12,txt=high_temp[5].."C°|"..low_temp[5].."C°"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
--show weather icons
imsizel=80
image({x=midx-imsizel,y=midy-imsizel,w=imsizel,h=imsizel,file=now["weather_icon"]})
imsizes=50
image({x=midx+xfc1-imsizes,y=midy+yfc1-imsizes,w=imsizes,h=imsizes,file=weather_icon[1]})
image({x=midx+xfc2-imsizes,y=midy+yfc2-imsizes,w=imsizes,h=imsizes,file=weather_icon[2]})
image({x=midx+xfc3-imsizes,y=midy+yfc3-imsizes,w=imsizes,h=imsizes,file=weather_icon[3]})
image({x=midx+xfc4-imsizes,y=midy+yfc4-imsizes,w=imsizes,h=imsizes,file=weather_icon[4]})
image({x=midx+xfc5-imsizes,y=midy+yfc5-imsizes,w=imsizes,h=imsizes,file=weather_icon[5]})
--#########################################################
--########## end of current conditions ####################
--######### forecast weather and repeat ###################
--#########################################################
--enter number of forecast days to show
number_of_days=8
--enter coordinates of top left corner for each day
top_left_x_coordinate[1],top_left_y_coordinate[1]=270,15
top_left_x_coordinate[2],top_left_y_coordinate[2]=540,15
top_left_x_coordinate[3],top_left_y_coordinate[3]=0,190
top_left_x_coordinate[4],top_left_y_coordinate[4]=270,190
top_left_x_coordinate[5],top_left_y_coordinate[5]=540,190
top_left_x_coordinate[6],top_left_y_coordinate[6]=0,370
top_left_x_coordinate[7],top_left_y_coordinate[7]=270,370
top_left_x_coordinate[8],top_left_y_coordinate[8]=540,370
------------------------
for i=1,number_of_days do--start of day repeat, do not edit
tlx=top_left_x_coordinate[i]--sets top left position for each repeat
tly=top_left_y_coordinate[i]--sets top left position for each repeat
--write day format below, write x and y relative to top left coordinates as in the example
--write i to call day as this will be replaced with the day number for each repeat

end--of day repeat, do not edit
--##############################################################
--############## end of weather display setup ##################
--##############################################################

end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

function out(tx)
color=nil
color=tx.c
if color==nil then color=default_color end
alpha=nil
alpha=tx.a
if alpha==nil then alpha=default_alpha end
font=nil
font=tx.f
if font==nil then font=default_font end
fsize=nil
fsize=tx.fs
if fsize==nil then fsize=default_font_size end
xpos=nil
xpos=tx.x
if xpos==nil then xpos=0 end
ypos=nil
ypos=tx.y
if ypos==nil then ypos=0 end
text=nil
text=tx.txt
if text==nil then text="hello world" end
local function col(c)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,alpha
end--local function
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,col(color))
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
cairo_stroke (cr)
end--function out

function image(im)
x=nil
x=im.x
if x==nil then x=0 end
y=nil
y=im.y
if y==nil then y=0 end
w=nil
w=im.w
if w==nil then w=default_image_width end
h=nil
h=im.h
if h==nil then h=default_image_height end
file=nil
file=tostring(im.file)
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(w)
end
if tonumber(h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(h)
end
local iacross=x+(width/2)
local idown=y+(height/2)
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(iacross, idown)
imlib_free_image()
show=nil
end--function image

function cw(t)
--set variables and defualts
if t.text==nil then text="" else text=t.text end
if t.font==nil then font="FreeSans" else font=t.font end
if t.fsize==nil then fsize=12 else fsize=t.fsize end
if t.radius==nil then radius=50 else radius=t.radius end
if t.xpos==nil then xpos=100 else xpos=t.xpos end
if t.ypos==nil then ypos=100 else ypos=t.ypos end
if t.position==nil then position=1 else position=t.position end
if t.start==nil then start=270 else start=t.start end
if t.finish==nil then finish=90 else finish=t.finish end
if t.justify==nil then justify=1 else justify=t.justify end
if t.letterdeg==nil then letterdeg=5 else letterdeg=t.letterdeg end
--end variables
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,1,1,1,1);
if finish<start then finish=finish+360 end
local inum=string.len(text)
---------------------------
if position==1 then
deg=(finish-start)/(inum-1)
elseif position==2 then
deg=letterdeg
	if justify==1 then
	start=start	
	elseif justify==2 then
	start=start-((letterdeg*inum)/2)
	elseif justify==3 then 
	start=start-(letterdeg*inum)
	end
end
----------------------------
local degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
for i=1,inum do
interval=(degrads*(start+(deg*(i-1))))
txs=0+radius*(math.sin(interval))
tys=0-radius*(math.cos(interval))
cairo_move_to (cr, txs+xpos, tys+ypos);
cairo_rotate (cr, interval)
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -interval)
end
end--circlewriting
function cwd(t)
--set variables and defualts
if t.text==nil then text="" else text=t.text end
if t.font==nil then font="FreeSans" else font=t.font end
if t.fsize==nil then fsize=12 else fsize=t.fsize end
if t.radius==nil then radius=50 else radius=t.radius end
if t.xpos==nil then xpos=100 else xpos=t.xpos end
if t.ypos==nil then ypos=100 else ypos=t.ypos end
if t.position==nil then position=1 else position=t.position end
if t.start==nil then start=270 else start=t.start end
if t.finish==nil then finish=90 else finish=t.finish end
if t.justify==nil then justify=1 else justify=t.justify end
if t.letterdeg==nil then letterdeg=5 else letterdeg=t.letterdeg end
--end variables
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,1,1,1,1);
if start<finish then start=start+360 end
local inum=string.len(text)
---------------------------
if position==1 then
deg=(start-finish)/(inum-1)
elseif position==2 then
deg=letterdeg
	if justify==1 then
	start=start	
	elseif justify==2 then
	start=start+((letterdeg*inum)/2)
	elseif justify==3 then 
	start=start+(letterdeg*inum)
	end
end
----------------------------
local degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1<>")
texttable=string.split(textcut, "<>")
for i=1,inum do
interval=(degrads*(start-(deg*(i-1))))
txs=0+radius*(math.sin(interval))
tys=0-radius*(math.cos(interval))
cairo_move_to (cr, txs+xpos, tys+ypos);
cairo_rotate (cr, interval+(math.pi))
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -1*(interval+(math.pi)))
end
end--cwd 

function to_lines(line_text,max_string_len,indent)
---------------------------------------------
--set defaults for function
local default_max_length=50
local default indent=""
---------------------------------------------
if indent==nil then indent=default_indent end
if max_string_len==nil then max_string_len=default_max_length end
local i=1
text_table={line_text}
while text_table[i]~=nil do
if max_string==nil then max_string=max_string_len end
local v=text_table[i]
	if string.len(v)>max_string_len and string.find(v," ")~=nil and string.find(string.sub(v,1,max_string)," ")~=nil then
	long=string.len(v)
	splitcha=string.sub(v,max_string,max_string)	
		if splitcha~=" " then		
			while splitcha~=" " do
				if max_string>1 then
				max_string=max_string-1
				splitcha=string.sub(v,max_string,max_string)
				else
				splitcha=" "
				end
			end
		end
		local insertit=tostring(indent..string.sub(v,max_string+1,long))
		table.insert(text_table,i+1,insertit)
		text_table[i]=tostring(string.sub(v,1,max_string-1))	
	elseif string.len(v)>max_string_len and string.find(v," ")~=nil and string.find(string.sub(v,1,max_string)," ")==nil then
	long=string.len(v)
	splitcha=string.sub(v,max_string,max_string)		
		while splitcha~=" " do
			if max_string<long then
			max_string=max_string+1
			splitcha=string.sub(v,max_string,max_string)
			else
			splitcha=" "
			end
		end
		local insertit=tostring(indent..string.sub(v,max_string+1,long))
		table.insert(text_table,i+1,insertit)
		text_table[i]=tostring(string.sub(v,1,max_string-1))	
	end
i=i+1
max_string=max_string_len
end
return text_table
end--function  

Last edited by ragamatrix (2019-08-28 09:35:31)

Offline

#2653 2019-08-29 06:25:34

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

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

TeoBigusGeekus wrote:

Whenever I push a conky script it's from the clean folder. No images or script output files present.

If temporary files are written inside the git repo you should add an appropriate .gitignore file to the repo.

Offline

#2654 2019-08-29 06:29:47

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

Nope, none whatsoever.
I make all the appropriate changes in the script's working folder and when I make sure that everything works perfectly I copy the changed files (script or conky config files) into the git folder, from which I do a push to the git repository.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#2655 2019-08-29 06:37:01

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

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

^ yes but will the folks cloning your stuff end up having temporary files in their git folders?

Offline

#2656 2019-08-29 06:47:54

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

I can't see how this will be possible.
As I said, I have two folders for every script: a working, dirty one and a squeaky clean, git only folder.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#2657 2019-08-29 09:12:25

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

Hi all,
ok I've made it !
then it will be easier to understand what I wanted to do ...  roll
BG-Imagemagick.png

Offline

#2658 2019-08-29 11:11:35

morfik
Member
From: Europe/Poland
Registered: 2016-09-08
Posts: 169
Website

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

TeoBigusGeekus wrote:

I can't see how this will be possible.
As I said, I have two folders for every script: a working, dirty one and a squeaky clean, git only folder.

Basically, I don't know why you have a separate dir for the git repo. You can use the repo (and files in it) just like an ordinary dir. The only difference is the .git/ folder, which holds all the changes you made to the files in the repository. You don't have to copy files over and over between the two separate instances because it doesn't make any sense.  When you use the repository dir and make some changes to the files, just make sure everything works well (like you do now) and if it does, commit the changes via "git add", "git diff" and "git commit". And that's it.

Offline

#2659 2019-08-29 11:24:43

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

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

ragamatrix wrote:

Hi all,
ok I've made it !
then it will be easier to understand what I wanted to do ...  roll

It looks like a rotary phone.

morfik wrote:

Basically, I don't know why you have a separate dir for the git repo. You can use the repo (and files in it) just like an ordinary dir. The only difference is the .git/ folder, which holds all the changes you made to the files in the repository. You don't have to copy files over and over between the two separate instances because it doesn't make any sense.  When you use the repository dir and make some changes to the files, just make sure everything works well (like you do now) and if it does, commit the changes via "git add", "git diff" and "git commit". And that's it.

I know it doesn't make sense, but I'll do it like this for the moment until I learn git a bit more, so that I don't screw anything up.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#2660 2019-08-29 11:33:19

morfik
Member
From: Europe/Poland
Registered: 2016-09-08
Posts: 169
Website

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

Just backup the repo before editing -- it's a way easier. big_smile

Offline

Board footer

Powered by FluxBB