Ideas for a conky weather script ...
Here are the 2 best sources for weather updates for me :
http://www.google.ca/search?sourceid=ch … chicoutimi (google)
or
http://www.meteomedia.com/weather/CAQC0107 (most known weather website/tv-channel of my country)
What would be the best grep ou curl ? Got ideas to build that script ?
Google seem limited but I could show pictures on my desktop directly maybe,
Meteomedia as less nice GUI for that ...
Meskarune wrote:check out the conky forcast package in aur
If you install the package you'll find a conkyrc/template file example in /usr/share/conkyforecast/example
Also have a look at the conky hardcore website, it details quite a lot user setups for this script, a good example is here: http://conky.linux-hardcore.com/?page_id=2487
Cheers
Similar Messages
-
Help for a Conky weather script
Hi,
I was trying to write a Conky script to display weather forecast for the current day in my Conky, using <tempmin>, <tempmax> and <descr> on this page http://www.tv5.org/TV5Site/widget/meteo … lle_id=474.
I'm a complete newbie to bash/perl/whatever, and I couldn't manage to do much. Could anyone explain me how to proceed?
Please don't RTFM me :(You need xmlstarlet to run it.
It simply parses that xml file and extracts the info you want.
I wanted to add newlines, so I just wrapped it all in 'echo -e $(...)' and called it a day. There's probably a better way to do it.
Also, note that the index on 'descr' is one higher than on 'tempmin' and 'tempmax', because there's already a 'descr' earlier in the file:
<weather>
<data>
<ville>Paris</ville>
<pays>FRANCE</pays>
<date>Observation le vendredi 22 à 13:00 (heure locale)</date>
<temp>4°C</temp>
<descr>couvert </descr>
You don't want the value of this 'descr', but of the one a bit lower (the second one) -
<descr>très nuageux </descr>
thus '//descr[2]'. -
[SOLVED] (Perl) Help Modifying Conky Weather Script
I'm using buttons' excellent Conky weather script, but it has more information than I need. It displays both the current weather condition and the temperature:
[condition]:[temperature]F
so right now it's
Clear: 46F
All I need is for it to display the temperature, without the current condition, colon, and letter 'F' (for Fahrenheit).
the script:
METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
echo
echo "USAGE: weather.sh <locationcode>"
echo
exit 0;
fi
curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'
In Conky:
{execi 300 /home/hex/.conky/weather.sh <zip code>}
I'm not familiar with Perl yet so any help is much appreciated
Last edited by Olson (2011-02-17 07:06:10)Try this
curl ... | perl -ne 'if (/Currently/) {chomp;/\<title\>.*: (\d*).\<\/title\>/; print "$1"; }' -
[solved] "what's my linux doing?" conky-bar + script?
Hi!
I'm searching for and/or am trying to figure out a conky config + script that lets me "sort of see what my pc is doing atm", just a little peek, something that "helps guess" and "blends in". Couldn't find anything that lets me see some random details like that, so I did this for now:
stuff.bash:
#!/bin/bash
touch stuff.1 stuff.2
ps -A -o "cmd" > stuff.x
#pstree -U > stuff.x
if [ "$(diff -q stuff.x stuff.1)" = "" ]; then
cat stuff.diff
else
mv -b stuff.1 stuff.2
mv -b stuff.x stuff.1
diff --suppress-common-lines -d stuff.1 stuff.2 | grep \< | tr '\n' ' ' | sed "s/^[0-9a-f ]*//" > stuff.diff
cat stuff.diff
fi
which I'm using in that conky bar:
own_window yes
own_window_type dock
own_window_title conky
own_window_colour 555577
background yes
double_buffer true
use_xft yes
xftfont DejaVu Sans Mono:style=Bold:size=12
alignment top_middle
border_width 0
gap_x 0
gap_y 0
minimum_size 1950 20
maximum_width 1950 20
use_spacer left
color0 aa8888
color1 white
color2 grey
draw_borders no
draw_outline no
draw_shades no
short_units yes
top_name_width 8
pad_percents 2
cpu_avg_samples 12
net_avg_samples 12
update_interval 1
TEXT
${color0}${font impact}CPU:${font} ${color1}${cpu cpu1}% / ${cpu cpu2}% \
${color2}(${TOP name 1} | ${TOP name 2} | ${TOP name 3}) \
${color0}${font impact}MEM:${font} ${color1}${memperc}% \
${color2}(${TOP_mem name 1} | ${TOP_mem name 2} | ${TOP_mem name 3}) \
${color0}${font impact}DO:${font} ${color1}${downspeed wlan0} ${color0}${font impact}UP:${font} ${color1}${upspeed wlan0} \
${color0}${font impact}LAST: ${color2}${font} ${scroll 92 3 ${exec "~/stuff.bash"}}\
${alignr}\
${color1}${time %A, %Y-%m-%d - %H:%M:%S Uhr}\
So... that gives me a sort of nice conky bar with some random "what's being done" - now p.e. It tells me that yaourt is calling wget and pacman... and cmake has been started... and for some reason firefox is calling itsself... and some strange python script in /tmp/... with my home directory written behind it as parameters... mmmh... well.... maybe I should check on that later, so back to the topic - what I'm sort of missing is more or less...:
(edit: [solved] / -I would rather have done something like this with lsof, but I didn't manage to get rid of some of the constantly changing columns of lsof output - those lead to way too many reoccurring info's and doesn't give me the feeling of "a little peek behind the curtains" like it's supposed to be )
- There must be an overall better ways to do something like that, right? Any ideas for a smart little script that gets a few lines of "chaotic random backgrund info" with a good: "ooooh, I seeee"-ratio and not too much spam?
(edit: [solved] - "network stuff"! I can't see enough network stuff!!! So if anyone knows an easy (easy as in "call-it-once-per-5-seconds-with-concy"-easy) to show what processes are meddling around on the network most atm, that would be great... maybe I'll try netstat again for just that... )
- Also the whole rest of that config & script are far from perfect...
So: Any hints & stuff? Thanks!
Last edited by whoops (2009-07-19 11:12:24)Ooooh, that explains it.
Thanks, but I'm looking for (see example) a single line or something for a conky bar and something a lot less "systematic"... hard to explain... something to "see stuff fly by"... the "strange small line where I can recognize stuff from time to time"... like at the moment it's telling me "kjournal2d < n/usr/libhistory < bla bla bla < www.archlinux.org < ninotify < npipe < npipe < /bin/bash ./stuff.bash < /dev/input event....." and its going on an on and on which does not make thaaat much sense for but I like seeing it...
That's my "best one" so far:
stuff.bash:
#!/bin/bash
touch stuff.1 stuff.2
ps -A -o "cmd" > stuff.x
lsof -F cn | grep -v -E "p[0-9][0-9]|proc|stuff|lsof|grep|conky| sed " | sed "s/^.//g" >> stuff.x
diff -BEbw --suppress-common-lines stuff.x stuff.1 | grep \< | tr '\n' ' ' | sed "s/^[0-9a-f ]*\|IPv4//g" | sed "s/ */ /g" > stuff.diffx
if [ "$(diff stuff.diffx stuff.diff | grep \<)" = "" ]; then
cat stuff.diff
else
mv -b stuff.1 stuff.2
mv -b stuff.x stuff.1
mv -b stuff.diffx stuff.diff
cat stuff.diff
fi
... just I think it might suck a little too much CPU... and I didn't manage to filter out all the stuff this script generates itself without loosing too many unrelated info... and some stuff that keeps showing up every few seconds. Somehow I'd like it mostly to show "stuff that doesn't happen all the time".
Last edited by whoops (2009-07-19 11:09:23) -
Ideas for developing new Mini project
Hi All,
we want to develop our programming skill by doing some mini project in Java technology.
A group of 3 members want to involve in this project with IDE as JDeveloper. So anyone can suggest a mini project with some 10 days duration. We are strong in Swing-EJB. We also intersted to work in JSP,Java script. Also ready to learn new technology..
So whichever applicable suggest us or give some ideas for the project to improve our skills.
Note: we are one year experienced in java Programming.Hi Lrj1985,
According to your description, in order to allow users to know the probability of collecting from a debtor dependent on different dimension, you nedd to produce an OLAP cube to perform this. Since you haven't done this for a few years, now what you
are looking for is that the ideas, starting points or direction to build the OLAP cube, right?
In this case, here are some links which describe how to build a cube step by step, please see:
http://www.codeproject.com/Articles/607134/BuildingplusYourplusFirstplusAnalysisplusServicesp
http://technet.microsoft.com/en-us/magazine/ee677579.aspx
Regards,
Charlie Liao
TechNet Community Support -
Where can I send an idea for a new feature.
I have an idea for a new feature in Illustrator. I'd like to share it to the developers.
Is there a channel to send your idea?
Thank you!Thanks for the replies.
I know that this feature does not serve everybody, but I could use it on a weekly basis.
I don't know if there is a script for this, and if there is, plese let me know it.
Transparent working window.
So I could set my whole artboard window transparent and still work on it.
I could easily and fast trace some shapes from locked PDF's and also directly from the browser without copying the image to my computer.
The problem is, of course, that Zoom would only work in the graphics in the Illustrator (needless to say) and would not affect to the graphics behind the Illustrator window.
But still I think I could use it very much.
For examble I could manually draw simple shapes and logos straight from the customers website, without downloading the poor JPG image.
Please let me know what you think about it.
Sorry if there is some mistakes, English is not my native.
I hope you got the point. -
Method class for calling/executing VB script from abap
Hi All,
I need to call a vb script from abap.
This vb script performs some function then.
For executing this VB script i use the method CL CL_GUI_FRONTEND_SERVICES=>Execute.
Now i need to pass data to the vb script in the from of a structure/workarea.
Does anyone have any idea on what class/method shoul i use?
Regards,
Harshit RungtaCheck Connect VB to SAP
Kanagaraja L -
Ideas for automating layout updates?
I have about 40 newsletters that need updating to a modified layout. The changes are consistent, for example a vertical, one-column sidebar on the bottom right is becoming a centered, 2-column header.
Any ideas for moving the process along? I thought of saving the reformatted elements as library items, then manually copying and pasting the text from the old layout into the copied library item.
Anything else I should try?If the stuff (text frames and graphic frames) is based on master page items, this can probably totally automate the process: http://forums.adobe.com/thread/444744?tstart=0
Otherwise, scripts might help. -
Search for ZfD Agent install script
I am looking for a script / batch file for installation of the ZENworks agent without reboot of the workstation.
I am just updating from ZfD 7 SP1 ir3a to ir4 and if I install it manually and start the ZENworks services after install everything is still operational without reboot.
However if I install the agent with a ZENworks application package it always needs a reboot to activate the ZENworks services again - especially the Workstation-Manager
I tried it with pre- and post launch and distribution scripts, and with batch file installation. Everytime when the Workstation-Manager stops the installation ends but the post-scripts and batch processing stops as well. It always requires a reboot to activated the Agent again - or a manual start of the Workstation-Manager service.
I need to find just a way to call a batch file after the MSIEXEC process finishes in order to perform a "net start Workstation-manager".
The difference to other invoronments might be, that the Application is assigned to the Workstations instead to the users like in most other environments.
Thanks for your ideas, KlausWell .... [toot horn]
This is a link to a script I wrote in AutoIt that I used for many ZfD6 - 7 deployments. Was very successfully in getting the agent out and you run it from the login script.
Zenworks 4x - 7.x Workstation Agent Automated Deployment - Novell: ZENworks FAQ - Tek-Tips
I didn't write it to do a removal of the agent, but would be simple enough to be added. On the same forum site, in the Zen FAQ's I also posted the source code for the script I have been using to do ZCM deployments. In it has the code you would need to add to facilitate the uninstall of the agent so you can do a reinstall.
Originally Posted by Croaker
You may need put *everything* in a single batch file.
I.e. app copies the zfdagent.msi to the workstation (it won't work off a
server, because as soon as you stop the workstation helper/manger, the
workstation will lose the ability to install from the network)
Then executes the batch file
The batch file stops the zenworks services, unloads the NAL (may not be
necessary, not sure if the msi will do this)
Batch file then installs the ZFD agent with the noreboot option.
batch file restarts each service
Problem will be the batch file really can't re-start the nal correctly.
Since the batch file will be running under the SYSTEM scope, anything it
launches will be under that scope too (ie.. the NAL), so when it loads, it
wouldn't see any user-based apps.
>>> On 7/1/2009 at 10:36 AM, in message
<[email protected]>,
dgibbons<[email protected]> wrote:
> I would like to echo your question. I have a problem right now in
> whichupgrading the agents from ZfD 7 SP1 ir3a to ir4 will break the agent
> andthe only way I can recover is to manually uninstall the agent,
> rebootand reinstall with ir4. I have not yet been successful in scripting
> it(but then I am not that smart when it comes to scripting either) so
> ifanyone has a good solution I too am very much wanting a method
> thatworks. Thanks
> Darcy--
dgibbons--------------------------------------------------------------------
----dgibbons's Profile:
> NOVELL FORUMS - View Profile: a10425 this thread:
> Search for ZfD Agent install script - NOVELL FORUMS -
Where I can get a free IDE for Java which isn't written in Java or scripts (I have tried some written in Java, but they ate too much memory.)
After reading your orginal question I did some more investigating on IDE for linux. In my previous experiance I haven't had much luck installing them, running them once installed, keeping them running once running. These seem to be the quality of Java IDEs written as freeware for Linux and not Java or Linux as a whole. After you asked your question I decided to give one more IDE a try. Jedit.
http://www.jedit.org/
The RPM installed right, the first time without intervention from me.
It supports plug-ins.
It does network installs of these plug-ins which was really cool and effortless
It does all the things you asked for in your previous post
It fails to meet one of your requirements... its written in java.
however it is running on my linux box now, while I'm streaming mp3s and hosting a low volume web site, running Kde.
My system is a AMD 950 with 256 meg RamRunning Redhat 7.2
I haven't written much in the way of applications useing jEdit but it does look promissing.
Ron_W -
Everything works on ITunes except play function.I can select as song I want but cannot get it off "pause."I tried going to controls and instructing it to play(no go) and clicking again and again on play arrow(which flips it to pause...).Any ideas for a very old,very frustrated non-tech guy???
Please!! Thnaks!!!Replying to myself. Kept trying different areas of the ipod this evening, clicking various buttons, including some I'd never used before. All of a sudden I could see my Nano in iTunes. I quickly clicked on Restore before iTunes changed its mind about recognizing the iPod. Moved some songs onto it and it appears to be back to normal. Keeping my fingers crossed.
-
My ipod nano 3rd generation, when connected by usb, does not show up in itunes, does not show up on my computer, does not seem to charge by the wall charger. It just has a black screen. Any ideas for me?
I've run diagnostics. Can't find device. I've tried resetting. The toggle has been turned on and off.Cable works fine on my other iPod. Reset by pressing menu and center button together for 6-10 seconds. Left it to charge for many hours. Started acting up while running. Suddenly the music stopped playing but my Nike + was still working for the rest of my run. Took it straight it home and plugged it in to the wall to recharge since the battery was fairly low. Looked like it recharged ok but then screen went blank and now does it not show up on iTunes, does not seem to recharge by the wall charger (apple wall charger plugged into a surge protector in India). I have turned the hold switch off and on many times.
Sounds like a repair issue, which is not easy to do in India :( -
i bought an eBook from iTunes. I can view/read it perfectly on my iPhone but when I try to open the eBook file on my iPad, I get the error message, "Cannot open book. This book is protected by an incompatible technology." Any ideas for me? thx
Welcome to the Apple Community.
I have seen previous versions mentioned in a pop up message before on iCloud.com, but I'm not really sure at all how it would help, as I couldn't get it to do anything.
The best advice I have at this time is to back up your work on your iOS device by regularly saving it to iTunes, if anything goes wrong you can then either load it into the numbers app again on the device or recover it via iTunes on your computer.
My syncs are immediate, I never get chance to see if it works in the background, sorry. -
Some calendars in iCal appear corrupted (ie have red exclamation mark by them) but are still OK on iPhone. If I sync, will the calendar data on the phone restore info on the desktop iCal or will I lose that as well? Or could I back up the calendars on my iPhone somewhere and then import them into iCal? any other ideas for how to sort this please? it's driving me mad. thanks.
I don't think there will be a solution to this. Exchange 2003 just isn't supported.
-
My source audio isn't importing. Any ideas for how to fix?
The audio is there. I've watched it in VLC, and the audio is there. Whenever I import the footage, though, it goes missing. Any ideas for how to fix it?
Welcome to the forum.
First, more information would be useful. See this FAQ Entry for what info will help: http://forums.adobe.com/thread/961741?tstart=0
Also, when you Import your AV file, do you allow PrPro time to Conform the Audio portion? For more info on Conforming, Indexing and PEK file creation, see this article: http://forums.adobe.com/message/3892177#3892177
Good luck,
Hunt
Maybe you are looking for
-
Problem with rank in OBIEE 11G
Hi, I have a problem with the function rank in obiie, i have two columns the first is the id of employees, and the second is the rank of revenues of employees, when I filter one employee and the rank is always 1, someone can help me? Cumps
-
Using time capsule to share internet connection with a pc via ethernet
Hi, I've recently acquired a time capsule and was wondering if i could use it to share a wireless internet connection via ethernet to my non-wireless (windows 7) pc? My current situation is that i have a wireless modem/router that shares my internet
-
Auto Downlaod of Email Attachments
Hi, I have set up a few email accounts using the email apps on my iPad 2 and they includes Yahoo!, Gmail, MS Exchange and my office MS Outlook. I did a test today and realise that all the email account will ask for my permission before downloading th
-
Sony Vaio Laptop Won't Turn On
I have a Sony Vaio laptop that turns off every time I turn it on. I have taken it in for repairs and they can't that nothing is wrong with it and they can turn it on. They even run diagnostics and have opened it up and can't find a problem. I did upd
-
How to Create a Dynamic Crosstab Query?
Hi friends, I have a table like: DateOfSale SalesPerson SalesAmount Which may have any number of sales' staff (old/new workers) who have sold goods on different dates which may range at any length of time. Any suggestion for an appropriate query