GithubHelp home page GithubHelp logo

keystroke3 / redpaper Goto Github PK

View Code? Open in Web Editor NEW
67.0 4.0 9.0 360 KB

A tool to download and set desktop wallpapers from Reddit

License: GNU General Public License v3.0

Python 98.87% Shell 1.13%
wallpaper desktop linux python3 python reddit themeing style looks personalization

redpaper's Introduction

Redpaper

Overview

Redpaper is a simple tool that is used to download and set new wallpapers.
It gets the images from reddit.com.

If you frequently search for, download and set wallpapers, or like to give you system
a new look, you this tool is for you. When you want to change the wallpaper, you simply
run Redpaper's download tool and it will scout Reddit for the best wallpaper of the
day and download them. You can then change the wallpaper using it.

Main Menu

Installation

If you are running Arch or Arch-based distro, you can install from aur: yay -S redpaper-git

Redpaper only works on Linux systems at the moment, therefor only people running Linux
can use it.

Dependencies

  • Python 3.6 or later
  • Python3-pip
  • Requests
  • Pillow
  • PyGObject
  • xwallpaper (only if you use tiling window managers)

Python3 should come by default on a Linux system, but if you are not sure if it is installed,
you can run python3 in your terminal. If you get no errors, then you can proceed. If you
get an error, you should visit python.org to get it.
Pip comes by default with Python. If for some reason you don't have it, you can run:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and then
python get-pip.py The other dependencies will be automatically installed.

Procedure

When the first two dependencies have been met, you can run the following command to do the install:
git clone https://github.com/keystroke3/redpaper.git && cd redpaper && sudo sh install.sh

Tiling window managers

If you are running a tiling window manager like i3, bspwm etc.. you will need to add this to your
autostart files e.g. ~/.config/bspwm/bspwmrc if you are using bspwm:
$HOME/.redpaper/wallapaper.sh
This line makes sure that the wallpaper you set will persist after logging in.

Usage

To use, simply run redpaper in the terminal. Once the installation is complete, you can use Redpaper in two ways, with command mode and with
and with interactive shell.

Interactive mode (TUI)

You can also run redpaper in interactive mode, that does not involve typing commands.
To actaivate this mode, simply run redpaper without any arguments to bring it up.

Command Line Mode (CLI)

You can run the redpaper command with arguments to perform tasks. You can also pass a file name, folder name or list of folder names that contain images, in the form redpaper FILE redpaper FOLDER1, FOLDER2... The list of arguments can be listed by running redpaper -h or redpaper --help

Options

flag name Descritpion
-d --download Downloads new wallpapers
-c --change sets the next image in list as wallapper. Sets the first one in the list after a the list has been updated or at EOL
-b --back Sets the previous image in the list as wallpaper
-a --all Download new wallpapers and set the first one
-l --limit LIMIT Number of wallpapers to look for. This is not the number of file that will be downloaded. A check is done to make sure the images are 16:9 aspect ratio or close to it. Default = 5
-p --path PATH Sets the download location for new wallpapers.
-i --image IMAGE Sets a specified image as wallpaper.
-r --sub STRING Sets a user specified subreddit(s) as source
-f --folder [FOLDER ...] Uses images stored in the specified folder. Multiple folders can be added
-s --settings change settings permanently. Use this in combination with other modifier flags to make them modifications permanent. E.g. redpaper -sl 10 will set the look up limit to 10.

Keep in mind that settings will be ignored when the alternative value is passed as an argument in command mode.
The behavior of the program can be slightly modified by the user. Currently, there are only
a few changes that can be made. The settings are:

Contributions

All input and contibutions are welcome. If you have a feature you want, you can ask for it in the issues tab. If you can help improve the code and add the feature, then fork the repo and create a pull request.

Leagal stuff

redpaper's People

Contributors

dependabot[bot] avatar keystroke3 avatar parrishjm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redpaper's Issues

Issue in wall_set.py

After the last committed change to wall_set.py redpaper crashed on line 56:

saved_walls = json.load(data)

due to data not be assigned before use.

This was on a default Kali Linux install. Changing methods still resulted in a error but this time due to attempting to use a closed file.

Package not a part of pypi

It looks like there isn't a name collision, so it would be great if it could be uploaded to pypi. Shouldn't take longer than 5 minutes.

That way it's just a simple pip install redpaper

Falsey strings

elif stay == "x" or "X":

if stay == "x" or "X":
    do_something()

is not the same as

if stay == "x" or stay == "X":
    do_something()

I recommend trying it out in your REPL to understand why (hint: strings are falsey -- as long as they are not empty, they return True, ie. if "c": will return True)
I recommend you change it to

if stay.lower() == "x":
    do_something()

This results in only one check and is clear of your intention.

EDIT: I can see you checked correctly in this line so maybe you just missed it. Seem to know what you're doing. Nice job on the project.

wall_data.json not found in .redpaper

Clean install with git, tried running redpaper but wall_data.json does not exist in the .redpaper directory, don't know if its supposed to be made with default settings. OS: Manjaro 18.0.4 w/ KDE & linux 5.2

Release to PyPI?

Hi there! Love this project.

It'd be really neat to see it published to PyPI -- looks like you have most of the work done already.

Cannot imort colors from utils

fattiejb@lenovo-80x8:~$ redpaper
Traceback (most recent call last):
  File "/usr/bin/redpaper", line 6, in <module>
    from utils import (
ImportError: cannot import name 'colors' from 'utils' (/home/fattiejb/.local/lib/python3.8/site-packages/utils/__init__.py)

I am a newbie, I know it says it can't import colors from utils, but how can I resolve it?

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.