Grab picture of the day with Spry?
Hi,
I want to grab the picture of the day from:
nasa APOD site
and make that picture spry-fade in on my web page. Since I
don't know how big the picture will be I need the frame to auto
size or use spry shrink/grow to set pixel size??
Not sure how to proceed.
You can only request AJAX data from the same domain as your
Spry page.
Therefore, you will need to use a server side component to
get the APOD image and then use that for your data source.
You can use their RSS feed to get the URL, but they don't
provide the image height and width, so you will have to make it a
standard size, or let your CSS layout autosize for it.
Similar Messages
-
NASA's Astronomy Picture of the Day & iCal
I have set up an automator workflow to have NASA's Astronomy Picture of the Day (APOD) as my desktop image. It would automatically change each day via iCal. AWSOME PICTURES, by the way.
I have a snag . . . iCal isn't running the workflow . . . I had to use spotlight & click on the application to start the workflow today.
To originally set this up, I selected "iCal Alarm" from the plug-in list so that Automator can create an appointment for this workflow as a daily event. I chose 3:00 AM as the start time.
I checked iCal preferences, and found the "day" start & end times where 8 AM & 6 PM. Could this be the reason why the workflow didn't start when I turned my computer at 5 AM today?
Also, I'm Wireless, & connect to the internet manually each time . . . I'm wondering if the workflow gets snagged because I don't have an internet connection automatically with start-up?
KenMackay
1.25 GHz Power Mac G4; 1.33 GHz G4 iBook Mac OS X (10.4.3)The Automator, as plug in, and iCal works perfectly at the alotted time. The only snag is that I have to be internet connected at the time the program is sheduled to run. I am wireless, & opt to manually "click in" to the internet at each start up. So, if I start up the computer
ii after the scheduled workflow start
, the Automator kicks in immediately to play catch up, but quites as soon as it can't connect to the URL . I can't connect to the internet fast enough, manually, to accommodate the Automator workflow.
I'm wondering if I have my wireless connection
ii connect
at start up, Automator won't be interupted & the APOD will appear at start up, even if I start my computer a little
ii after
the iCal workflow start.
Kenmackay
1.25 GHz Power Mac G4; 1.33 GHz G4 iBook Mac OS X (10.4.2) -
Random astronomy picture of the day
Not sure where to put this, I found a script on t'internet for downloading today's APOD and setting it as the gnome background. I then modified it to:
a) fix it to work with gif images as well as jpgs.
b) add xfce4 compatibility
c) get a random image instead of todays image
#!/bin/bash
#Filename: apodwallpaper
#Location: ${HOME}/.bin
#Purposes: Downloads NASA Astronomy Picture of the Day and displays it as the
# GNOME background
#Author(s): acvwJosh of Ubuntu Forums, modified by Colin Dean <http://cad.cx>
## Modified by deicist of ARCH linux forums: added xfce4 support, added .gif support, added random support
## requires athena-jot package from AUR
##random stuff goes here
##start date is a cutoff year to get images after. I use this because most pre-2000 images are too small to make good desktops
STARTDATE="2000";
NOW=$(date +%Y);
randYear=$(jot -r 1 $STARTDATE $NOW);
randMonth=$(jot -r 1 01 12);
randDay=$(jot -r 1 01 28);
getDate=$(date -d $randYear/$randMonth/$randDay +%y%m%d);
#change this if you want the image to be in a different directory
FILENAME=apodwallpaper
APODWALLPAPER=${HOME}/.${FILENAME}
#remove directory if it exists
rm -rf ${APODWALLPAPER}
mkdir -p ${APODWALLPAPER} && cd ${APODWALLPAPER}
# download image from apod site
wget -A.gif -A.jpg -R.txt -r -l1 --no-parent -nH http://apod.nasa.gov/apod/ap$getDate.html
# move image from obscure folder to main folder, rename image
find ./apod -name "*.gif" -or -name "*.jpg" | while read line ; do
mv "$line" "${FILENAME}.jpg"
done
#######uncomment next 3 lines for gnome
#gconftool-2 -t string -s /desktop/gnome/background/picture_filename "blank.jpg"
#gconftool-2 -t string -s /desktop/gnome/background/picture_filename "${APODWALLPAPER}/${FILENAME}.jpg"
#gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"
######uncomment next line for xfce4 -primary display
#xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ""
#xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${APODWALLPAPER}/${FILENAME}.jpg"
#xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s 3
#uncomment next line for xfce4 -secondary display
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor1/image-path -s ""
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor1/image-path -s "${APODWALLPAPER}/${FILENAME}.jpg"
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor1/image-style -s 3
# Uncomment ONE of the following for use with feh (thanks to SkonesMickLoud)
#feh --bg-tile "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-center "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-scale "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-seamless "${APODWALLPAPER}/${FILENAME}.jpg"
#get rid of cruft
rm -rf apod robots.txt
Last edited by deicist (2009-03-26 22:29:14)If you'd like to add it, the following works with feh:
# Uncomment ONE of the following for use with feh:
#feh --bg-tile "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-center "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-scale "${APODWALLPAPER}/${FILENAME}.jpg"
#feh --bg-seamless "${APODWALLPAPER}/${FILENAME}.jpg"
Also, line 26 should read rm -rf ${APODWALLPAPER} as ${APODWALLPAPER} is a dir, and most users would (probably) want to avoid confirming the removal of it every time.
I also get this error, even though everything seems to work:
./apodwallpaper.sh: line 15: jot: command not found
./apodwallpaper.sh: line 16: jot: command not found
./apodwallpaper.sh: line 17: jot: command not found
Jot isn't in the repos or AUR, is there an alternative?
Last edited by SkonesMickLoud (2009-03-26 17:39:51) -
I have an IPhone 4 which I just updated with the latest software, which put in it in Recovery Mode. It has the picture of the plug with ITunes, I downloaded it now its saying its in Recovery Mode, how do I save all of my previous data without Restoring?
I updated the phone before backing it up on iTunes, now the update wanted me to connect the phone with iTunes and it says the phones in recovery mode and it must be restored before its used with iTunes. I go to click restore and it says it will reset it to factory default and I'll lose all my current data. I have all my sons pictures and videos along with this notes. I can't lose all of this data! Please help!You have to restore the iPod, no ifs, ands, or buts...
After iOS is installed you will be asked if you what to set it up as a new iPod or if you want to restore from a backup.
If you have a good backup you can restore that and you're good to go.
If you don't have a good backup, then you end up with a "clean" iPod.... -
Picture of the day (Thread)
Please share your pictures of the day!
You can share as much as you like. You can share your music as pictures, your trip, your bike etc.
For great start, my picture is here!
Houkkalammi lake in Lempäälä, Finland. 16.11.2014.Hey there.
I enjoy a lot to make photos... so here my another set.
1. Spotify in our Municipality center / commune :) Spotify <3
2. Our village at it's best ;)
Don't you think Finland is cozy place? :P
Greetz! -
I upgraded to iOS 5.0.1 yesterday, and now my battery life has really deteriorated since.I was making it thru the day with about 70% battery life left. It is now 3:30 and I'm already down to 50%. The upgrade worsened my situation. Any help out there?
I had the battery problem. I upgraded the to iOS 5.0.1 last night and at least that problem seems to have been fixed. However, the problem with no audio on phone calls remains. Have not tried swapping the SIM card yet. The ATT guy says that they have resolved 90% of the no audio issues with a new SIM card. Not sure athat what has to do with anything but will try that first before requesting a replacement phone.
-
After a Firefox update, somewhere in the last 3 to 4 months when it comes up on my home page, which is Bing, if the picture of the day is a short video loop, which occurs 3 to 5 times a month, the video will not play. I have activated the control that says if a picture is a video, play it but this makes no difference. I have checked this out by running Internet Explorer, which also has Bing as my home page, and the short video loops run. I have also noticed that if the picture of the day is a video loop, the picture on Firefox is a different view of the same photo that is on Internet Explorer besides also not animating. Why is this? The latest video loop on Bing was yesterday (February 11). It did not animate on Bing and is a different view of the scene.
Did you check the Bing settings for the home page?
*http://www.bing.com/account/homepage
Videos and panoramas:
*Choose what happens when the homepage image is a video or panorama.
**Play automatically
**Don't play automatically
**Show a still image -
Does anyone know what happened to the app "Picture of the Day?" I believe it was a National Geographic app, but it disappeared from everywhere..thanks for the help!
It may have been removed by the creator or the Apple iTunes team for various reasons.
-
i turned my ipod off while it was udating the software (oops) now all it shows on the screen is a picture of the cord with an arrow pointing up to itunes. please help.
What happens when your connect the iOS device to your computer and restore via iTunes.
Try DFU mode and then restore if necessary.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
For how to restore:
iTunes: Restoring iOS software -
After downloading IOS 7.1.1 on my ipad, it will neither boot up nor shut down . it maintains a picture of "itunes" phrase with a picture under that of the plug and cord pointing toward the phrase. It is stuck!
It is restored now. Thanks for the comment about disabling firewalls - we did that and tried again and it worked.
-
Needing to get back to the beginning with Spry
I am very new to Dreamweaver and have been learning about it
through playing with it. I've got a really good idea now of how to
get the look that I am wanting with Spry, but I have screwed it up
way beyond my ability to repair. My problem is that I can't figure
out for the life of me if and how to get to the default settings
again. Any suggestions and experience would be greatly
appreciated.It sounds like you have updated files in the SpryAssests
folder. You
should never touch those files -- always override them
instead.
To restore them to the original, do this:
1. Look in the SpryAssets folder and make note of all of the
files there
2. Rename the SpryAssets folder to SpryAssetsOld. DW will ask
if you
want to Update Links: answer NO (or Cancel).
3. Create a temporary page and insert 1 of each type of Spry
Element
that you use on your Site.
4. Save the temporary page and DW will recreate the
SpryAssets folder.
5. Compare the new folder with the old one and repeat step 3
if necessary.
HTH,
Randy
> I am very new to Dreamweaver and have been learning
about it through playing
> with it. I've got a really good idea now of how to get
the look that I am
> wanting with Spry, but I have screwed it up way beyond
my ability to repair.
> My problem is that I can't figure out for the life of me
if and how to get to
> the default settings again. Any suggestions and
experience would be greatly
> appreciated. -
How to download pictures from the web with their URLs?
How do you download pictures from the Web so that they automatically have their URL addresses in their "Comments" section of the Get Info window? I thought Safari did this automatically, but it's not happening for me.
Graham--
When you say to open the image in another window, do you mean another Safari window? When I do and right click on the image, I don't get the "Inspect Element" option. I have tried your other suggestion, and that doesn't work either.
So.... I'm still puzzled...
I am also working in the same version of Safari (4.0.4) but this may be because I have the "Develop" menu (between Bookmarks and Window). If you do not, that will not be available to you. I can tell you how to get this, but as a newer user, this may be (for now) more information than you want.
However, if you do open that image in a new window, the toolbar will display the URL of the image.
As to the other solution, I may not have explained this clearly enough. Let me suggest another route to the same idea. With an image in a web page, drag it to the desktop. When it is on the desktop, highlight the image (click once) and then use the Finder > File menu and the item, Get Info. The large panel that opens will give the URL and this works for any file downloaded from the internet, which makes it a useful security check too.
All the best. -
My Apple TV white light on the front of the box flashes continously.There is no response from the remote.
On the TV there is a picture of an appleTV box with a USB cable and an I-Tunes logo.
I do not have a micro usb cable.Is the only route to fixing this problem to download syestem software via my PC
and I-Tunes?Welcome to the Apple Community.
If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
Connect the micro USB cable to the Apple TV and to your computer.
Reconnect the power cable (only for Apple TV 3)
Open iTunes.
Select your Apple TV in the Devices list, and then click Restore.
(You may already have a micro USB cable if you have a camera or other digital device) -
Opening pictures from the desktop with iphoto
Hey guys,
When I download pics onto my desktop (or anywhere else for that matter) (say a friend skype me some pics) and i want to open them with iphoto to store them in the relevant roll or album, i have to go through all the hassle of :
-ctrl click
-open with
-other
-look for iphoto in the list of programs
Is there any way I can put iphoto directly in the list of program i get by ctrl clicking on a picture file? The only think i can think of is "always use this program", but then again i don't always want to do that...
Thanks a lot! It would save so much time in the end...You can also import a complete folder of jpegs by drag and drop.
Its slightly trickier but will work. Some practise may be needed.
Select the library and scroll down to the bottom of the album pane. Pick up the folder and move the mouse pointer to a spot to the right of the Trash and between the lowest album and the one above. When a black line apears around the entire album pane just relase the folder and it will be imported as a complete album bearing the folder name. -
How to calculate the days with a date field
I need to make a query that shows the number of flown days at the end of the month for the whole fleet, given a date that represents one day within that month.
I would appreciate all the help I can get
thanks in advanceHi,
I am not sure if I interpreted your question correctly, but are you looking for counting for number of days between two days?
If yes, see if the following example query helps you.
SQL>select to_date('30-Jun-2003') - to_date('30-May-2003') from dual
- this returns 31.
If not, could you please give more details of your requirement with an example?
-Savitha.
Maybe you are looking for
-
I have a Nano 5G and I usually prefer it over my iPhone when working out mostly due to the small size and weight. However it no longer seems to sync contacts with my Mac running ML. How can this be fixed? Do newer iPod Nano's sync or is apple trying
-
Deskjet 3050 all-in-one J610 series Displays "scan error-Try scan from computer"
Running I-Mac Lion. Have scanned in the past without problem. Today went to scan and "Scan Error Try scan from computer" appears on display. Why? How to correct the problem? HELP PLEASE
-
DVD Player not recognized by computer
Have Split x2 Windows 8.1. Have loaded software for LG Super Multi Blade DVD player. No autoplay. Works on another computer. This question was solved. View Solution.
-
Select statements in smartform
Hi All, what happens if u use lot of select statements in smartform rather than in driver program... regards, P.Ramesh.
-
Drum mapping out since 10.1
For some reason my drum mapping is all over the place on all of my compositions since upgrading to 10.1. Is anyone else experiencing this issue? I really don't want to have to re-map everything back into place. The only other thing that's changed rec