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.
get images via rss

hi guys i just wondering is there a way to get images via rss and display at desktop? it would be very nice. I googled every keyword but can't find any information.

\thanks
 
hi guys i just wondering is there a way to get images via rss and display at desktop? it would be very nice. I googled every keyword but can't find any information.

\thanks

Well you can download the image first and let geektool display that image,
make sure it's allways the same name...
Do you know any scripting language? (unix, ruby, applescript)
maybe you can get it to work using automator.

you'll only need 2 geeklets (shell and image)
Once you've made your application in automator save it as an app

enter in the shell geeklet following: open -a "name of your app.app"
enter in the image geeklet: path to the folder who contains only that imager or the path to the specific image itself.

downside of using this method is every time your geeklet refreshes then your automator app will become active and start dancing in your dock...
Better solution, get someone to make it for you ;-)

have fun!
 
thanks for idea. i did it for ffffound.com with ruby. you can download it here:

http://rapidshare.com/files/324188927/hede.zip
http://rapidshare.com/files/324189460/hede_workflow.zip

-checks if there is a file called "1.png" (for overwrite issue) and removes
-grabs an image url from ffffound.com (latest url via rss)
-then saves as 1.png

to execute type this to shell:

Code:
open -g -a "/Users/YOU/PATH/TO/hede.app"

to display
simply select picture
Code:
file:///Users/YOU/PATH/TO/1.png

ruby code:
Code:
#!/usr/bin/ruby
require "rubygems"  
require 'net/http'
require 'rss/1.0'
require 'rss/2.0'
require 'pp'
url = "http://feeds.feedburner.com/ffffound/everyone"
rss = RSS::Parser.parse(open(url).read, false)
puts rss.items.at(1).source.url
 
let geektool script generate png's

hi, little question, i don't know what else to try:eek:

so what this script does:
-fetches temperature and pressure data for 2 locations, and stores them together with date and time in a .dat file.
-then it plots the curves, and outputs the png's.

this works when i run the script in terminal, but when i let geektool run the script, it generates empty png's.

Code:
#! /bin/bash

m=`lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=beveren|awk '/Press/ && !/Fore/ {for (i=2; i<=5; i++) printf $i " " }' | sed -e 's/ hPa//'`

k=`lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=kortrijk|awk '/Press/ && !/Fore/ {for (i=2; i<=5; i++) printf $i " " }' | sed -e 's/ hPa//'`

d=`date "+%d/%m/%Y %H:%M:%S"`


tb=`lynx -dump http://mobile.wunderground.com/auto/mobile_metric/global/stations/06450.html|awk '/Temp/ && !/Fore/ {for (i=2; i<=5; i++) printf $i "" }'`

tk=`lynx -dump http://mobile.wunderground.com/auto/mobile_metric/global/stations/06462.html|awk '/Temp/ && !/Fore/ {for (i=2; i<=5; i++) printf $i "" }'`




echo "$d $m $k" >> /Users/jorgverstraeten/Documents/data.dat
echo "$d $tb $tk" >> /Users/jorgverstraeten/Documents/datat.dat

q='gnuplot /Users/jorgverstraeten/Documents/test2.pg' 


$q > /Users/jorgverstraeten/Documents/temp.png

w='gnuplot /Users/jorgverstraeten/Documents/test.pg' 

$w > /Users/jorgverstraeten/Documents/druk.png
echo "updated: $d"


so, am i trying to do the impossible ? or is it just me.
 
hi, little question, i don't know what else to try:eek
...
so, am i trying to do the impossible ? or is it just me.
Would it not be easier to let the script auto-run in the background without Geektools, and then use Geektool's image option to display the png images? Or run the image generation portions as a geektools shell script, and then use the image option to display the generated png images.
 
allright, thanks RogersDA. I have a solution based on your comment.

geektool runs the data collection part of the script, and everytime i want to look at the graphs, i run the image generation part.

so thanks
 
Hi guys,
I'm completely new to MacRumors and relatively new to Mac (About 6 months). Anyway, discovered Geektool a few days ago. Love it. I would post what I have so far, but my internet it being too slow to upload any images..

Anyway, a while back, there was a code for Quote of the Day that got data from MSN Encarta. That doesn't seem to be working anymore, I think Encarta closed down that page..

So, does anybody have a code for Quote of the Day that actually works?

Thanks,
Ins.
 
Hi guys,
I'm completely new to MacRumors and relatively new to Mac (About 6 months). Anyway, discovered Geektool a few days ago. Love it. I would post what I have so far, but my internet it being too slow to upload any images..

Anyway, a while back, there was a code for Quote of the Day that got data from MSN Encarta. That doesn't seem to be working anymore, I think Encarta closed down that page..

So, does anybody have a code for Quote of the Day that actually works?

Thanks,
Ins.
look here:
http://www.macosxtips.co.uk/geeklets/internet/get-a-random-quote-from-quotedb/

Jorgxus
 
Well guys, I'm back asking for a little help if possible, My first attempt at using the geektool, was the Simpson Xmas theme a few pages back.

Well, I have had a complete and utter disaster recently, were a bad bootcamp installation removed ALL, my osx and everything on the drive, so all my hard work was ruined.

Anyway here you can see my next venture, But what I'm after really is a better glass type font that would go a lot better than the few I have tried here.
Something to match the wallpaper I have.

I also want to ask something if its at all possible to even do, and that is it possible to make my text curve, around the Apples in the picture.picture.

The fonts I have tried are, "cracked", "beer Glass"

screenshot20091223at195.png
 
I've read through this thread the past two months, and am grateful for all the scripts floating around, thanks all!

I was hoping someone could point me in the right direction to find a certain script, or perhaps jot one down. I've looked at some scripts and I have an idea how they work but would never be able to write my own.

I use the script that uses wunderground for the forecast phrase, and the yahoo weather scripts that show current weather conditions and temperature with a weather icon, but I would like to see a script that can highlight current weather watches, warnings, and advisories for a given location (i.e. county or zip code).

As an example, which I'll try attaching as a screenshot, the next few days I'm under a Winter Storm Warning (like a large chunk of the country). Since I like wunderground, I see that this warning is posted above the forecast in red lettering: "Winter Storm Warning in effect from 6 am Thursday to 6 am CST Saturday..."

This is the exact information that would be useful, and hopefully others would benefit too. Is it possible to take whatever watch or warning that shows up in this position and put it into a GT script?

Thanks in advance for any consideration!
 

Attachments

  • winter storm warning.png
    winter storm warning.png
    210.4 KB · Views: 149
Hi,

I've just found out about this and started off with a few things for Time/Day/Date, battery power and hard drive space. I've used the drive space code from here http://cattail.nu/mac/GeekTool/scripts/diskspace.bash
Code:
df -hl | grep 'disk' | awk '{print $4 " free " "("$2")"}' | sed s/Gi/gb/g
and as an experiment I've changed the last line to
Code:
sed s/Gi/Gb/g
that has made it display 'Gb' for gigabytes on the hard drives instead of 'gb', because that was annoying me. But for disk images, memory cards and USB sticks, it displays as Ki and Mi instead of Mb and Kb, how can I change this?

I'm also trying to use the calendar code
Code:
#!/bin/bash
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"
but the current day shows as ## instead of being highlighted??
 
Hi,
But for disk images, memory cards and USB sticks, it displays as Ki and Mi instead of Mb and Kb, how can I change this?

Code:
sed 's/<blah>/<blah>/<some option>'
finds regular expressions (You can google this and learn all about it, super duper useful stuff) in the first blah, and replaces them with the second blah. So another way to do this would be

Code:
sed 's/\([GMK]\)i/\1b/g'

So the s says replace the first thing with the second thing. The "/" says this is the thing I want to replace. The \( says, hey, remember this part, I want to use it later. The [GMK] says look for anything that starts with a G, M, K. the \) says, hey we're done saving. And the the "i" completes the experession. The next "/" says hey, here's the thing to replace with. The \1 says, Hey remember that thing I wanted you to save? Well use it here. Then the b, just completes the replacement. Then the / says, ok we're done replacing. The trailing g says, do this more than once per line.

So in summarry \([GMK]\)i finds characters that look like Gi, Mi, Ki and saves the G, M, and K for later use via \1. And the general form of a search and replace sed command is 's/<thing to replace>/<replacement>/<flags>.

P.S. Googling sed one-liners gives a website that is worth it's weight in gold.

but the current day shows as ## instead of being highlighted??

Well if we look at your experession...
Code:
cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /

There are multiple search and replaces is going on here.

The first one adds a space to the beginning of each line (^ is regular expression for begging of the line)
Code:
s/^/ /

The second one adds a space to the end of each line ($ is a regular expression for end of line)
Code:
s/$/ /

The third experession has two expressions so lets start on the inside. date +%e returns the date for example today it would be 26. However, if the date were 1, it would return 1 instead of 01 (date +%d will return 01). Now the "|" character sends the output of the date command to our sed command. In our sed command "." will match anything, it is the single character wild card. So this replaces every character in the date command with a #. The $( ) says, hey evaluate this first, and then stick it in.

Code:
$(date +%e | sed 's/./#/g')

Now in the outer sed command, we search for the current date, and replace it with the #'s that we get from the inner sed command.

Code:
s/ $(date +%e) / $(date +%e | sed 's/./#/g') /

which will evaluate to

Code:
s/ 26 / ## /

So you can see why you are getting the ## in there. Unfortunately, I believe geektool does it's own font formatting, so I don't think there is a way to leave the number and simply highlight it. I think even if you do this, geektool will just override it anyway.

Hopefully that wasn't too much overload, and will help you better understand what your geek tool scripts are doing. Also geektool is simply running bash commands, so if you want to learn more about this you can google bash scripting guide and you'll get a great guide that will teach all kinds of wonderful things.
 
Thanks seepel. That was a bit of an overload :p , I've replaced the calendar with a horizontal one now across the top of the screen, and it highlights the current day with a | either side of it. I've also got Yahoo widgets in too, its a lot easier for the weather as I'm in the UK and all the scripts I could find used American zip codes. So I'm happy now :) .
 

Attachments

  • desktop1920.jpg
    desktop1920.jpg
    312.3 KB · Views: 256
PHEW! It took me 2 days, but i read all 61 pages, I got pretty far, and being that i know zero about scripts or any of this nonsense i feel pretty good.

I have a few requests if I may, and I will try to be as thorough as possible.

1) I have my day and month represented normally. day looks like this: "Sat" Is there any way (script or other?) to turn them into all caps without using a font that is all caps?

2) I know how to display todays day (ie "Sat") but how would i do tomorrow? and the day after tomorrow? ie "Sun" and "Mon"

3) In my current desktop (photo below) i copied a script for the weather on the top right.... but i want to dissect it a little.... what i want out of it is each "Condition" "High" "Low" for each day independently.... for today, tomorrow, and the next day (dont worry about listing days, i will use another shell script for those to be able to change font and layout. This is the script i am currently using for weather:

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=30339&u=f" | grep -e "Current Conditions" -A 1 | tail -n 1 | sed -e 's/<BR \/>//' && echo && curl --silent "http://xml.weather.yahoo.com/forecastrss?p=30339&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\ L\:\ \2/" | sed "s/\?\(.*\)/\\1/"



4) EDIT: Forget this one. Nevermind

5) I am afraid i already know the answer to this question, but alas, i will still ask. Is there any way to turn the windows the shell scripts are in 90*.... so text (even echo?) will run vertically? This is perhaps my biggest hope... please let it be a yes!!!

Here is my desktop as it stands right now... if these answers come back i hope to have it be a little more dynamic and informative!

Thanks everyone!

Picture1-2.png
 
This is what I got since I got Geektool installed today and gathered some inspiration in this thread :)



The weather icon and info I got from using this script
I told Geektool to change the miniwallpaper every 30 seconds choosen randomly from my wallpaper folder
The CD icon is from Coversutra

Edit:
Wallpaper is Grain
 
also my weather script is displaying today and tomorrow... can i change it to tomorrow and the day after tomorrow? but have each day have its own shell?
 
Learning the basics of Geektool has been my project for the day, and I think it has turned out quite well... Couldn't get Lynx to work in a stable way so I ended up using the curl command more with the yahoo weather site for weather.

Here's my current desktop, any criticism is welcomed:
 

Attachments

  • Screen Capture 2009-12-27 at 11.32.30 PM.jpg
    Screen Capture 2009-12-27 at 11.32.30 PM.jpg
    174.8 KB · Views: 377
Anyone written a script to extract information form last.fm?

Last played tracks or top artists etc?
 
Fraylling posted this script, but I want it to display the progress bar *only* when something is playing (not paused, stopped, whatever).
Since my Applescript skills are non-existent, could somebody please help?

Code:
--- change the max number of dashes to determine length of the progression bar
set maxNumberOfDashes to 24
property go1 : false
tell application "System Events"
	set the process_flag to (exists process "iTunes")
end tell
if the process_flag then
	tell application "iTunes"
		set playerstate to (get player state)
		if playerstate = paused then
			set trackPaused to " (paused)"
		else
			set trackPaused to ""
		end if
		if playerstate = stopped then
			return ""
		end if
		set trackID to the current track
		set trackPosition to the player position
		set trackLength to the duration of trackID
		set theStream to the current stream title as text
	end tell
	
	if theStream is not "missing value" then
		set totalData to ""
		repeat maxNumberOfDashes times
			set totalData to "■" & totalData
		end repeat
		return totalData
	end if
	set numberOfDashes to (trackPosition / trackLength) * maxNumberOfDashes as integer
	set totalData to ""
	repeat numberOfDashes times
		set totalData to "■" & totalData
	end repeat
	return totalData
end if
end

Also, I have this really cool idea and have some ideas how I could achieve it but again lack the skills.

Take this screenshot:
Screenshot3small.png


I want my miniwallpaper shown as if it was behind torn paper like this example in the red area (but a widescreen version of 480 * 270 (or much larger so anybody could scale it to their needs)).

My idea is that I would take a piece of my blue wallpaper, photoshop it like torn paper with a transparant area (like the red in the example) where I want the miniwallpaper shown, overlay it with Geektool and place the miniwallpaper behind the overlay so the transparency would create the effect like shown in the istockphoto example in the red area.

Anybody up to the challenge? :D
 
Learning the basics of Geektool has been my project for the day, and I think it has turned out quite well... Couldn't get Lynx to work in a stable way so I ended up using the curl command more with the yahoo weather site for weather.

Here's my current desktop, any criticism is welcomed:

Jon-Luke nice setup ;-)
but there is something wrong with you calendars XD
you'll see after December 2009 come january 2010 and not january 2009

just a small thing you've missed ;-)
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.