

- #Nasa picture of the day wallpaper program code#
- #Nasa picture of the day wallpaper program free#
- #Nasa picture of the day wallpaper program windows#
Since the advent of YouTube, NASA has decided that videos are allowed on the 'Astronomy Picture of the Day', which is nothing short of heresy for the sake of correctness. My desktop changes to some unique latest imagery of space, and I pop up a text file with the description for further appreciation. Here I have put my script on a schedule to run every day at 0900 EST where I'm due for my second cup of coffee anyways.
#Nasa picture of the day wallpaper program windows#
However, for the more accessible route to the non-techies, Windows has Task Scheduler. The last thing we need to do is put this all in a single script and make sure it executes every day. SystemParametersInfoW ( SPI_SETDESKWALLPAPER, 0, path, SPIF_UPDATEINIFILE ) join ( path, 'apod.bmp' ) print ( path ) ctypes. SPI_SETDESKWALLPAPER = 20 SPIF_UPDATEINIFILE = 0x2 path = os.
#Nasa picture of the day wallpaper program code#
Code 20 is to set the desktop wallpaper and 0x2 ensures that the change happens immediately. Using the Ctypes library, you can access DLLs that execute on the OS, specifically for our case is the SystemParameterInfo (SPI) Function in case you would like to learn more. But Pythons OS and Ctypes have ways to work with Linux and macOS as well. The next part is Windows-specific for me, as soon as someone tells there is a decent Word processor for a *NIX environment, I will gladly move.

APOD delivers a title, picture, and explaination upon request, providing us with a lovely tidbit of information while sipping our morning coffee. urlretrieve ( apod_url, "./apod.jpg" ) print ( resp ) print ( resp ) print ( resp ) print ( apod_url ) Request.Ī simple HTTP library for python, insert params (in this case API_key and date) put it in the URL and you get all responses. Register for your key, and lets start hacking.
#Nasa picture of the day wallpaper program free#
Plenty of web-scraping tools exist, such as Beautiful Soup, but why do something tedious when NASA allows free API usage for their services (with limits) at. Making a simple python script, we can grab the image from the site, use some OS tools to set it, and put it on a schedule. We're going to make NASA's Astronomy Picture of the Day our desktop background every day How? Once I rediscovered the portal to universe partially paid by my hard-earned taxpayer dollars, I wanted to capitalize on all of the beauty it has to offer with minimal waste of time and, better yet, not worry about forgetting ever again! That's why you're here. Life gets busy, you leave your computer for some godforsaken reason, get married, step outside to see the real world, and you forget to visit one of the most excellent websites ever made. After years of routinely getting lost on the APOD website, finding galaxies I liked, right-click, save as set as desktop background, an awful tragedy happened to me. The pictures are always stunning, with a description to help you out if you don't know what the hell you're looking at. NASA released the Astornomy Picture of the Day (APOD) 26 years ago by the day of this article (release date June 16th, 1995)! The site has been maintained and updated through the evolution of the internet to show the world the magnificent wonders of nature, space, and man-made engineering feats. I have developed a small solution to at least keep my interest in space at the forefront of my daily life, if for even just a personal enjoyment. Currently, I work in the field of food process engineering and at times, it feels like I am lightyears away from the daily pursuit of increasing our understanding of space.

I went to space camp as a kid by myself, dammit, and it was AWESOME. The one thing that actually started me down this path above all was SPACE. I will go ahead and assume that if you are reading this, you have a slight interest in the sciences, maths, and engineering.
