WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Astronomy Picture of the Day  (Read 4362 times)

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Astronomy Picture of the Day
« on: November 05, 2011, 11:27:54 AM »
A site that I regually visit is http://apod.nasa.gov
So just for fun I though to make a downloader to save the picture of the day into /opt/backgrounds so that I may use it as my wallpaper.

Code: [Select]
#!/bin/sh
# Download Astronomy Picture of the Day
VIEWER="flpicsee"
URL="http://apod.nasa.gov/apod"
PIC="$(wget -O - $URL/astropix.html 2>/dev/null | grep '<a href="image')"
[ "$?" == 0 ] || exit 1
PIC="${PIC#*\"}" && PIC=${PIC%\">} && EXT="${PIC##*.}"
POD="/opt/backgrounds/astropic.$EXT"
wget -q -O "$POD" $URL/$PIC
[ "$?" == 0 ] || exit 1
[ $(which "$VIEWER") ] && "$VIEWER" "$POD" &

Note that I have set VIEWER to flpicsee change to your preferred image viewer. Note too that I overwrite each day's picture. I don't want to fill up my limited space. So if you really want to keep a picture rename it!
10+ Years Contributing to Linux Open Source Projects.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Astronomy Picture of the Day
« Reply #1 on: November 05, 2011, 05:02:06 PM »
That's way too cool thanks  :)

Offline gadget42

  • Hero Member
  • *****
  • Posts: 822
Re: Astronomy Picture of the Day
« Reply #2 on: June 08, 2022, 12:21:58 PM »
three reasons for using a decade-old thread...

didn't want to start another new thread...
it was one of three results of searching for "astronomy"...
and more importantly, that webpage is still active(as of today anyways)...
(here is today's APOD: https://apod.nasa.gov/apod/image/2206/ShipTracks_Terra_4892.jpg)

Venus crossed the sun's face 10 years ago. Most people alive will never see the sight again. - space.com - Tom Kerss

snippet from slashdot:
https://science.slashdot.org/story/22/06/06/027208/remembering-the-transit-of-venus-on-its-10th-anniversary

space.com:
https://www.space.com/venus-transit-2012-skywatching-reminiscences
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline gadget42

  • Hero Member
  • *****
  • Posts: 822
Re: Astronomy Picture of the Day
« Reply #3 on: June 24, 2022, 11:49:32 PM »
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580