New! APOD software

Introductions, Rules, Announcements, and Feedback
makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Mon Sep 26, 2005 3:14 pm

I'll get back to you tomorrow.

lode
Asternaut
Posts: 6
Joined: Sun Sep 25, 2005 12:07 am

Post by lode » Mon Sep 26, 2005 5:18 pm

makc wrote:I'll get back to you tomorrow.
Ok. Thanks for your help!

makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Tue Sep 27, 2005 8:30 am

Create file c:\1.html, and paste this code into it:

Code: Select all

<body bgcolor=black><table width=100% height=100%><tr valign=middle><td><img id=im src="" width=100%></td></tr></table></body>
<script>

d = new Date()
yy = d.getFullYear().toString().substr(2)
mm = (d.getMonth()+1 > 9) ? (d.getMonth()+1).toString() : ("0"+(d.getMonth()+1).toString())
dd = (d.getDate() > 9) ? d.getDate().toString() : ("0"+d.getDate().toString())
site_url = 'http://antwrp.gsfc.nasa.gov/apod/ap' + yy + mm + dd + '.html'

var xhttp = new ActiveXObject("MSXML2.XMLHTTP");
xhttp.Open("GET", site_url, false);
xhttp.Send(); html = xhttp.ResponseText

// this parser is likely to fail if anything changes,
// but today it works
i1 = html.toLowerCase().indexOf("a href=\"image")
html = html.substr(i1 + 8)
i1 = html.indexOf("\"")
html = html.substr(0, i1)

im.src = 'http://antwrp.gsfc.nasa.gov/apod/' + html
</script>
Then, go to desktop properties and set 1.html as your background. Voila:

Image

8)

This works on my XP Pro/2002. I have many programming software installed, so there's a chance you are missing something I have. In this case, you may try to find it here, or forget it.

makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Wed Sep 28, 2005 6:18 am

today's APOD has broke the code above, since it was larger than my desktop. so I had to replace

Code: Select all

<img id=im src="" width=100%>
with

Code: Select all

<img id=im src="" width=1024>
, so now it looks just fine:

Image

did it work for you, btw?

P.S.: I am thinking about how do I get rid of those black bricks under icons (i.e., how to make text background transparent)?

lode
Asternaut
Posts: 6
Joined: Sun Sep 25, 2005 12:07 am

Post by lode » Wed Sep 28, 2005 11:16 am

Hi,

This works perfect! I realy appriciate you made this script :)

My resolution is 1400x1050, so I changed it into 1370 as width, that causes the black border to the right to appear as well as to the left. When I use 1400, the border at the right is gone. Now it looks very nice :)

I changed one other thing in the script, an anchor around the imgage. So now when I click my desktop I'm send to the main APOD site where I can read what this is.

About the transparent background, I don't know exactly. I though WinXP did that automaticly, but here I have the same problem.
One solution I can think of is just have less icons on my desktop, just clean it up a bit :)

William Roeder
Ensign
Posts: 59
Joined: Thu Jun 16, 2005 3:46 pm

Post by William Roeder » Wed Sep 28, 2005 4:03 pm

how do I get rid of those black bricks under icons
control panel/display/desktop/color allow you to change the color but unfortunately not the transparency.

Sternreisender
Asternaut
Posts: 3
Joined: Thu Nov 18, 2004 2:35 pm
Location: Michigan, USA
Contact:

Post by Sternreisender » Thu Sep 29, 2005 1:10 am

There is a program that allows you to do this, as well. APOD.
And fighting time, so hard I pray that this moment lasts forever.
And will the world stay standing still, at least for me.
Through my eyes stare into me, I bear my heart for all to see
With my face turned to the sun there ever standing still.

makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Thu Sep 29, 2005 11:04 am

Software/APOD wrote:You may not modify this software product in any way.
There's no source :(
William Roeder wrote:control panel/display/desktop/color allow you to change the color but unfortunately not the transparency.
True. Windows only makes it transparent if background image is bitmap. So, for this nice feature to work with APOD image, script would have to actually download (save to disk) an image, and then replace current background with it. Any other options :?:

Empeda
Ensign
Posts: 98
Joined: Wed Jun 29, 2005 8:31 am
Location: Dorset, England
Contact:

Post by Empeda » Thu Sep 29, 2005 11:18 am

....and it doesn't appear to do anything either... :(

Makc - do you think it might be an idea to put the script on the forum as a sticky? I suspect a lot of people would like to use/update it?
I'm an Astrophysics Graduate from Keele University, England - doesn't mean I know anything but I might be able to help!

makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Fri Sep 30, 2005 6:24 am

lode wrote:...the black border to the right to appear as well as to the left. When I use 1400, the border at the right is gone...
Here's html update to fix borders:

Code: Select all

<body bgcolor=black style="margin:0; border:0;"><table cellpadding=0 cellspacing=0 width=100% height=100%>
Image
Empeda wrote:...it might be an idea to put the script on the forum as a sticky... I suspect a lot of people would like to use/update it
Give me a good suggestion on transparency issue, and I will stick it.

stray
Asternaut
Posts: 1
Joined: Sat Sep 02, 2006 10:11 pm

APOD needs a feed!

Post by stray » Sat Sep 02, 2006 10:14 pm

I love APOD (long time viewer, new forums subscriber), but it really, REALLY needs an RSS or Atom feed. That way, people can see a new APOD every day right in their feedreaders and update automatically. Heck, one could even write a script to make a person's desktop the APOD.

User avatar
BMAONE23
Commentator Model 1.23
Posts: 4076
Joined: Wed Feb 23, 2005 6:55 pm
Location: California

Post by BMAONE23 » Sat Sep 02, 2006 11:26 pm

http://asterisk.apod.com/vie ... 309390b99d

Stray,
This thread has what you were talking about for your desktop.


Welcome to the food chain

CharlesBell
Asternaut
Posts: 4
Joined: Wed Aug 30, 2006 1:22 am
Contact:

Post by CharlesBell » Sun Sep 03, 2006 12:34 am

There is a freeware program which will set you windows desktop to the current APOD every day.

I use it to see and learn something new everyday.

astro_uk
Science Officer
Posts: 304
Joined: Sat Aug 12, 2006 5:59 pm

Post by astro_uk » Sun Sep 03, 2006 10:49 am

There is a desktop widget for the mac that also updates apod daily.

kev1701e
Asternaut
Posts: 1
Joined: Sun Sep 03, 2006 9:31 pm

Post by kev1701e » Sun Sep 03, 2006 9:34 pm

Here's the one I use:

http://www.acme.com/jef/apod/rss.xml


kev

silentway
Asternaut
Posts: 2
Joined: Mon Nov 20, 2006 8:58 pm
Location: San Francisco

Post by silentway » Mon Nov 20, 2006 9:11 pm

Thanks, kev1701e. The RSS feed is a good call.

Has the idea been raised to add an APOD Photocast? (A forum search yielded nothing.)

It's a special type of Blog that people can subscribe to via any RSS-compatible browser or RSS reader. The bonus is that if the subscriber has a Mac it will update right within their iPhoto 6 app. I think it takes a Mac to create, but can be read by anyone, PC or Mac. PC users just see it as a regular RSS feed. (I have not tried it myself though... anyone?)

http://www.apple.com/ilife/iphoto/featu ... sting.html
http://docs.info.apple.com/article.html ... n/pc2.html
http://docs.info.apple.com/article.html ... lp295.html
http://www.macworld.com/2006/06/feature ... /index.php

Heck, I bet with the right connections, Apple would pay to do it... it would be a great example of the otherwise under-utilized Photocasting concept.

btw, the PC desktop app doesn't have any option to view or download pics except putting it on your desktop.
Last edited by silentway on Wed Nov 22, 2006 10:44 pm, edited 1 time in total.

CharlesBell
Asternaut
Posts: 4
Joined: Wed Aug 30, 2006 1:22 am
Contact:

Post by CharlesBell » Tue Nov 21, 2006 4:18 pm

The link to the installation zip file is

http://nightskylive.net/software/apod/apod_inst.zip

silentway
Asternaut
Posts: 2
Joined: Mon Nov 20, 2006 8:58 pm
Location: San Francisco

Post by silentway » Wed Nov 22, 2006 10:42 pm

I looked into photocasts some more, and it looks even better. First, folks don't need to have a Mac or use iPhoto to subscribe to a photocast. Windows users can join the party too:
http://www.macosxhints.com/article.php? ... 6102750285
http://www.macosxhints.com/article.php? ... 4005259361

Then, how to create a photocast for free, without paying for Apple's .Mac hosting service:
http://www.macosxhints.com/article.php? ... 2055330166
http://www.bubbleshare.com/

Flikr is another possibility, a Flickr album's feed can be read as a photocast using these free translators:
http://phlikr.3xi.org/
http://photocastr.com/
http://www.flickr.com/forums/ideas/1710 ... =photocast

Hueznar
Asternaut
Posts: 2
Joined: Sun May 27, 2007 1:45 am

Code not longer working

Post by Hueznar » Sun May 27, 2007 1:55 am

makc wrote:Create file c:\1.html, and paste this code into it:

Code: Select all

<body bgcolor=black><table width=100% height=100%><tr valign=middle><td><img id=im src="" width=100%></td></tr></table></body>
<script>

d = new Date()
yy = d.getFullYear().toString().substr(2)
mm = (d.getMonth()+1 > 9) ? (d.getMonth()+1).toString() : ("0"+(d.getMonth()+1).toString())
dd = (d.getDate() > 9) ? d.getDate().toString() : ("0"+d.getDate().toString())
site_url = 'http://antwrp.gsfc.nasa.gov/apod/ap' + yy + mm + dd + '.html'

var xhttp = new ActiveXObject("MSXML2.XMLHTTP");
xhttp.Open("GET", site_url, false);
xhttp.Send(); html = xhttp.ResponseText

// this parser is likely to fail if anything changes,
// but today it works
i1 = html.toLowerCase().indexOf("a href="image")
html = html.substr(i1 + 8)
i1 = html.indexOf(""")
html = html.substr(0, i1)

im.src = 'http://antwrp.gsfc.nasa.gov/apod/' + html
</script>
Then, go to desktop properties and set 1.html as your background. Voila:

Image

8)

This works on my XP Pro/2002. I have many programming software installed, so there's a chance you are missing something I have. In this case, you may try to find it here, or forget it.
Hi, I was looking for a way to capture APOD image for my personal web, and I've found this code but is not working for me. I followed all steps but is not longer working.

Any idea to fix the problem?.

Thanks in advance.

makc
Commodore
Posts: 2019
Joined: Tue Oct 12, 2004 5:25 pm

Post by makc » Wed Jun 06, 2007 1:24 pm

There can be two problems with above code:
1. it is IE specific;
2. it is subject to cross-domain browser security restrictions (and therefore works off your PC only, and not off the web).
It was meant to bring APOD to your desktop, not to your webpage. To put it on your webpage, you could:
1. either rewrite the code above into server-side language like PHP;
2. or use link from this post (by "ckam" :) warning: it redirects to FULLSIZE image).
I might spare some time to do 1 later (probably MUCH later).

EDIT: while trying to do 1, I was looking for an image to show whenever there are any errors, and found this:
Image
which makes option 3 that you can use on your site this way:

Code: Select all

<a href="http://antwrp.gsfc.nasa.gov/apod/" alt="APOD"><img src="http://antwrp.gsfc.nasa.gov/apod/calendar/today.jpg" /></a>

KerryBarger
Asternaut
Posts: 7
Joined: Mon Oct 08, 2007 6:14 am
Location: Texas
Contact:

Problem with Desktop Background

Post by KerryBarger » Mon Oct 08, 2007 6:34 am

I am a daily viewer & absolutely love the pictures that appear regularly as my desktop background. I usually try to view the explanation of the photo/s and sometimes I even grasp elements of the detailed explanation...(HA!) :roll:
However, the explanation headline always overlaps the first line of the script and is barely legible. When I am curious enough about reading the explanation, I go to the APOD website where I can actually read the first sentence of the explanation, but this should not be necessary everyday for everyone who uses this wonderful program as many of my friends do. I was not sure if anyone on your APOD team is aware of this glitch and have been wanting to bring this to someone's attention who can correct this daily flaw in the APOD desktop background. Possibly this is a problem with my PC, but I've made all the application ajustments I could find & none worked. I signed on to this forum specifically to try to get this annoying problem corrected. Please advise.
Kerry Barger

User avatar
geckzilla
Ocular Digitator
Posts: 9180
Joined: Wed Sep 12, 2007 12:42 pm
Location: Modesto, CA
Contact:

Post by geckzilla » Mon Oct 08, 2007 12:18 pm

It might have something to do with the fact that APOD uses paragraph tags but never actually closes them... bad html.

KerryBarger
Asternaut
Posts: 7
Joined: Mon Oct 08, 2007 6:14 am
Location: Texas
Contact:

bad HTML ??? Paragraph tags ???

Post by KerryBarger » Mon Oct 08, 2007 7:15 pm

Sorry, I don't understand... Is this something I can correct or change?

User avatar
geckzilla
Ocular Digitator
Posts: 9180
Joined: Wed Sep 12, 2007 12:42 pm
Location: Modesto, CA
Contact:

Post by geckzilla » Mon Oct 08, 2007 7:58 pm

No.

User avatar
Qev
Ontological Cartographer
Posts: 576
Joined: Wed Mar 08, 2006 8:20 pm

Post by Qev » Tue Oct 09, 2007 6:13 am

Which browser software are you using, btw?
Don't just stand there, get that other dog!

Post Reply