Thursday, June 17, 2021

NASA-APOD Wallpaper

 Things on the Internet are too cool sometimes! 

NASA APOD (Astronomy Picture of the Day) is a very popular API that provides data in JSON format with URLs, Details and much more. Here, I have tried to set that APOD High-Quality image as my Wallpaper for my Desktop.

It is to be noted that this works with GNOMEs and I am not sure with other environments. Maybe a little tweaks would help it.

How is it done?

 1. NASA-APOD url is requested and the content from the response is obtained

2. JSON library in python is used to convert it into dictionary form to make it easier to work with.

3. If the APOD is a Image-type Media, then, It is downloaded and saved in a directory

4. This image is set as the wallpaper using few OS commands

CODE CAN BE FOUND HERE

No comments:

Post a Comment