b3rew / Reddit-Wallpapers

Quick node script to download top images from selected subreddits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reddit-Wallpapers

Quick node script to download top images from the past week in selected subreddits. Edit the download directory in wallpaper.js and then set your OS wallpaper settings to shuffle images from that same directory. Images that already exist locally are skipped over.

Installation

Node.js is required to run this script.

$ git clone https://github.com/reganface/Reddit-Wallpapers.git
$ cd Reddit-Wallpapers
$ npm install
$ node wallpaper.js

Run this manually every so often for new images, or schedule it to run once a week.

Scheduling

On Windows, use Task Scheduler to create a weekly task. You'll need to create a .bat file in your Reddit-Wallpapers directory with the following line in it.

node wallpaper.js

Have Task Scheduler run this .bat file once a week.

On Linux and Mac you can use your crontab to run this script

$ crontab -e

Add the folling line to run every Monday at 8pm

0 20 * * 1 /usr/local/bin/node /path/to/script/Reddit-Wallpapers/wallpaper.js

Customizing Subreddits

Any number of subreddits can be scanned. Just modify the subreddits array near the top of wallpaper.js

// subreddits to check
var subreddits = [
	"/r/wallpaper",
	"/r/wallpapers",
	"/r/EarthPorn",
	"/r/EyeCandy",	// this one doesn't have much from imgur it seems
	"/r/topwalls",
	"/r/MinimalWallpaper",
	"/r/GameWalls"
];

About

Quick node script to download top images from selected subreddits


Languages

Language:JavaScript 100.0%