Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
[req] world clock script for India (Chennai)

I had no luck in finding the suitable script for chennai (India) local time.

it's GMT +5:30 hours

any one plz help

I tried in may ways like
TZ=England/GMT+5.5 date +"London: %I:%M %p - %D",

but none of them worked out. :mad:
 
I had no luck in finding the suitable script for chennai (India) local time.

it's GMT +5:30 hours

any one plz help

I tried in may ways like
TZ=England/GMT+5.5 date +"London: %I:%M %p - %D",

but none of them worked out. :mad:

This should work for you
Code:
TZ=IST/UTC-5:30 date +"Chennai: %I:%M %p %a"
I've checked it against www.timeanddate.com's current time for Chennai and it gives the correct readout. Note: despite Chennai being UTC+5:30, the script only gives the correct time when UTC-5:30 is given. (UTC+5:30 gives a completely wrong time). Why this is I don't know, but the script seemed to work fine (i checked it against two independent sites for current time in Chennai and the read-out was correct for both)

Hope this helps
 
This should work for you
Code:
TZ=IST/UTC-5:30 date +"Chennai: %I:%M %p %a"
I've checked it against www.timeanddate.com's current time for Chennai and it gives the correct readout. Note: despite Chennai being UTC+5:30, the script only gives the correct time when UTC-5:30 is given. (UTC+5:30 gives a completely wrong time). Why this is I don't know, but the script seemed to work fine (i checked it against two independent sites for current time in Chennai and the read-out was correct for both)

Hope this helps

awesome! it works great..thanks
 
This thread is great! I have used a lot of things from this thread, but since I'm pretty much clueless about coding, I was wondering if someone could parse this RSS feed so it only includes the Store Title and short blurb.

feed://rss.cnn.com/rss/cnn_topstories.rss

I got it to "work" but it has a bunch of extra crap in there.

here is the script I am using:

#!/bin/sh

URL="http://rss.cnn.com/rss/cnn_topstories.rss"

if [ $# -eq 1 ] ; then
headarg=$(( $1 * 2 ))
else
headarg="-8"
fi

curl --silent "$URL" | grep -E '(title>|description>)' | \
sed -n '4,$p' | \
sed -e 's/<title>//' -e 's/<\/title>//' -e 's/<description>/ /' \
-e 's/<\/description>//' | \
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/<[^>]*>//g' |
head $headarg | sed G | fmt​



thanks!
 
Hi,

I have a small problem using Geektools with iCal, and I am hoping you guys can help me out.

I installed iCalBuddy and followed instructions using the instructions that were posted on the website to display today's events.

Code:
/usr/local/bin/icalBuddy -nc eventsToday | sed -e "s/*/--/" | sed -e "s/!/!!/"

Now, in my calender, I just have Birthday's of people from various sources. I have downloaded from Google, and Facebook and added them to my calendar.

When I display my calendar using geektools, this is what I get.

Any help will be appreciated. What the hell is going on?
Why do I get the url: line?

Thanks!

http://picasaweb.google.com/lh/photo/eSMtis3cTlBngJY7EF56SA?feat=directlink

Also, here is a link to my desktops over the past 15 days. Feel free to comment :)

http://picasaweb.google.com/andykashyap/DesktopSkins?feat=directlink

Cheers

- Andy!
 
Never mind, I figured it out.

To remove the url from the bottom, I gotta use this :)

Code:
/usr/local/bin/icalBuddy -nc -eep notes,url eventsToday | sed -e "s/*/+/" | sed -e "s/!/!!/"

Sorry for the trouble
 
hey
can anyone help me out, geektools noob alert :)

i used the
date +"%I:%M"
etc.. codes for time, day, date, month and am/pm

but its not the right time, day, date or am/pm for me. i need it for Melbourne, Australia. can anyone help me out ?

thanks
..Ryan..

EDIT: i worked out the time, but not am/pm, day, or date.
 
hey
can anyone help me out, geektools noob alert :)

i used the
date +"%I:%M"
etc.. codes for time, day, date, month and am/pm

but its not the right time, day, date or am/pm for me. i need it for Melbourne, Australia. can anyone help me out ?

thanks
..Ryan..

EDIT: i worked out the time, but not am/pm, day, or date.

I dunno why it wouldn't work - is your computer set to the right time? (Check time on menubar etc). If not, try this
TZ=AEST/UTC-10 date +"%I:%M%p, %A,%e %B, %Y"

This gives time, day, date, year. This gives the coorect time for melbourne (as i live here:))

hope this helps. If you want something a bit more specific/detailed, just let me know.
 
I dunno why it wouldn't work - is your computer set to the right time? (Check time on menubar etc). If not, try this
TZ=AEST/UTC-10 date +"%I:%M%p, %A,%e %B, %Y"

This gives time, day, date, year. This gives the coorect time for melbourne (as i live here:))

hope this helps. If you want something a bit more specific/detailed, just let me know.

thanks man. i had the right time and day in my menubar, i changed everything i time & date system preferences to some random crap, then back again, and now it works :confused: but ehh, it works now so thats a plus :)
cheers,
..Ryan..
 
coding?

I'm a complete noob when it comes to this stuff, and I am looking to learn a bit about it. Can someone recommend to me a book that would help me start to make the type of code that I could put to use using geektool. I don't know if there is some kind of "Coding for Dummies" book out there...

Thanks.
 
I'm a complete noob when it comes to this stuff, and I am looking to learn a bit about it. Can someone recommend to me a book that would help me start to make the type of code that I could put to use using geektool. I don't know if there is some kind of "Coding for Dummies" book out there...

Thanks.

I have this one from O'Reilly: classic shell scripting by Robbins & Beebe
Not sure if this qualifies as "for dummies"

you should also get 'Unix in a nutshell'
 
Another noob here, I skimmed through all the pages here and I might have missed this answer, but how do you get rid of the box?
 
oh yeah, if you have the background color set to anything other than transparent i assume it will stay there. So perhaps try setting the background color to transparent, assuming you haven't already

Wow I'm an idiot... (still trying to get used to the simplicity of this awesome machine)
 
heres mine....i thought it was over my head at first, but im starting to understand it a lil better

mbp screen
Picture1-1.png


external monitor
Picture12.png
 
Call me a complete buffoon, but how does one make an image display on the desktop from Geektool? I've fiddled with it no end, and checked through the posts here a bit but can't figure it out.. For some reason I'm not getting the pathname correct. :confused:
 
Call me a complete buffoon, but how does one make an image display on the desktop from Geektool? I've fiddled with it no end, and checked through the posts here a bit but can't figure it out.. For some reason I'm not getting the pathname correct. :confused:

Farther than what I've gotten I'm LOST. :eek:
 
Call me a complete buffoon, but how does one make an image display on the desktop from Geektool? I've fiddled with it no end, and checked through the posts here a bit but can't figure it out.. For some reason I'm not getting the pathname correct. :confused:

drag the file into terminal, copy the resulting path and then paste that into the geektool picture textbox preceded by "file://"

eg: file:///Users/zzzzzz/Dropbox/Random/icons/general/mstrkrft.png
 
drag the file into terminal, copy the resulting path and then paste that into the geektool picture textbox preceded by "file://"

eg: file:///Users/zzzzzz/Dropbox/Random/icons/general/mstrkrft.png

That did the trick! Many thanks :)
 
Sorry to ask, but I feel this is the best thread to do so in. Has anyone checked if geektool works properly in SL?
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.