Skip to main content

Package that helps you create your own wallpaper changing service

Project description

autowallpaper

A python module that allows you to create your own wallpaper setting service.

Installation

$ pip install autowallpaper

Basic Usage

  1. Create a new Python file.
  2. In the file, write your own function (say, my_image_function()).This function should return the URL or file path of the image to be set as wallpaper. This function will be called every time the wallpaper is to be changed.
  3. Create an object of AutoWallpaper with your function as the argument.
  4. Run it with
    from autowallpaper import AutoWallpaper
    
    autowallpaper = AutoWallpaper(
        my_image_function,
        # other arguments
    )
    
    autowallpaper.start()   # Starts the daemon
    autowallpaper.restart() # Restarts the daemon
    autowallpaper.stop()    # Stops the daemon
    
  5. (OPTIONAL) You can extend class AutoWallpaper and override run() to make your own scheduler, that changes wallpaper more frequently, less frequently, etc.

You can change where downloaded images and logs are stored using arguments to AutoWallpaper.

Demo - NASA APOD

A working demo implementation is available in demo/nasa_wallpaper.py. This changes the wallpaper every 24 hours to the image featured on NASA's Astronomy Picture of the Day.

Usage

  1. Get an API key from the NASA API website. Save it in a file or just copy it.
  2. Move demo/nasa_wallpaper.py in the parent directory (so the imports work fine).
  3. Run using
    $ python nasa_wallpaper.py -k [KEY | PATH_TO_KEYFILE] start|stop|restart
  4. Use $ python nasa_wallpaper.py -h to see additional options

TODOs

  • Add support to source automatically from a folder
  • Simplify command for demo
  • Add option to save all downloaded images instead of only the latest one
  • Make logging optional
  • Change paths for Windows
  • Test Windows and Linux environments
  • Add support for more environments
  • ???

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autowallpaper-0.0.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autowallpaper-0.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file autowallpaper-0.0.2.tar.gz.

File metadata

  • Download URL: autowallpaper-0.0.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for autowallpaper-0.0.2.tar.gz
Algorithm Hash digest
SHA256 99372e21a3abff31150b10a1de70d61e355f4fa6a6eeb3c0a6079b9cf9e71a45
MD5 a1f7b0c05688341fef0db66fe5c4d50f
BLAKE2b-256 30cb3e9ee216da150a9ced8e47ecf0a40c317a8793e79a7f4e920a2ce7399d1a

See more details on using hashes here.

File details

Details for the file autowallpaper-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: autowallpaper-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for autowallpaper-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b150744212b3bd3c1b191c2dc69f2c4d1f00cf3d4158240d26f0121eb603117
MD5 1ac80382ff6ebec888ebcb2c3f240e84
BLAKE2b-256 68a80b3327b4b03f729a0a848ccb406840199aa0586bba2579e8efbf595dd319

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page