You are not logged in.

#3426 2020-05-01 21:05:24

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

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

Now that's interesting.
So, installing inkscape doesn't solve it at all.
Even after installing the python-scour package?


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

#3427 2020-05-02 06:45:55

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

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

^Because I was fed up yesterday, I did the same thing with the packages as I did here and switched off the box.

Now look at the launch from this morning:
J5dQWKAt.png


and, I swear, reboots yesterday, too.   monkey  big_smile  (S11, it's your conky1.9  lol wink )

Last edited by unklar (2020-05-02 06:50:15)

Offline

#3428 2020-05-02 12:18:38

ceeslans
Member
Registered: 2015-09-30
Posts: 57

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

unklar wrote:

^Because I was fed up yesterday, I did the same thing with the packages as I did here and switched off the box.

Now look at the launch from this morning:
https://i.imgur.com/J5dQWKAt.png

and, I swear, reboots yesterday, too.

noticed this was on another sid(uction) box.
out of curiosity: did you by any chance also try this on your lithium install - and reproduced the same amazing result?

Online

#3429 2020-05-02 13:04:11

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

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

@ceeslans,
yes, I wrote it down from here  wink

In Lithium(Buster) inkscape is still necessary.
Not in Sid(uction).


PS: ^Excuse me, I may have to clarify the procedure one more time  wink

- I became aware of this problem when IN SID updated inkscape version 0.92.4-3 to 1.0~rc1-4 3 days ago.
From this point on the images were missing in the weather_com_conky_script

- in Buster the 0.92.4-3 is still used

The joke is that with the new version of inkscape, sid no longer shows images. After purge and complete cleanup of the dependencies of the package inkscape, the next day it is ok.   big_smile

I suspect it has something to do with Python.

Last edited by unklar (2020-05-02 14:00:34)

Offline

#3430 2020-05-02 20:24:08

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

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

So, what someone needs in Sid to run the script is just imagemagick (and a thorough purge of the inkscape package).
Am I correct?
Is the python-scour package still needed?


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

#3431 2020-05-03 14:44:45

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

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

^^I can't give you a clear answer, because in siduction-lxde, which, as I already wrote regarding your weather.com script, was virgin, I still had to install the new inkscape first and then uninstall it again (with all dependencies). So stupid that sounds!  mad big_smile

and

apt policy scour python-scour python3-scour
scour:
  Installiert:           (keine)
  Installationskandidat: 0.37-4
  Versionstabelle:
     0.37-4 500
        500 http://deb.debian.org/debian unstable/main amd64 Packages
python-scour:
  Installiert:           (keine)
  Installationskandidat: (keine)
  Versionstabelle:
python3-scour:
  Installiert:           (keine)
  Installationskandidat: 0.37-4
  Versionstabelle:
     0.37-4 500
        500 http://deb.debian.org/debian unstable/main amd64 Packages

are no longer on board  wink

Teo, I made a request on the siduction forum. Maybe someone has an idea...

Offline

#3432 2020-05-03 15:38:21

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

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

That's at least funny and weird.
I think you should perform an exorcism on your system...


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

#3433 2020-05-04 13:40:16

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

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

Teo,
when you install inkscape, 24 packages are installed.

When uninstalling, 20 are removed. 4 packages remain in the system.
These are:

fig2dev
libnetpbm10
libwmf-bin
netpbm

All utilities/libraries/graphics tools for editing svg and png, among others. [aptitude show or apt show make it clear]

Version differences (Buster - Sid) exist only between
fig2dev and libwmf-bin.

Buster                            Sid
fig2dev    1:3.2.7a-5+deb10u3     1:3.2.7b-3

libwmf-bin 0.2.8.4-14             0.2.8.4-17

This exclusion procedure was shown to me in the siduction forum.  wink 

So it can be assumed that this is the solution to the riddle.   hmm

Now I finally have a beer...   lol  lol  tongue

Offline

#3434 2020-05-04 20:50:14

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

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

I don't have any of these packages, but congratulations unklar!
Ich gratuliere dir dazu!!!

Drink a couple for me please.

Well folks, if it works for you, it's OK then.
Is this the final verdict then?
Is the problem solved by installing these

fig2dev
libnetpbm10
libwmf-bin
netpbm

packages?


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

#3435 2020-05-04 21:59:36

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

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

Well, the plot thickens, the mystery is in a deeper fog and confusion reigns inside . . .

Twilight Zones episode of; Welcome to the world of Debian 10.

inkscape is installed . . . .  these files should be there, fig2dev, libnetpbm10, libwmf-bin,
netpbm and Teo's scripts work just fine.

EXCEPT:

 04 May 20 @ 18:46:50 ~
   $ sho fig2dev libnetpbm10 libwmf-bin netpbm
alias = aptitude show filename
Package: fig2dev                  
State: not installed

Package: libnetpbm10
State: not installed

Package: libwmf-bin
State: not installed

Package: netpbm
State: not installed

. . .  none are installed.

Stay tuned for Episode II after dinner


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3436 2020-05-04 23:29:24

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

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

Twilight Zone's Episode II of; Welcome to the world of Debian 10.

Teo's scripts - no errors with inkascape...

remove inkscape....

alias aremv='sudo apt-get autoremove --purge'
   $ aremv inkscape
[sudo] password for sector11: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  inkscape* libgsl23* libgslcblas0* libgtkspell0* libmagick++-6.q16-8* libpotrace0*
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 84.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 131100 files and directories currently installed.)
Removing inkscape (0.92.4-3) ...
Removing libgsl23:amd64 (2.5+dfsg-6) ...
Removing libgslcblas0:amd64 (2.5+dfsg-6) ...
Removing libgtkspell0:amd64 (2.0.16-1.2) ...
Removing libmagick++-6.q16-8:amd64 (8:6.9.10.23+dfsg-2.1) ...
Removing libpotrace0:amd64 (1.15-1) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23-4) ...
(Reading database ... 130171 files and directories currently installed.)
Purging configuration files for inkscape (0.92.4-3) ...

Rerun conkys:

convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2766.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4301.
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2766.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4301.
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2766.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4301.
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2766.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4301.
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagickColorCompliance/2766.
convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4301.
convert-im6.q16: unrecognized color `var(--color-icy)' @ warning/color.c/QueryMagic

so ...

   $ get libgsl23
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgslcblas0
Suggested packages:
  gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info | gsl-ref-html
The following NEW packages will be installed:
  libgsl23 libgslcblas0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

rerun conkys ....
Conky errors
removed and purged: libgsl23 libgslcblas0

   $ get libmagick++-6.q16-8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libmagick++-6.q16-8
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 275 kB of archives.
After this operation, 793 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian buster/main amd64 libmagick++-6.q16-8 amd64 8:6.9.10.23+dfsg-2.1 [275 kB]
Fetched 275 kB in 0s (1,543 kB/s)       
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package libmagick++-6.q16-8:amd64.
(Reading database ... 130172 files and directories currently installed.)
Preparing to unpack .../libmagick++-6.q16-8_8%3a6.9.10.23+dfsg-2.1_amd64.deb ...
Unpacking libmagick++-6.q16-8:amd64 (8:6.9.10.23+dfsg-2.1) ...
Setting up libmagick++-6.q16-8:amd64 (8:6.9.10.23+dfsg-2.1) ...
Processing triggers for libc-bin (2.28-10) ...
 
 04 May 20 @ 20:18:36 ~
   $ 

rerun conkys ....
Conky errors
removed & purged: libmagick++-6.q16-8

Installed: libpotrace0
rerun conkys ....
Conky errors
removed & purged: libpotrace0

lets work on the 4 files unklar talked about:

do it the fast way:

get fig2dev libnetpbm10 libwmf-bin netpbm

installed ....
Installed: fig2dev libnetpbm10 libwmf-bin netpbm
rerun conkys ....
Conky errors
removed & purged: fig2dev libnetpbm10 libwmf-bin netpbm

reinstalled inkscape ....

restrarted conkys

errors gone!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3437 2020-05-04 23:31:36

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

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

NOTE TO ABOVE:

I do not install "Recommended or Suggested" packages:

   $ get inkscape
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgsl23 libgslcblas0 libgtkspell0 libmagick++-6.q16-8
Suggested packages:
  dia inkscape-tutorials libsvg-perl libxml-xql-perl pstoedit python-uniconvertor gsl-ref-psdoc
  | gsl-doc-pdf | gsl-doc-info | gsl-ref-html
Recommended packages:
  aspell fig2dev libimage-magick-perl libwmf-bin python-lxml python-scour
The following NEW packages will be installed:
  inkscape libgsl23 libgslcblas0 libgtkspell0 libmagick++-6.q16-8

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3438 2020-05-05 09:18:46

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

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

Thanks for your tests, my friend. smile

It's really confusing.
I tested with BL-Lithium and siduction. I did not install recommended packages either. But before I asked in the siduction forum, my first trail was this ---> WARNING:

unklar@lithium:~$ aptitude show scour
Paket: scour                                 
Version: 0.37-2
Zustand: Installiert
Automatisch installiert: ja
...
...
Beschreibung: SVG scrubber and optimizer (CLI and debhelper)
 Scour is a Python module that aggressively cleans SVG files, removing a lot of unnecessary
 information that certain tools or authors embed into their documents.  The goal of scour is to
 provide an identically rendered image (i.e. a scoured document should have no discernible visible
 differences from the original file) while minimizing the file size. 
 
 WARNING: Scour is intended to be run on files that have been edited in Vector Graphics editors such
 as Inkscape or Adobe Illustrator.  Scour attempts to optimize the file, and as result, it will
 change the file's structure and (possibly) its semantics.  If you have hand-edited your SVG files,
 you will probably not be happy with the output of Scour. 
 
 This package provides the "scour" command line utility and a dh_scour debhelper extension which
 optimizes all shipped SVGs during package build. If gir1.2-rsvg-2.0 and python3-gi-cairo are
 available, it will also do a before/after comparison and discard the optimized image if they differ
 by more than 0.05%.
Homepage: https://github.com/codedread/scour

because in BL, unlike sid(ction), both are "innately"(?)
are installed.
CjW0ZYXt.png

unklar@lithium:~$ apt policy gir1.2-rsvg-2.0 python3-gi-cairo
gir1.2-rsvg-2.0:
  Installiert:           2.44.10-2.1
  Installationskandidat: 2.44.10-2.1
  Versionstabelle:
 *** 2.44.10-2.1 500
        500 https://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
python3-gi-cairo:
  Installiert:           3.30.4-1
  Installationskandidat: 3.30.4-1
  Versionstabelle:
 *** 3.30.4-1 500
        500 https://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status

in sid(uction) there is the AND not, because here only python3-gi-cairo is installed.

It drove me crazy "before" and "after". kXO9BEvt.png 75aqZAat.png  As I already wrote, the text to the pictures is "there".  devil

I think the Debian10, BL-Lithium, -Buster users still have time to act until the inkscape package 1.0~rc1-4 comes up.  big_smile

Last edited by unklar (2020-05-05 09:20:38)

Offline

#3439 2020-05-05 16:08:37

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

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

The friends in the siduction forum just made me aware of an article about the new inkscape version 1.

Pro-Linux.de wrote:

The change of the extension interface to Python 3 causes some externally developed extensions to stop working. Details can be found in the release notes.

Pro-Linux


This makes the "mess" with inkscape obvious.   wink

Offline

#3440 2020-05-05 23:50:51

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

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

Well, lets hope by the time I move away from Debian 10 - the dust will have settled.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3441 2020-05-06 19:38:21

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

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

Thank you guys for the feedback.
It seems that it is a transitional time for inkscape in Debian, we should wait and 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

#3442 2020-05-06 21:18:12

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

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

Now I feel at home ...

Most of my working life I heard:

Hurry up and wait.   big_smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#3443 2020-05-07 11:58:10

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

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

I'm happy, as long as the script works.
I'd like it to work out of the box though, like in Arch...


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

#3444 2020-05-22 16:22:32

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

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

It looks like, the accuweather hourly script stopped working correctly. smile

Offline

#3445 2020-05-23 07:31:27

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

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

Teo,
the call "git pull" leads to these hints:

warning: Pulling without specifying how to reconcile divergent branches is
discouraged. You can squelch this message by running one of the following
commands sometime before your next pull:

  git config pull.rebase false  # merge (the default strategy)
  git config pull.rebase true   # rebase
  git config pull.ff only       # fast-forward only

You can replace "git config" with "git config --global" to set a default
preference for all repositories. You can also pass --rebase, --no-rebase,
or --ff-only on the command line to override the configured default per
invocation.

Bereits aktuell.

The hour errors reported by @morfik I can confirm.  hmm


PS: I did the first one.   wink

  git config pull.rebase false

Last edited by unklar (2020-05-23 07:38:30)

Offline

#3446 2020-05-23 17:54:35

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

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

I'll see to it guys as soon as I can.


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

#3447 2020-05-23 22:10:11

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

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

Could anyone test it please?

#!/usr/bin/env bash

#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -b"


#####################################
# Put your Accuweather address here #
#####################################
#address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
#address="https://www.accuweather.com/en/us/hutto-tx/78634/weather-forecast/2110192"
address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="https://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"


#Pause weather conky
pkill -STOP -xf "$weather_conky_launch_command"

#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
		   echo -
		 ;;
        esac
}


############################
# Check the user arguments #
############################

if (( $# < 1 || $# > 15 )); then
	echo "Invalid arguments!"
	exit
fi

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0
h_24hours=1
h_real=1
h_wind=1
h_rain=1
h_snow=1
h_ice=1
h_uv=1
h_cloud=1
h_humid=1
h_dew=1
h_visib=1

for i in $*
	do
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 && $i != -h_12h && $i != -h_no_real && $i != -h_no_wind && $i != -h_no_rain && $i != -h_no_snow && $i != -h_no_ice && $i != -h_no_uv && $i != -h_no_cloud && $i != -h_no_humid && $i != -h_no_dew && $i != -h_no_visib ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
			-h_12h)
				h_24hours=0
			;;
			-h_no_real)
				h_real=0
			;;
			-h_no_wind)
				h_wind=0
			;;
			-h_no_rain)
				h_rain=0
			;;
			-h_no_snow)
				h_snow=0
			;;
			-h_no_ice)
				h_ice=0
			;;
			-h_no_uv)
				h_uv=0
			;;
			-h_no_cloud)
				h_cloud=0
			;;
			-h_no_humid)
				h_humid=0
			;;
			-h_no_dew)
				h_dew=0
			;;
			-h_no_visib)
				h_visib=0
			;;
		esac
	done

if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


last_number=$(echo $address|sed 's/^.*\///')


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then

	#function: convert_time
	convert_time ()
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == "" ]]; then
			echo $1
			return 0
		elif [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		echo $time_24
	}

	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo -
	         ;;
	         S)
	           echo 1
	         ;;
	         SSW)
	           echo 2
	         ;;
	         SW)
	           echo 3
	         ;;
	         WSW)
	           echo 4
	         ;;
	         W)
	           echo 5
	         ;;
	         WNW)
	           echo 6
	         ;;
	         NW)
	           echo 7
	         ;;
	         NNW)
	           echo 8
	         ;;
	         N)
	           echo 9
	         ;;
	         NNE)
	           echo :
	         ;;
	         NE)
	           echo ;
	         ;;
	         ENE)
	           echo \<
	         ;;
	         E)
	           echo =
	         ;;
	         ESE)
	           echo \>
	         ;;
	         SE)
	           echo ?
	         ;;
	         SSE)
	           echo @
	         ;;
	    esac
	}

	curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o $HOME/Accuweather_conky_script/curr_cond_raw "$curr_addr"

	daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o $HOME/Accuweather_conky_script/daily_forecast "$daily_addr"

	if [[ $forecast2015 == 1 ]]; then
		rm $HOME/Accuweather_conky_script/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm $HOME/Accuweather_conky_script/forecast_2016/forecast_*.png
	fi

	#current conditions
	if [[ -s $HOME/Accuweather_conky_script/curr_cond_raw ]]; then
		sed '/conditions-card card panel conditions/,/class="card-button "/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp
		sed -i -e '/\.svg"\|&#xB0\|phrase\|: /!d' -e '/style="transform: /d' $HOME/Accuweather_conky_script/curr_cond_temp
		sed -i -e 's/^.*weathericons\///' -e 's/\.svg.*$//' -e 's/&#xB0.*$//g' -e 's/^[ ,\t]*//g' -e 's/^.*phrase">//' -e 's/<\/div>//' -e 's/: /\n/g' $HOME/Accuweather_conky_script/curr_cond_temp
		sed -i -e '20s/\(.*\) /\1\n/' -e 's/ at /\n/g' $HOME/Accuweather_conky_script/curr_cond_temp
		sed -n 1,3p $HOME/Accuweather_conky_script/curr_cond_temp > $HOME/Accuweather_conky_script/curr_cond
		sed -n 5p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 9,10p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 14p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 18p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 7p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 20p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 16p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 22p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond

		moonrise=1
		moonset=1	
		sed '/<div class="panel-1"><div class="sunrise">/,/<div class="temp-history">/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp
		if (( $(grep '"section-header">Moonrise' /$HOME/Accuweather_conky_script/curr_cond_temp|wc -l) == 0 )); then
			moonrise=0
		fi
		if (( $(grep '"section-header">Moonset' /$HOME/Accuweather_conky_script/curr_cond_temp|wc -l) == 0 )); then
			moonset=0
		fi
		sed -i '/:[0-9][0-9]/!d' $HOME/Accuweather_conky_script/curr_cond_temp
		sed -i -e 's/^.*content">//g' -e 's/^[ ,\t]*//g' -e 's/<\/span>//g' -e 's/ hr//g' $HOME/Accuweather_conky_script/curr_cond_temp
		if (( $moonrise == 0 )); then
			sed -i '3s/$/\n-/' $HOME/Accuweather_conky_script/curr_cond_temp
			sed -i '5s/$/\n-/' $HOME/Accuweather_conky_script/curr_cond_temp
		fi
		if (( $moonset == 0 )); then
			sed -i '4s/$/\n-/' $HOME/Accuweather_conky_script/curr_cond_temp
			sed -i '5s/$/\n-/' $HOME/Accuweather_conky_script/curr_cond_temp
		fi
		sed -n 1,3p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> $HOME/Accuweather_conky_script/curr_cond
		sed -n 4,6p $HOME/Accuweather_conky_script/curr_cond_temp >> $HOME/Accuweather_conky_script/curr_cond
		echo 'EMPTY LINE FOR COMPATIBILITY WITH THE OLD CONKYRC FILES' >> $HOME/Accuweather_conky_script/curr_cond
		rm $HOME/Accuweather_conky_script/curr_cond_temp

	    image=$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond)
	    echo $(test_image $image) >> $HOME/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 14p $HOME/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 15p $HOME/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 18p $HOME/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
		sunrise_time=$(sed -n 19p $HOME/Accuweather_conky_script/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/curr_cond
		wind=$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond)
		echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/curr_cond
        if (( $(sed -n 14p /$HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' $HOME/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 15p /$HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' $HOME/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 18p /$HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' $HOME/Accuweather_conky_script/curr_cond
		fi
		if (( $(sed -n 19p /$HOME/Accuweather_conky_script/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' $HOME/Accuweather_conky_script/curr_cond
		fi
	    if [[ $forecast2015 == 1 ]]; then
			cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2015/forecast_0.png
			cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2015/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 1p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2016/forecast_0.png
			cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 5p $HOME/Accuweather_conky_script/curr_cond).png $HOME/Accuweather_conky_script/forecast_2016/wind_0.png
		fi
	fi

	#Daily forecast
	if [[ -s $HOME/Accuweather_conky_script/daily_forecast ]]; then
		sed -i '/forecast-list-card forecast-card  today/,/card-button centered nav-card next/!d' $HOME/Accuweather_conky_script/daily_forecast
		sed -i -e 's/^.*weathericons\///g' -e 's/\.svg.*$//g' -e 's/^.*high"> //g' -e 's/^.*low"> \/ //g' -e 's/&#xB0;.*$//g' -e 's/^.*<p>//g' -e 's/<\/p>.*$//g' -e '/<\|>\|class\|href/d' -e 's/^ \|\t*//g' -e '/^$/d' -e '/Precip/d' -e 's/Sun$/Sunday/g' -e 's/Mon$/Monday/g' -e 's/Tue$/Tuesday/g' -e 's/Wed$/Wednesday/g' -e 's/Thu$/Thursday/g' -e 's/Fri$/Friday/g' -e 's/Sat$/Saturday/g' $HOME/Accuweather_conky_script/daily_forecast
		sed -i '106,$d' $HOME/Accuweather_conky_script/daily_forecast 
		for (( i=3; i<=101; i+=7 ))
		  do
	          image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/daily_forecast)
	          echo $(test_image $image) >> $HOME/Accuweather_conky_script/daily_forecast
		  done
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=3; i<=101; i+=7 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
fi


#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################

if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: 24h

	if [[ $hourly2015 == 1 ]]; then
		rm $HOME/Accuweather_conky_script/hourly_2015/hourly_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/Accuweather_conky_script/hourly_2016/hourly_*.png
	fi

	hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
	hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o $HOME/Accuweather_conky_script/hourly_raw1 "$hourly_addr1"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0' -H 'Accept-Language: en-US,en;q=0.5' --compressed -o $HOME/Accuweather_conky_script/hourly_raw2 "$hourly_addr2"

	if [[ -s $HOME/Accuweather_conky_script/hourly_raw1 && -s $HOME/Accuweather_conky_script/hourly_raw2 ]]; then
		sed -i '/<div class=\"hourly-wrapper\">/,/day=/!d' $HOME/Accuweather_conky_script/hourly_raw1
		sed -i -e 's/\.svg.*$//g' -e 's/^.*weathericons\///g' -e '/div\|=/d' -e 's/<p>/<p>\n/g' -e 's/<\/p>/\n<\/p>/g' $HOME/Accuweather_conky_script/hourly_raw1
		sed -i -e '/<\|>/d' -e '/^[ ,\t]*$/d' -e 's/^[ ,\t]*//g' -e 's/&#xB0;//g' -e 's/ km\/h//g' -e 's/ mph//g' -e 's/ (/\n/g' -e 's/)//g' $HOME/Accuweather_conky_script/hourly_raw1

		sed -i '/<div class=\"hourly-wrapper\">/,/day=/!d' $HOME/Accuweather_conky_script/hourly_raw2
		sed -i -e 's/\.svg.*$//g' -e 's/^.*weathericons\///g' -e '/div\|=/d' -e 's/<p>/<p>\n/g' -e 's/<\/p>/\n<\/p>/g' $HOME/Accuweather_conky_script/hourly_raw2
		sed -i -e '/<\|>/d' -e '/^[ ,\t]*$/d' -e 's/^[ ,\t]*//g' -e 's/&#xB0;//g' -e 's/ km\/h//g' -e 's/ mph//g' -e 's/ (/\n/g' -e 's/)//g' $HOME/Accuweather_conky_script/hourly_raw2
		cat $HOME/Accuweather_conky_script/hourly_raw1 $HOME/Accuweather_conky_script/hourly_raw2 > $HOME/Accuweather_conky_script/hourly
#Delete indoor humidity crap
		sed -i '/Indoor Humidity:/,+2d' $HOME/Accuweather_conky_script/hourly
#Done
		sed -i '769,$d' $HOME/Accuweather_conky_script/hourly

		for (( i=3; i<=768; i+=32 ))
		  do
	          image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/hourly)
	          echo $(test_image $image) >> $HOME/Accuweather_conky_script/hourly
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=3; i<=768; i+=32 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly).png $HOME/Accuweather_conky_script/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly).png $HOME/Accuweather_conky_script/hourly_2016/hourly_$j.png
				fi
		    	((j++))
			  done
		fi
	fi


	# Full info, next 24h - altogether24 file
	rm $HOME/Accuweather_conky_script/{altogether24,altogether24_2015,altogether24_2016}

	#TIME
	echo "\${color1}TIME\${goto 100}$(sed -n 1p $HOME/Accuweather_conky_script/hourly)" > $HOME/Accuweather_conky_script/altogether24
	jump_to=160
	for (( i=33; i<=384; i+=32 ))
		do
			time=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=385; i<=768; i+=32 ))
			do
				time=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	sed -i '1s/$/\n\n\n/' $HOME/Accuweather_conky_script/altogether24

	#FORECAST
	echo "\${color1}FORECAST\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=5; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=389; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $1}'|cut -c1-8)
				sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi
	sed -i '5s/$/\n/' $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=5; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=389; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly|awk '{print $2}'|cut -c1-8)
				sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#TEMPERATURE
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "TEMPER.\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=4; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=388; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#REAL FEEL
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "REAL FEEL\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=9; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=393; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#WIND
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "WIND\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=11; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=395; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#RAIN
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "RAIN\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=24; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=408; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#SNOW
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "SNOW\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=26; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=410; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#ICE
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "ICE\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=28; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=412; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#UV INDEX
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "UV INDEX\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=19; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=403; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#CLOUD COVER
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "CLOUD COV.\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=22; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=406; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#HUMIDITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "HUMIDITY\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=15; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=399; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#DEW POINT
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "DEW POINT\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=17; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=401; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#VISIBILITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/altogether24
	echo "VISIBILITY\${color}" >> $HOME/Accuweather_conky_script/altogether24
	jump_to=100
	for (( i=30; i<=384; i+=32 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
			sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=414; i<=768; i+=32 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)
				sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
	fi

	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp $HOME/Accuweather_conky_script/altogether24 $HOME/Accuweather_conky_script/altogether24_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp $HOME/Accuweather_conky_script/altogether24 $HOME/Accuweather_conky_script/altogether24_2016
		fi
		rm $HOME/Accuweather_conky_script/altogether24
		hours=$((12+$h_24hours*12))
		for (( i=1; i<=$hours; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/altogether24_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/altogether24_2016
				fi
				((jump_to+=60))
			done
	fi

	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/Accuweather_conky_script/altogether24
		jump_to=95
		for (( i=769; i<=780; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)/" $HOME/Accuweather_conky_script/altogether24
				((jump_to+=60))
			done
		if [[ $h_24hours == 1 ]]; then
			for (( i=781; i<=792; i+=1 ))
				do
					sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/hourly)/" $HOME/Accuweather_conky_script/altogether24
					((jump_to+=60))
				done
		fi
		sed -i '4s/$/\${font}/' $HOME/Accuweather_conky_script/altogether24
		sed -i '2,3d' $HOME/Accuweather_conky_script/altogether24
	fi

	#DELETE UNWANTED VARIABLES
	if [[ $h_real == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '7,8s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_wind == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_rain == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_snow == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi


	if [[ $h_ice == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi


	if [[ $h_uv == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_cloud == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_humid == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_dew == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	if [[ $h_visib == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/altogether24_2016
		fi
	fi

	sed -i '/VOID/d' $HOME/Accuweather_conky_script/{altogether24,altogether24_2015,altogether24_2016}

fi

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

Last edited by TeoBigusGeekus (2020-05-23 22:12:14)


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

#3448 2020-05-24 07:33:48

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

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

unklar wrote:

Teo,
the call "git pull" leads to these hints:

warning: Pulling without specifying how to reconcile divergent branches is
discouraged. You can squelch this message by running one of the following
commands sometime before your next pull:

  git config pull.rebase false  # merge (the default strategy)
  git config pull.rebase true   # rebase
  git config pull.ff only       # fast-forward only

You can replace "git config" with "git config --global" to set a default
preference for all repositories. You can also pass --rebase, --no-rebase,
or --ff-only on the command line to override the configured default per
invocation.

Bereits aktuell.

The hour errors reported by @morfik I can confirm.  hmm


PS: I did the first one.   wink

  git config pull.rebase false

You must have created/pulled a branch sometime in the past.


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

#3449 2020-05-24 07:41:12

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

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

TeoBigusGeekus wrote:

Could anyone test it please?

Teo,
clean work! cool All three

-...hourly_2015
-...hourly_2016
-...hourly_weatherfont

work without errors. As always, big thanks to you!  smile

TeoBigusGeekus wrote:

You must have created/pulled a branch sometime in the past.

It's okay now. No more warnings.   wink

Last edited by unklar (2020-05-24 07:44:18)

Offline

#3450 2020-05-24 08:13:38

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

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

Good to know unklar, thanks for the feedback.


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

Board footer

Powered by FluxBB