Coder Social home page Coder Social logo

easly1989 / daily-reddit-wallpaper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from federicotorrielli/daily-reddit-wallpaper

0.0 1.0 0.0 190 KB

Change your wallpaper to the most upvoted image of the day from /r/wallpaper or any other subreddit on system startup

Home Page: https://federicotorrielli.github.io/Daily-Reddit-Wallpaper/

License: GNU General Public License v3.0

Python 100.00%

daily-reddit-wallpaper's Introduction

Daily Reddit Wallpaper

Build Status

This script changes your wallpaper to most upvoted image of the day on /r/wallpaper or from any other subreddit.

Run it on startup for new wallpaper on every session.

Supported: Linux (gnome, kde, mate, lxde), Windows and OS X

Dependencies

Make sure you have Python3 installed and PATH variable set.

Ubuntu

If you don't have pip for Python:

sudo apt-get install python-pip

You will need modules requests and praw installed, which are in requirements.txt:

pip install -r requirements.txt

Arch

If you don't have pip for Python:

pacman -S python-pip

or, with yay:

yay -S python-pip

Then just install the requirements.txt with:

pip install -r requirements.txt

Windows

Follow this guide to install pip and configure PATH variable. The rest is the same.

Using script

First, you'll need to configure the credentials.json file with your personal Reddit API. Your api_key will be the Reddit API secret and your client_id the first and smaller code:

Reddit API

Then, in the current project folder, run:

python change_wallpaper_reddit.py

If you wanna use other subreddit, include argument with the subreddit name:

python change_wallpaper_reddit.py --subreddit art

If you don't want to change your wallpaper daily, you can use newest, hourly, weekly, monthly or yearly wallpaper too by adding one of the following arguments: new, hour, week, month, year to the script.

Example:

python change_wallpaper_reddit.py --time week

NSFW images are disabled by default, to enable them add --nsfw.

On OS X, you can specify display number with option --display. Use 0 for all display (default), 1 for main display and so on.

To change default location where image will be saved, use --output folder/subfolder.

Running on startup

Ubuntu

To make managment of the script simple, we can accomplish this using built-in Startup Applications.

Startup Applications

Click on Add.

Add new startup command

Note: you can use --subreddit and --time arguments here aswell.

Windows

We will be using Task Scheduler for this. You can find it in Windows search. Once you open it, click on Create Basic Task Follow the procedure.

Procedure

Procedure

Procedure

Procedure

In Add arguments field type the location of the script. Example

"D:\change_wallpaper_reddit.py"

or

"D:\change_wallpaper_reddit.py" --subreddit art --time week

Running every minute or hour

Look into using cronjobs on Linux or Task Scheduler on Windows for performing this.

Configuration file

Instead of writing arguments every time you run the script, you can also use configuration file which should be located at ~/.config/change_wallpaper_reddit.rc.

Example of configuration file:

subreddit=art
time=day

daily-reddit-wallpaper's People

Contributors

ssimunic avatar federicotorrielli avatar zwparchman avatar joesanford avatar krabby127 avatar yeonsh avatar wynro avatar naps62 avatar silencecm avatar ouo avatar remggo avatar troeggla avatar acidduk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.