Posts: 4
dhomi
Joined: 11 May 2008
#1

Code: Select all

#!/bin/sh
# made by: www.dhomi.com
# go to accuweather.com and search for your city. Then copy the code and replace mine with yours
# add then the code to your .conkyrc

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=1\&locCode\="EUR|CS|YI003|PRISTINA" | perl -ne 'if (/Currently/){chomp;/\<title\>Currently: (.*)?\<\/title\>/; print"$1"; }'

[/code]
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#2
Thanks dhomi for the script and have fun with antiX, if you are using it.
Posts: 4
dhomi
Joined: 11 May 2008
#3
I use it on my laptop Toshiba Satellite Pro 4600 and its quick and good. It recognized all the hardware. The only thing is sound, which I could resolve by the right module/download.
And now I'm loving the conky scripts...

greetings
A. Dhomi
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.dhomi.com"
linktext was:"www.dhomi.com"
====================================
Posts: 452
Jerry
Joined: 12 Sep 2007
#4
Thanks--it looks simpler than the one I described in this post (though that one works well), so I will give it a try.
Posts: 316
DJiNN
Joined: 26 Oct 2007
#5
This script doesn't work for me. I put in the correct code but it does nothing. Does it have to be in a specific location at all? I've just placed it right at the bottom and when i run conky it just displays the code itself & nothing else. ??
Posts: 452
Jerry
Joined: 12 Sep 2007
#6
I haven't tried it yet, but did you install curl first? Also not totally sure how the conkyrc entry needs to be written--what did you use?
Posts: 316
DJiNN
Joined: 26 Oct 2007
#7
Jerry wrote:I haven't tried it yet, but did you install curl first? Also not totally sure how the conkyrc entry needs to be written--what did you use?
Hi Jerry, thanks for the reply.

I hadn't installed curl, mainly because i didn't know it needed to be installed (Never even heard of it before now) __{{emoticon}}__

I have installed it now though (after i read your message) .... but still get the same results. It's probably something to do with curl needing setting up or WHY. I'll check it out later. If you do get it working yourself then i'd love to know how, if you get the time.
Posts: 452
Jerry
Joined: 12 Sep 2007
#8
I got it to work like this:

--Copied his code and pasted it into a text file using Leafpad
--Substituted my local code (=US zip code) for his capitalized text in quotes
--Saved it in my scripts directory with the name"dhomi_weather.sh"
--Right-clicked the script --> Permissions and clicked Yes to make it executable
--Added this line to the bottom of my conkyrc file (colors are not necessary):

Code: Select all

${color white}Weather:
${color green}${execi 1800 /home/jb/scripts/dhomi_weather.sh} 
It only shows sky and temperature (in C), but it works. I prefer the one I posted earlier myself, because I like to know what the wind is doing and I can add other variables.
Posts: 4
dhomi
Joined: 11 May 2008
#9
DJiNN wrote:
Jerry wrote:I haven't tried it yet, but did you install curl first? Also not totally sure how the conkyrc entry needs to be written--what did you use?
Hi Jerry, thanks for the reply.

I hadn't installed curl, mainly because i didn't know it needed to be installed (Never even heard of it before now) __{{emoticon}}__

I have installed it now though (after i read your message) .... but still get the same results. It's probably something to do with curl needing setting up or WHY. I'll check it out later. If you do get it working yourself then i'd love to know how, if you get the time.
OK. I will explain as much as possible:
1. Edit the .conkyrc file in your $HOME directory (example: /home/dhomi/.conkyrc). Add in the end of the file my code (the first post on this thread)
2. Now you must stop conky (if it was started, otherwise just start it) and start it again (otherwise you wouldnt see the changes). I do it like this:

Code: Select all

ps -aex| grep conky
this will give you the PID (process ID) number. Then use the

Code: Select all

kill 1234
of course change my 1234 with your PID. To start conky again do

Code: Select all

conky &
. This will start conky in the background and leave your shell free for use.
3. Now all should work fine. Otherwise post your question here and I will reply with pleasure.

I also have some other scripts for weather, wich I would share with you all if you want me to.[/code]
Posts: 316
DJiNN
Joined: 26 Oct 2007
#10
Jerry wrote: It only shows sky and temperature (in C), but it works. I prefer the one I posted earlier myself, because I like to know what the wind is doing and I can add other variables.
Thanks for the info Jerry. That did the trick and it's now working fine. __{{emoticon}}__
Posts: 316
DJiNN
Joined: 26 Oct 2007
#11
dhomi wrote: OK. I will explain as much as possible:
1. Edit the .conkyrc file in your $HOME directory (example: /home/dhomi/.conkyrc). Add in the end of the file my code (the first post on this thread)
Hi dhomi, thanks for the reply. That's pretty much what i did and i just couldn't get it to work. However, when i placed the code into a .sh file and then copied Jerrys two conky lines (to call the script) it all worked great. ?
I also have some other scripts for weather, wich I would share with you all if you want me to.
That would be great dhomi. It's always good to have many choices, and it's a great way to learn more about conky etc. Many thanks. __{{emoticon}}__
Posts: 4
dhomi
Joined: 11 May 2008
#12
Jerry wrote:Thanks--it looks simpler than the one I described in this post (though that one works well), so I will give it a try.
Yeah, this post is also ok. It is much fancy, but complex.
Learn my oneline code, and then go to this code.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.dhomi.com/test/dhomi.tar.gz"
linktext was:"Here is my own .conkyrc"
====================================

(just to make sure: First backup your own .conkyrc then download mine and then

Code: Select all

tar -xvf dhomi.tar.gz
Then change the location of additional scripts in the .conkyrc file (edit it with vi or leafpad)