LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 04-21-2010, 10:44 PM   #1
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Rep: Reputation: 51
Strange conky request


Hello all,

Didn't know where to place this so here goes.

I have my desktop all setup and the way I like it (openbox, tint2, xmms and whatnot).

I setup conky with a info bar at the top. Down towards the bottom I have weather info. I was wondering if it would be at all possible to use a term to pull weather radar info? It should be easy enough to get conky to load a term on start and then have the radar embedded in the term? Maybe an animated radar that auto updates so often (by user choosing)?

Example:


-----------------------------
| |
| |
| |
| Radar |
-----------------------------
Curently yadadadada
yadadadadadadadadada
yadadadadadadadadada

Would this be possible?
 
Old 04-22-2010, 08:30 AM   #2
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 35
What exactly do you mean by weather radar info? You say you already have weather info at the bottom, correct?
 
Old 04-22-2010, 09:48 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
I would be interested in doing this this, too!
 
Old 04-22-2010, 04:47 PM   #4
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by zuzoa View Post
What exactly do you mean by weather radar info? You say you already have weather info at the bottom, correct?
Yes I have basic weather text info. What I would like is an animated radar above the conky text forecast.
 
Old 04-22-2010, 05:24 PM   #5
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

Rep: Reputation: 100Reputation: 100
Have you looked at this?
 
Old 04-22-2010, 05:24 PM   #6
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 648

Rep: Reputation: 78
I personally wouldn't know how to do this, but Google being the best dern thing on the net came up with this after a quick search:

http://bbs.archlinux.org/viewtopic.php?id=81052
 
Old 04-22-2010, 05:32 PM   #7
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by bret381 View Post
I personally wouldn't know how to do this, but Google being the best dern thing on the net came up with this after a quick search:

http://bbs.archlinux.org/viewtopic.php?id=81052
Thanks for the link. I looked at that and it is not really what I am interested in. There is another place that offers a python script that is more like what I want but all it does is give "image download failed" when I use it.

EDIT: Just so everyone knows what I am looking for here. We have a lot of storms this time of year here. What I would like is something that is seamless, like it always has the most current radar available. So this would just start and would auto update and look for new info every like 2 minutes.

Last edited by corbintechboy; 04-22-2010 at 05:50 PM.
 
Old 04-24-2010, 04:32 PM   #8
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Original Poster
Rep: Reputation: 51
Ok...

I am working on a little script that is so far doing what I want. I believe after a little help we will have a winner .

Code:
#!/bin/bash

#Create directory for images
mkdir /home/ron/weatherimages
#Cd to directory so wget will download files there
cd /home/ron/weatherimages
#Get images for weather
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/1L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/2L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/3L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/4L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/5L.jpg?1213024402403
#Clean up junk
rm -f -r /home/ron/image.weather.com


exit 0
As of right now it does what is supposed to do (bash newb here). What I need is a way for it to repeate the wget commands every so often. Then after I get that I will post how to get it all working for those interested.

Can someone please enlighten me?

Thanks
 
Old 04-24-2010, 07:54 PM   #9
Dogs
Member
 
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105

Rep: Reputation: 25
Quote:
Originally Posted by corbintechboy View Post
Ok...

I am working on a little script that is so far doing what I want. I believe after a little help we will have a winner .

Code:
#!/bin/bash

#Create directory for images
mkdir /home/ron/weatherimages
#Cd to directory so wget will download files there
cd /home/ron/weatherimages
#Get images for weather
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/1L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/2L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/3L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/4L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/5L.jpg?1213024402403
#Clean up junk
rm -f -r /home/ron/image.weather.com


exit 0
As of right now it does what is supposed to do (bash newb here). What I need is a way for it to repeate the wget commands every so often. Then after I get that I will post how to get it all working for those interested.

Can someone please enlighten me?

Thanks

Code:
while [ 1 -eq 1 ]
do
   your dubyagets here.
   sleep(for a little while)
done
or you can use at or cron to run the script at some point.


at is here -
http://www.computerhope.com/unix/uat.htm

cron is here -
http://www.linuxhelp.net/guides/cron/


Also, I would make the weather directory into an environment variable (export WEAPATH=/home/ron/weather)

and then do wget -P $WEAPATH -N [URL] so that in the event you don't want the PWD to be /home/ron/weather then you won't be stuck coding around that issue.

Last edited by Dogs; 04-24-2010 at 07:57 PM.
 
Old 04-24-2010, 08:12 PM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by Dogs View Post
Code:
while [ 1 -eq 1 ]
do
   your dubyagets here.
   sleep(for a little while)
done
Code:
while true
do
   your dubyagets here.
   sleep(for a little while)
done
 
Old 04-24-2010, 10:02 PM   #11
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Original Poster
Rep: Reputation: 51
Thanks for the help!

Got it working as it should but needs some tweaks before I get to happy. I am using qiv and when it refreshes the new images it wants to default back to center for some reason. I even got the no center option on.

Anyway here is what it looks like:
http://govnut.com/pics/weatherworks.png
 
Old 04-25-2010, 02:13 AM   #12
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Posts: 480
Blog Entries: 1

Original Poster
Rep: Reputation: 51
Ok...FINISHED .

You can choose to use the shortcuts in this post in your scripts (I have), for simplicity reasons, I am not including them in what I post here.

First thing you will have to do is go to weather.com and find the name of your map for your local. The url or the images should be something like this:
image.weather.com/looper/archive/(name of your map)/1L.jpg?1213024402403

I will leave Kentucky in the scripts for easy reference.

The first script is the one to pull the images:
Code:
#!/bin/bash

#Cd to directory so wget will download files there
cd /home/(user)/(folder)
#Get images for weather
while [ 1 ]; do
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/1L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/2L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/3L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/4L.jpg?1213024402403
wget -N http://image.weather.com/looper/archive/us_lex_closeradar_plus_usen/5L.jpg?1213024402403
#Resize the images
mogrify -resize 311x210 /home/(user)/(folder)/*.*

sleep 180
killall wget
done
Edit as needed.
Second script is to launch feh and run the slideshow:
Code:
#!/bin/bash

feh -g 311x210 -D .4 -x -s /home/(user)/(folder)/

exit 0
And to make it all run (in Openbox at least autostart.sh):
Code:
#!/bin/bash
/home/(user)/(script location)/myweather.sh &
/home/(user)/(script location)/feh.sh &
You can play with the sizes if need be, they work fine on my 32 inch monitor.

When feh starts it will more then like be up at the top left, hold alt+click to drag where wanted (needed everytime started, minor annoyance)
Make sure when you paste these into whatever that the wgets are on one line per.

Hope you enjoy!

Last edited by corbintechboy; 04-25-2010 at 02:26 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
conky question: passing conky-variable to shell-script zlin50 Linux - Software 2 12-29-2012 07:47 PM
Strange behavior of Conky Hammett Linux - Software 0 04-08-2008 11:14 AM
Strange units in conky (KiB, MiB, GiB) chilebiker Linux - Software 1 05-04-2007 01:44 PM
maybe a strange request hepburnenthorpe LQ Suggestions & Feedback 8 11-09-2006 04:47 AM
Conky on Suse 10.0 - *** buffer overflow detected *** conky terminated Slidex Linux - Software 1 03-17-2006 12:50 PM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration