Skip to main content

A script download Bing's img and set as wallpaper

Project description

Latest Version Build Status Platform

Requirements

  • Linux platform(Currently support gnome and xfce)

  • Python 2.7

  • Requests lib

  • Libnotify-bin(for Arch: libnotify)

Install

$ sudo pip install wonderful_bing
$ sudo apt-get install libnotify-bin

Usage

  • Manually

You need to set a directory to save the download pictures, end with ‘/’.

$ wonderful_bing -d /path/to/save/pictures/
  • Automatically(recommand)

  1. Add it to startup application(in my Linux Mint16) if you power on your pc and power off your pc regularly, then every time you boot up your pc, this script will automatically run for you.

  2. Or use cron. Let me give you an example:

    0 8 * * * env DISPLAY=:0 /usr/local/bin/wonderful_bing -d /home/lord63/pictures/bing/

we need ``env DISPLAY=:0``, otherwise the notify can’t display at all, and remember the ``/`` at the end.

  1. Or use anacron if you ofen hang up your pc instead of powering off it. but the original anacron will run the script in root, thus it may fail in setting the picture to wallpaper. Follow this to let you run anacron as normal user. Let me give you an example, add the following line in $HOME/.anacron/anacrontab:

    1 1 wonderful_bing env DISPLAY=:0 /usr/local/bin/wonderful_bing -d /home/lord63/pictures/bing/

If you find a better way, please let me know :)

Snapshots

the first time you run it:

$ wonderful_bing -d /home/lord63/pictures/bing/
Successfully download the picture to --> /home/lord63/pictures/bing/CascadePools.jpg
Successfully set the picture as the wallpaper. :)

if you don’t set the directory:

$ wonderful_bing
Set the directory to save Bing's imgs first.
For more information, use --help.

if the picture has been downloaded before:

$ wonderful_bing -d /home/lord63/pictures/bing/
You have downloaded the picture before.
Have a look at it --> /home/lord63/pictures/bing/CascadePools.jpg

if your pc doesn’t connect to the network, it will try again after 5 mins.

$ wonderful_bing -d /home/lord63/pictures/bing/
ConnectionError,check your network please.
Will try again after 5 minutes.

License

MIT License

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

wonderful_bing-0.5.1.tar.gz (130.9 kB view hashes)

Uploaded Source

Supported by

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