Skip to content

sachinlodhi/Splasher_Full

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Splasher

Program to download and set wallpapers on windows from Unsplash

Ignore everything below if you are downloading exe file.

You have to download Splasher.exe and splash.png both to make this application work. This constraint would be removed in future.

Keep Splasher.exe and splash.png in same folder.


Table of Content

  • What
  • Why
  • How
  • Usage
  • Constraints

What?

This is a simple script written in Python to download the wallpapers of desired resolution and set as background on Windows(32bit/64bit).

Why?

I have been fascinated with the customization of the desktop environment, and one day, I was looking for an automatic wallpaper changer for Windows. After exploring many options, I could conclude that none of the options I tried were free or they had some different kinds of limitations. So, I decided to write a simple python script that would allow users to select the type of wallpaper from one of the biggest libraries of photos, i.e., UNSPLASH.

Check Unsplash here

Unsplash


How?

When I was exploring the idea of building something on my own then, I search for Unsplash API though I did not get exactly API for fetching wallpapers from Unsplash, but I found Source, which is built for small and low-traffic applications. Some use case scenario of Source is as follows:

  • Getting Random photo from specific User

Parameters

https://source.unsplash.com/user/{USERNAME}

Example

https://source.unsplash.com/user/erondu/1600x900
  • Getting Random photo from Collection

Parameters

https://source.unsplash.com/collection/{COLLECTION ID}

Example

https://source.unsplash.com/collection/190727/1600x900
  • Getting Photo from Random Search Term

Parameters

https://source.unsplash.com/featured/?{KEYWORD},{KEYWORD}

Example

https://source.unsplash.com/1600x900/?california,USA

*Optionally, to specify a size, place it after the base URL.

Read more about Source here

There were many more use cases but I employed last two depicted ones:

  1. From a random source With Search Terms
  2. From Random Collection ID

Usage

  1. Download the Zip file from the repository or clone the repository using following command in command prompt. Make Sure Git is installed.
git clone https://github.com/sachinlodhi/Splasher.git
  1. Extract the downloaded zip file to your desired location.
  2. Open command prompt at the same location where you just extracted the zip file.
  3. Now type the following command in command prompt:
pip install -r requirements.txt
  1. Once requirements are installed type the command according to the following usage syntax:
  • For using Random mode with tags
python [-s random] [-i Seconds OPTIONAL] [-t1 Tag1 OPTIONAL] [-t2 Tag2 OPTIONAL] [-r Resolution OPTIONAL] [-v Verbosity Optional] 
  • Example

python -s random -i 60 -t1 california -t2 USA -r 1920*1080 -v ON

  • For using Random mode with Collection ID
python [-s collection] [-i Seconds OPTIONAL] [-c_id CollectionId Optional] [-r Resolution OPTIONAL] [-v Verbosity Optional] 
  • Example

python -s collection -c_id 19542 -r 1920*1080 -v ON

Constraints

The limit of requests that can be sent to the Source is 50 requests (MAX) per hour. So set the time interval keeping that in mind so that the request limit is not exceeded.

  • Limit exceeding may lead to the blocking of IP by Unsplash Server.

About

Python script to automate the wallpaper from UNSPLASH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages