You are not logged in.

#3976 2021-02-10 23:13:12

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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

ANNOUNCEMENT:
Wintercast bug corrected on Accuweather Script, thanks to all who reported it promptly.
We'll see if we'll have to deal with a Spring/Summer/Autumncast in the future...

Last edited by TeoBigusGeekus (2021-02-19 08:12:20)


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

#3977 2021-02-10 23:15:18

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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

unklar wrote:

Be glad that it is not (yet) as cold as it is here.
We had -16.9°C this morning and it's supposed to stay that way for another week.   big_smile

That calls for some scotch and a fireplace.


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

#3978 2021-02-11 09:20:41

unklar
Member
Registered: 2015-10-31
Posts: 1,362

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

^Scotch is not a problem...  devil

Thank you for your work.
Can you please say something about it? big_smile

Last edited by unklar (2021-02-11 09:25:32)

Offline

#3979 2021-02-21 00:40:04

KairiTech
New Member
Registered: 2021-02-08
Posts: 4

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

TeoBigusGeekus wrote:

Good call Kairitech.
The lines

WINTERCAST
See detailed snow and ice outlook

are creating the havoc, so I guess you guys have to leave your miserable, cold countries and emigrate to Greece.
Alternatively, add this line

sed -i '/WinterCast/,+1 d' $HOME/Accuweather_conky_script/daily_forecast

after line 415 of the script (just before the for loop)...

Thanks again Teo.  You seem very adept at sed and there's one thing I have never been able to figure out.

How do you use sed to replace a single line with multiple lines?  Is that even possible with sed?

Offline

#3980 2021-02-21 06:04:35

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

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

KairiTech wrote:

How do you use sed to replace a single line with multiple lines?  Is that even possible with sed?

Yes, totally.
The first result from this search:

sed -i.bak $'s/You are good/You are bad\\\nYou are the worst/g' /output.txt

Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#3981 2021-02-21 13:16:56

seatommyboy
Member
Registered: 2016-09-12
Posts: 40

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

Accuweather script is not pulling daily forecast or images, only current conditions. When I run the script:

MainFrame Accuweather_conky_script $ ./accuweather -f2016
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
rm: cannot remove '/home/thomas/Accuweather_conky_script/forecast_2016/forecast_*.png': No such file or directory

Offline

#3982 2021-02-21 22:05:37

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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

All's well here with Accuweather.
Could you please give me your location seatommyboy?

@KairiTech
Thanks for your kind words.
To replace a whole line you can either do what ohnonot wrote or use the c command
File test:

Once upon a
hasta la vista baby
while I pondered 
weak and weary
sed -i '/hasta/cmidnight dreary' ./test

It will replace the whole 2nd line with 'midnight dreary'.


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

#3983 2021-02-22 08:25:19

ghorvath
Member
Registered: 2015-10-01
Posts: 146

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

I have the same problem as seatommyboy.

Tried with the following two locations:

#address="http://www.accuweather.com/en/hu/budapest/187423/weather-forecast/187423"
address="http://www.accuweather.com/en/hu/debrecen/188406/weather-forecast/188406"

Offline

#3984 2021-02-22 09:15:49

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

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

The same for me (no images):

address="https://www.accuweather.com/en/pl/zyrardow/264812/weather-forecast/264812"
$ ./accuweather -f2015
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
rm: cannot remove '/home/morfik/.conky/Accuweather_conky_script/forecast_2015/forecast_*.png': No such file or directory

Offline

#3985 2021-02-22 12:52:48

seatommyboy
Member
Registered: 2016-09-12
Posts: 40

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

TeoBigusGeekus wrote:

All's well here with Accuweather.
Could you please give me your location seatommyboy?

address="https://www.accuweather.com/en/us/hutto-tx/78634/weather-forecast/2110192"

However, I when I checked my location via accuweather in my web browser and searching with my zip code for loacation, the url it returned was

https://www.accuweather.com/en/us/hutto/78634/weather-forecast/2110192

So I pasted that in the script and now all is fine. If memory serves me correctly, periodically, I have had to change the location before, hutto vs hutto-tx. Hope this helps others, and thanks for all the hard work Teo!

Last edited by seatommyboy (2021-02-22 13:02:11)

Offline

#3986 2021-02-22 15:38:51

unklar
Member
Registered: 2015-10-31
Posts: 1,362

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

^Please also check if you are using the script from 2021-2-11.   wink

Offline

#3987 2021-02-22 20:31:28

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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


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

#3988 2021-02-22 20:33:36

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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

ANNOUNCEMENT
If you're having no/weird output from the Accuweather script, double check your weather address - you know, the one you give to the address variable at the beginning of the script.


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

#3989 2021-02-22 22:09:41

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

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

I see... big_smile Now it works.

Last edited by morfik (2021-02-22 22:09:55)

Offline

#3990 2021-02-23 23:00:20

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,491

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

WARNING:  CONKY V1.9

Been a while ... this virus is getting into the weather sites, that's why Teo has been having to fix things so often.

So not having weather for a long time I decided on something simple: Accu-RSS weather and modified this script that I did a few weeks ago.

The first three were done after created - changing wallpaper, but not updating.
2021-02-23-185753-S11.jpg
The one on the right has the "call line" added again and restarted to see what is current.

# pkill -xf "conky -c /home/sector11/.conkyrc" &

# Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent no # for ARGB
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title Default Conky
own_window_argb_visual yes
own_window_argb_value 100

minimum_size 195 0
maximum_width 195

gap_x 10  ## ← →
gap_y 15  ## ↑ ↓

alignment tl

# End Window Settings
# Font Settings

use_xft yes
xftfont Fira Mono:medium:size=11

xftalpha 1
override_utf8_locale yes
uppercase no

# End Font Settings
# Colour Settings

draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 C0C0C0 #Silver
color1 778899 #LightSlateGray
color2 FAEBD7 #AntiqueWhite
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 CD5C5C #IndianRed


# End Colour Settings
# Borders Section

draw_borders no
stippled_borders 5
border_inner_margin 6
border_outer_margin 0
border_width 0
draw_graph_borders yes

# End Borders Section
# Miscellaneous Section

background yes
use_spacer none
no_buffers yes
short_units yes
imlib_cache_size 0
double_buffer yes

# End Miscellaneous Section

update_interval 1

#${alignc}The Wewather${execi 1800 bash $HOME/accuweather_rss/acc_RSS}

TEXT
${alignc}The Weather${execi 1800 bash $HOME/accuweather_rss/acc_RSS}
${goto 84}${font conkyweather:size=30}${color8}${execpi 600  sed -n '2p' $HOME/accuweather_rss/weather}${color}${font}
${goto 10}${execpi 600 sed -n '1p' $HOME/accuweather_rss/weather|cut -d ' ' -f2-|fold -s -w21}

${alignc}${swapbar 0,15} FORECAST ${swapbar 0,15}
${alignc}${swapbar 0,15} Today ${swapbar 0,15}
${alignc}${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2" "$6}'`}${color}
${alignc}H: ${execpi 600 sed -n '4p' $HOME/accuweather_rss/weather|cut -d ' ' -f 2}     \
L: ${execpi 600 sed -n '4p' $HOME/accuweather_rss/weather|cut -d ' ' -f 5}
${goto 84}${font conkyweather:size=30}${color8}${execpi 600  sed -n '5p' $HOME/accuweather_rss/weather}${color}${font}
${execpi 600 sed -n '4p' $HOME/accuweather_rss/weather|cut -d ' ' -f7-|fold -s -w21}
${alignc}${swapbar 0,120}
${alignc}${color5}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$3" "$2" "$6}'`}${color}
${alignc}H: ${execpi 600 sed -n '7p' $HOME/accuweather_rss/weather|cut -d ' ' -f 2}     \
L; ${execpi 600 sed -n '7p' $HOME/accuweather_rss/weather|cut -d ' ' -f 5}
${goto 84}${color5}${font conkyweather:size=30}${execpi 600  sed -n '8p' $HOME/accuweather_rss/weather}${color}${font}${color}
${execpi 600 sed -n '7p' $HOME/accuweather_rss/weather|cut -d ' ' -f7-|fold -s -w21}
${alignc}${swapbar 0,120}
${font fira mono:medium:size=14}${alignc}${color5}Moon Phases${color}${font}
${font Fira Mono:medium:size=11}${execpi 86400 remind -q -r ~/.reminders_moon_v | sed -e "/.*(today):/d" -e '/^$/d'}${font}
${alignc}${swapbar 0,120}
${alignc}${color5}Masks: 2020·03·20${color}
 ${pre_exec dateutils.ddiff 2020-03-20 'tomo' -f '%yy·%mm·%dd'}\
${alignr 5}${pre_exec dateutils.ddiff 2020-03-20 'tomo' -f '%d'}
${alignc}${swapbar 0,120}
${alignc}${color5}Go4 Pixel Party${color}
${alignc}${color5}2021·03·31${color}
 ${pre_exec dateutils.ddiff 'tomo' 2021-03-31 -f ' %yy·%mm·%dd'}\
${alignr 5}${pre_exec dateutils.ddiff 'tomo' 2021-03-31 -f ' %d'}${color}
${alignc}${color5}2nd Pixel Party${color}
${alignc}${color5}2022·03·31${color}
 ${pre_exec dateutils.ddiff 'tomo' 2022-03-31 -f ' %yy·%mm·%dd'}\
${alignr 5}${pre_exec dateutils.ddiff 'tomo' 2022-03-31 -f ' %d'}${color}
${alignc}${swapbar 0,120}

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3991 Yesterday 03:57:18

KairiTech
New Member
Registered: 2021-02-08
Posts: 4

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

ohnonot wrote:
KairiTech wrote:

How do you use sed to replace a single line with multiple lines?  Is that even possible with sed?

Yes, totally.
The first result from this search:

sed -i.bak $'s/You are good/You are bad\\\nYou are the worst/g' /output.txt

Thanks.  That is exactly what I needed.  I also discovered that I can change the delimiter to something eminently more readable:

sed -i.bak $'s|You are good|You are bad\\\nYou are the worst|g' /output.txt

Offline

#3992 Yesterday 11:15:34

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,466

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

Welcome back S11!


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

#3993 Yesterday 11:53:41

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,491

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

Thank you Teo ...
- I suppose in time I'll test-em all again  smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB