You are not logged in.
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
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.
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
^Scotch is not a problem...
Thank you for your work.
Can you please say something about it?
Last edited by unklar (2021-02-11 09:25:32)
Offline
Good call Kairitech.
The linesWINTERCAST 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 linesed -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
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
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
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
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
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
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
^Please also check if you are using the script from 2021-2-11.
Offline
Kastoria: https://www.accuweather.com/en/gr/kasto … ast/178682
Hutto: https://www.accuweather.com/en/us/hutto … st/2110192
Hutto instead of hutto-tx
Zyrardow: https://www.accuweather.com/en/pl/%C5%B … ast/264812
Some Polish characters there.
Debrecen: https://www.accuweather.com/en/hu/debre … ast/188406
You forgot to enter https instead of http.
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
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
I see... Now it works.
Last edited by morfik (2021-02-22 22:09:55)
Offline
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.
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
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
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
Thank you Teo ...
- I suppose in time I'll test-em all again
The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!
Offline