SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#251 2012-05-29 00:05:09

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,427
Website

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

TeoBigusGeekus wrote:
Sector11 wrote:

Care for a cuppa java while we wait?  How do you like it?

Sure thing, but make it tea for me.

Good enough ... ready in 3 minutes...

Offline

Help fund CrunchBang, donate to the project!

#252 2012-05-29 13:23:50

slavssn
#! Member
Registered: 2012-03-28
Posts: 61

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Hello, folks. I need help with my simple conky weather and I don't think it's worth creating a separate thread, so I'd like to ask you here, if I may. When I use this line:

${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPPO cloud_cover}

it tells me what I want except, I'd like to have the output in Polish. So, I wonder if it's possible to write a script which would gather that information, change the words and then put it on the screen? It seems simple to me, considering monster scripts you guys are cooking here but hey, I know nothing about it so, I can only guess.

Offline

#253 2012-05-29 14:18:48

mainstream
Member
Registered: 2012-05-19
Posts: 21

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

slavssn wrote:

Hello, folks. I need help with my simple conky weather and I don't think it's worth creating a separate thread, so I'd like to ask you here, if I may. When I use this line:

${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPPO cloud_cover}

it tells me what I want except, I'd like to have the output in Polish. So, I wonder if it's possible to write a script which would gather that information, change the words and then put it on the screen? It seems simple to me, considering monster scripts you guys are cooking here but hey, I know nothing about it so, I can only guess.

This can be done with sed string replacement, if i'm correct.
There's enough literature about it. Here is an example:

$ sed -i 's/ugly/beautiful/g' /home/file

For more help, i leave it up to "the big guy", as he has more knowledge and understanding of programming.

Offline

#254 2012-05-29 14:49:34

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

slavssn wrote:

Hello, folks. I need help with my simple conky weather and I don't think it's worth creating a separate thread, so I'd like to ask you here, if I may. When I use this line:

${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPPO cloud_cover}

it tells me what I want except, I'd like to have the output in Polish. So, I wonder if it's possible to write a script which would gather that information, change the words and then put it on the screen? It seems simple to me, considering monster scripts you guys are cooking here but hey, I know nothing about it so, I can only guess.

Weather is a conky command; therefore, it can't, as far as I know, get mixed with a bash one, ie. you can't do something like

${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPPO cloud_cover |sed 's/Good Weather/Goodsky Weathersky'}

You could just use one of the scripts - if there is one you'd like translated into polish, let me know.


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

#255 2012-05-29 16:01:39

slavssn
#! Member
Registered: 2012-03-28
Posts: 61

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

To be honest, all I want to add to my conky is, translated information about current conditions (e.g. clear, partly cloudy: bezchmurnie, częściowe zachmurzenie - hope it didn't brake your tongue) along with a small icon, just like this one:

vZHp5aQ

If I were to choose one of the scripts to translate, I'd pick 1a) and then strip it down to my liking.

Last edited by slavssn (2012-05-29 16:02:49)

Offline

#256 2012-05-29 16:53:52

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 2,745

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

slavssn wrote:

To be honest, all I want to add to my conky is, translated information about current conditions (e.g. clear, partly cloudy: bezchmurnie, częściowe zachmurzenie - hope it didn't brake your tongue) along with a small icon, just like this one:

vZHp5aQ

If I were to choose one of the scripts to translate, I'd pick 1a) and then strip it down to my liking.

weather translation isnt as easy as you might think!
... due to the wide range of conditions that the weather sites can spit out
my lua script, v9000, has a translation feature ... and i know one person has been using it for german translations of weather
the translations are maintained by the user

Offline

#257 2012-05-29 20:33:33

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

The C versions of the 1a modified and 4 scripts are now bundled with the dropbox tarball on the first page.

Open the source file, replace the weather.com/accuweather address with yours, replace the paths with the ones of your liking and save.
Compile with

gcc whatever.c -o whatever -lcurl

Use it in conky exactly as you'd use the bash versions, only the call to the program should be something like

${texeci 600 /home/teo/accuweather_conky_modified/accuw_modified_c_version}

NOTE 0: Depends on libcurl-dev (libcurl4-gnutls-dev?)

NOTE 1: The code doesn't check if the downloads succeeded. If not, the program will segfault; don't worry about it.

NOTE 2: @mainstream
To get any system variable with C, you use the getenv() function from stdlib.h header.
To get the home folder, you'd use something like

char *home=getenv("HOME");
printf("%s\n",home);

If you then want to create folder path strings, you'd have to create new strings, strcpy to them the home string and then strcat to them the rest of the path.
Sorry, but I couldn't be arsed to do it...

NOTE 3: The differences in times (especially with the weather.com script) were amazing. Apart from the user and sys times, even the real time was affected in a considerable way.
Aq70D.jpg

Last edited by TeoBigusGeekus (2012-10-02 10:27:25)


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

#258 2012-05-29 20:33:43

slavssn
#! Member
Registered: 2012-03-28
Posts: 61

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Fine then, I managed to edit the 1a config file in such a way I don't really need translating. Loving it just the way it is. smile

tZTA1MQ

Offline

#259 2012-05-29 22:09:52

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,427
Website

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

OH YEA!!!!  It's play time!

1a I have a taste of, but will have another go, right after I play with (4) I want to see the speed that sucker flies at.

This is for Teo:

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

#260 2012-05-29 22:18:06

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Sector11 wrote:

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!

I'll drink to that!


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

#261 2012-05-29 22:34:15

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,427
Website

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

TeoBigusGeekus wrote:
Sector11 wrote:

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!

I'll drink to that!

I thought you might.

Offline

#262 2012-05-31 18:11:45

flops83
New Member
Registered: 2012-05-31
Posts: 2

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Hello!

I've got this error when trying to compile:

$ gcc accu.c -o accu -lcurl
accu.c:1:23: fatal error: curl/curl.h: No such file or directory
compilation terminated

I've got curl installed:

$ curl -V
curl 7.24.0 (i386-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1

Any help?

Thanks.

Offline

#263 2012-05-31 18:25:45

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Try installing libcurl4-gnutls-dev.


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

#264 2012-05-31 22:16:50

flops83
New Member
Registered: 2012-05-31
Posts: 2

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

It worked! Thank you very much big_smile

Offline

#265 2012-06-01 08:15:37

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

You're welcome mate.


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

#266 2012-06-02 16:56:39

mainstream
Member
Registered: 2012-05-19
Posts: 21

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Hello Teo,

Im getting a segmantation fault and problem with gnome-keyring, whenever i try to run the weather script.
I tried it without wheather - and that seems to be working.

When i use weather again, i get:

mainstream@dopamine-pc:~/Desktop$ conky -c ~/accuweather_conky_modified/mainstream.conky
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-HgMAbn/pkcs11: No such file or directory
Conky: desktop window (c00023) is subwindow of root window (15a)
Conky: window type - normal
Conky: drawing to created window (0x2a00001)
Conky: drawing to double buffer
Segmentation fault (core dumped)

I'm running the Accuweather conky modified (1a) - C version.

Offline

#267 2012-06-02 17:35:20

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,427
Website

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

mainstream wrote:

Hello Teo,

Im getting a segmantation fault and problem with gnome-keyring, whenever i try to run the weather script.
I tried it without wheather - and that seems to be working.

Believe it or not it's a gnome-keyring thing and a bug report has gone in.

If I'm right the conky still rins though doesn't it.  I complained a while back but the conkys keep on coming!

Offline

#268 2012-06-02 17:51:56

TransitMan
New Member
Registered: 2012-05-03
Posts: 4

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

You guru's issued a warning about upgrading the package conky-all from 1.8.0 to 1.8.6 due to some conflict with the scripts. I have now noticed the new package for conky-all is 1.9.0. Is it OK to upgrade to this or should I stay at 1.8.0?

Offline

#269 2012-06-02 18:26:40

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,427
Website

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

TransitMan wrote:

You guru's issued a warning about upgrading the package conky-all from 1.8.0 to 1.8.6 due to some conflict with the scripts. I have now noticed the new package for conky-all is 1.9.0. Is it OK to upgrade to this or should I stay at 1.8.0?

Actually I tested them all from 1.8.0 to 1.8.1-6  --> 1.8.1-5 was OK but it looks as if 1.9.0 is going to be the sweetheart version that 1.8.0 was.

I'm using conky-all v1.9.0-2 found in Debian Testing/SID - not even so much as a hiccup.

  15:25:53 ~
         $ conky -v
Conky 1.9.0 compiled Fri May 11 15:54:00 UTC 2012 for Linux 2.6.32-5-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

  15:26:05 ~
         $ 

GO FOR IT!!!!! - I have backups if you need them.

Last edited by Sector11 (2012-06-02 18:32:34)

Offline

#270 2012-06-02 18:36:42

TeoBigusGeekus
#! Junkie
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 448

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Using 1.9.0; everything's OK.

As for the gnome-keyring bug, I hope it's corrected in an upcoming update - no problems whatsoever here 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

#271 2012-06-02 18:42:16

42dorian
Banned
Registered: 2012-04-29
Posts: 42

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Sector11 wrote:
TransitMan wrote:

You guru's issued a warning about upgrading the package conky-all from 1.8.0 to 1.8.6 due to some conflict with the scripts. I have now noticed the new package for conky-all is 1.9.0. Is it OK to upgrade to this or should I stay at 1.8.0?

Actually I tested them all from 1.8.0 to 1.8.1-6  --> 1.8.1-5 was OK but it looks as if 1.9.0 is going to be the sweetheart version that 1.8.0 was.

I'm using conky-all v1.9.0-2 found in Debian Testing/SID - not even so much as a hiccup.

  15:25:53 ~
         $ conky -v
Conky 1.9.0 compiled Fri May 11 15:54:00 UTC 2012 for Linux 2.6.32-5-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

  15:26:05 ~
         $ 

GO FOR IT!!!!! - I have backups if you need them.

I second this, and can recommend that anyone using the Ubuntu PPA method just typing in a terminal:

sudo add-apt-repository ppa:vincent-c/conky
sudo apt-get update

And then nab the new version, 1.9.0-2, from Update Manager when it perks up on ya.  1.9.0-2, so far, is just 1.8.0 with regards to its behaviour, but updated to include bug fixes for all the little stumbles they took along the way *COUGH*1.8.1-6*COUGH* ...Excuse me... Air conditioning is makin' ma throat dry wink

I would say it IS worth going to.  If for no other reason than it seems like one of the stable places to stand on the development path Conky is on these days.  Missteps like 1.8.1-6 can be frustrating.  And it doesn't help that the Ubuntu 12.04 family comes shipped with 1.8.1-6 without a means to directly upgrade or downgrade right away.


TBG's Conky Weather Method

STOP THE MACIFICATION OF LINUX!

Offline

#272 2012-06-02 20:50:29

TransitMan
New Member
Registered: 2012-05-03
Posts: 4

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Fortunately I am using LMDE and following the Testing/Sid branches.

I shall upgrade and hope it doesn't go "BOOM".

Thanks to all of you for the answer.

Offline

#273 2012-06-04 22:24:24

theporter2000
Member
Registered: 2012-05-30
Posts: 21

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

how I unpack and configure the companion


theporter2000
TTFN Bye

Offline

#274 2012-06-04 23:25:55

theporter2000
Member
Registered: 2012-05-30
Posts: 21

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

how do I get the images  I've got your scripts


theporter2000
TTFN Bye

Offline

Be excellent to each other!

#275 2012-06-05 00:02:57

Shockwave8A
New Member
Registered: 2012-06-04
Posts: 1

Re: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

Hey Big Teo,
It looks like Weather.com just wasn't happy with their latest change and messed around again.  The Today-Tonight section is only showing the moon graphic, Temp: F (no actual temp) and that's it.

Love your scripts.  I have XPlanet running in the background with this overlayed.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo