Skip to content

A python script that downloads and sets top upvoted images on /r/EarthPorn as your wallpaper.

Notifications You must be signed in to change notification settings

segao/Landscrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Landscrape

A python script that downloads the top upvoted images from the nature and landscape subreddit, /r/EarthPorn, and sets it as your current OS wallpaper.

About

This script uses the existing Reddit JSON API. Instructions for its use can be found here. This particular Stack Overflow post helped me figure out the code to change a Mac wallpaper.

A custom directory path can be used, otherwise all images will be saved to '/Users/USERNAME/Pictures/EarthPorn Wallpapers'. An image will not be saved if it already exists.

Changing the JSON URLs to another image based subreddit should fetch the top posts from that specific subreddit. Click here to view the Reddit API dev page for more information. The t parameter can be used to specify the time period of posts to display, while the 'limit' parameter will return a specific number of posts. Example:

http://www.reddit.com/r/earthporn.json?sort=top&t=all&limit=10

Usage

Download and set today's top post as wallpaper:

python landscrape.py

Download the top 25 posts of the last month and set the first as wallpaper using -dl. Add the directory to your System Preferences to allow automatic wallpaper changes.

python landscrape.py -dl

Display help message:

python landscrape.py -help

To Do

  • Allow exclusions based on image size/resolution
  • Allow user input to select various image subreddits
  • Test on Linux

About

A python script that downloads and sets top upvoted images on /r/EarthPorn as your wallpaper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages