Git Product home page Git Product logo

daily-wallpaper's Introduction

License MIT Contributors Last commit CodeFactor

Welcome to Daily Wallpaper ๐Ÿ‘‹

๐Ÿ  Homepage

A simple application to change your wallpaper every day from your must loved source

Prerequisites for Daily Wallpaper

Before you begin, ensure you have met the following requirements:

  • If you install it from PPA don't worry about, becouse all the requirements are included in the package
  • If you clone the repository, you need, at least, these dependecies,
python3
python3-gi
python3-lxml
python3-cssselect
python3-requests
python3-crontab
python3-plumbum
gir1.2-gtk-3.0
gir1.2-notify-0.7

Installing Daily Wallpaper

To install Daily Wallpaper, follow these steps:

  • In a terminal (Ctrl+Alt+T), run these commands
sudo add-apt-repository ppa:atareao/atareao
sudo apt update
sudo apt install daily-wallpaper

Using Daily Wallpaper

Run daily-wallpaper from launcher or application menu

Contributing to Daily Wallpaper

To contribute to Daily Wallpaper

๐Ÿ‘ค Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Lorenzo bigfoot90 Massimiliano Arione Silvio Tomatis willemw12
๐Ÿ’ป ๐ŸŒ ๐ŸŒ ๐Ÿ“– ๐Ÿ›

daily-wallpaper's People

Contributors

agharbeia avatar atareao avatar bigfoot90 avatar garak avatar mperezfra avatar silviot 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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

daily-wallpaper's Issues

Caption alert is too wide

I saw the recently added feature of displaying title and caption in an alert window, I like it!
But often the caption text is too long and so the displayed window results too large (and not easy to read).
What about splitting text by full stops?

I'm using this application on Ubuntu 16.04

no nasa wall paper option

the Nasa option not available... and I wish for a widget showing all daily wallpapers with the ability to choose one of them...

nice job

Error when trying to change wallpaper

Installed version: 0.6.7-0extras20.04.2

When I try to change wallpaper, nothing happens. The following error is shown in terminal:

Invalid URL '/content/dam/photography/rights-exempt/best-of-photo-of-the-day/pod-archive-grid-2-sizeddown.ngsversion.1591291093226.adapt.1900.1.jpg': No schema supplied. Perhaps you meant http:///content/dam/photography/rights-exempt/best-of-photo-of-the-day/pod-archive-grid-2-sizeddown.ngsversion.1591291093226.adapt.1900.1.jpg?

Error en ubuntu 20.04

Instalado via ppa

Version del kernel: 5.4.0-42-generic
Version de gnome-shell: GNOME Shell 3.36.4

Traceback (most recent call last):
  File "/usr/bin/daily-wallpaper", line 38, in <module>
    from main import main
  File "/usr/share/daily-wallpaper/main.py", line 26, in <module>
    import gi
ImportError: No module named 'gi'

Nat Geo wallpaper option not changing

I absolutely love this application but I have noticed that since early June of 2018 the national geographic background source does not work. I get no errors when trying to use this.
OS's used
Ubuntu 16.04 LTS
Ubuntu 18.04 LTS

Throwing caution to the wind. Maybe its just me...I will do a deeper dive into the issue, form a solution, and merge the solution if needed soon.

Missing translations

Version: 0.7.0-0extras20.04.3

Random source? is not translated at all.
Select backgrounds source: should be Select backgrounds source (you should put colon outside string, or add colon to translation files)

Running on Deepin OS

Hi Atareo. Great job. I love this small software.

I have an issue related to Deepin OS (Debian based). I have four machines running the same version of Deepin OS. On two of them I have national-geographic-wallpaper version "0.4.9-0extras17.04.0" running smoothly :)

However, on the two other machines I have installed the most recent version, so it doesn't work. It shows the description of the photo in my desktop notification, but the wallpaper doesn't change.

Do you have any suggestion? Is there any way to download the 0.4.9 version?

I'm using Deepin OS 15.5
It has it's own desktop environment, known as Deepin Desktop Environment (DDE).

Thank you!

ngdownloader.py can return "TypeError: cannot use a string pattern on a bytes-like object"

is_running(process) in comun.py can crash (on Linux):

Traceback (most recent call last):
  File "/usr/share/national-geographic-wallpaper/ngdownloader.py", line 354, in <module>
    change_wallpaper()
  File "/usr/share/national-geographic-wallpaper/ngdownloader.py", line 320, in change_wallpaper
    set_national_geographic_wallpaper()
  File "/usr/share/national-geographic-wallpaper/ngdownloader.py", line 193, in set_national_geographic_wallpaper
    set_background(comun.POTD)
  File "/usr/share/national-geographic-wallpaper/ngdownloader.py", line 75, in set_background
    desktop_environment = get_desktop_environment()
  File "/usr/share/national-geographic-wallpaper/comun.py", line 93, in get_desktop_environment
    elif is_running("xfce-mcs-manage"):
  File "/usr/share/national-geographic-wallpaper/comun.py", line 53, in is_running
    if re.search(process, x):
  File "/usr/lib/python3.6/re.py", line 182, in search
    return _compile(pattern, flags).search(string)
TypeError: cannot use a string pattern on a bytes-like object

subprocess.Popen() returns bytes. This needs to be converted to a string or subprocess.Popen should return a string.

To return a string, you can pass universal_newlines=True to subprocess.Popen().

AttributeError

garak@xps:~$ daily-wallpaper

Traceback (most recent call last):
File "/usr/share/daily-wallpaper/main.py", line 219, in on_realize
scale = monitor.get_scale_factor()
AttributeError: 'NoneType' object has no attribute 'get_scale_factor'

Wallpaper changes don't respect options

I'm using (and always used) this tool with the following options:

  • change automatically: on
  • background source: National Geographic

After the last update, a few days ago, I'm getting an unexpected behaviour: wallpaper is changing more than once a day, with images that I can't find on NG official website.

My currently installed version is national-geographic-wallpaper 0.6.3-0extras17.10.0 (on Ubuntu 16.04.4)

[Feature Request] Compatibility with Budgie

Is it possible to make it compatible with Budgie so we can use it on Solus ?
Another suggestion is to change wallpaper automatically at a fixed time so if we leave our computer on, wallpaper change anyway

Not working on Ubuntu Disco - Installed from PPA

I have installed app through ppa on Ubuntu Disco but when i launch from terminal

/usr/share/national-geographic-wallpaper/national-geographic-wallpaper.py

i obtained this error from python

File "/usr/share/national-geographic-wallpaper/national-geographic-wallpaper.py", line 36 from async import async_function ^ SyntaxError: invalid syntax

application is creating a weird html file

I'm finding an HTML file called "contenido.html", inside my home directory, with inside some content from National Geographic Society.
Tried to delete such file, it appears again after a while

Add translations

I see that translations are missing (except for Spanish language), so a message is displayed on start [Errno 2] No translation file found for domain: 'national-geographic-wallpaper'

I can provide a PR with translation to Italian language and French language.
@atareao is it enough to copy es.po file and translate strings inside?

Downloading without GUI crashes

When downloading outside a GUI environment:

/usr/share/daily-wallpaper/dwdownloader.py

daily-wallpaper crashes:

[Errno 2] No translation file found for domain: 'daily-wallpaper'
None
Traceback (most recent call last):
  File "/usr/bin/daily-wallpaper", line 47, in <module>
    main()
  File "/usr/share/daily-wallpaper/main.py", line 236, in main
    dww = DWW()
  File "/usr/share/daily-wallpaper/main.py", line 62, in __init__
    self.croni = Croni()
  File "/usr/share/daily-wallpaper/croni.py", line 50, in __init__
    desktop_environment = get_desktop_environment()
  File "/usr/share/daily-wallpaper/comun.py", line 122, in get_desktop_environment
    if desktop_session.lower() in ['bspwm', 'i3', 'qtile']:
AttributeError: 'NoneType' object has no attribute 'lower'

A possible fix: check if XDG_SESSION_DESKTOP does not exist. In file /usr/share/daily-wallpaper/comun.py, change line 122:

if desktop_session.lower() in ['bspwm', 'i3', 'qtile']:

to:

if desktop_session and desktop_session.lower() in ['bspwm', 'i3', 'qtile']:

Desktoppr and other sources does not work. "Add Sources" option and Wallpaper Download

The code works perfectly fine except some sources like desktoppr doesn't work. Besides I want to add new source like unsplash.com which is a great open source Photography community. It will be better to add an option of "Add Source". When changing wallpaper, the wallpaper just get changed. It will be really appreciated if the wallpaper get downloaded automatically (atleast for a week or so).

error downloading from national-geographic

Hi there,

I'm getting the following error recently. Is this a known issue or something from my side?

national-geographic
HTTPSConnectionPool(host='yourshot.nationalgeographic.comhttps', port=443): Max retries exceeded with url: //yourshot.nationalgeographic.com/u/fQYSUbVfts-T7odkrFJckdiFeHvab0GWOfzhj7tYdC0uglagsDNcYDqa4pGMQ7bjeAKcvXYf465wWkF8e7PEO2pRYNom-UrISLbLycUnnrel6709wyqVxeLQoXNlWiaVlUJJ2JTyT_HpuUFW1Zl_FTNrIFxX8J6VgIuoQurej8vGfaNd1n6epoXHuVQ_PYohcgn6urI6PIirTl4-5Pg64dim-yR0xo9-dA/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fb4b1184ef0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Typo in os.path.exists

Latest from master branch.

os.poath.exists should be os.path.exists:

Traceback (most recent call last):
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 177, in <module>
    change_wallpaper()
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 155, in change_wallpaper
    set_background(comun.POTD)
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 59, in set_background
    if afile and os.poath.exists(afile):
AttributeError: module 'os' has no attribute 'poath'

UnboundLocalError: local variable 'md5_old' referenced before assignment

Got this error once:

Traceback (most recent call last):
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 178, in <module>                                                                                                                         change_wallpaper()
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 148, in change_wallpaper                                                                                                                 if download(daily.get_url()):
  File "/usr/share/daily-wallpaper/dwdownloader.py", line 106, in download                                                                                                                         if md5_old == md5_new:
UnboundLocalError: local variable 'md5_old' referenced before assignment

Initial configuration file not created

Latest from master branch.

Daily-wallpaper does not start:

$ daily-wallpaper
FileNotFoundError: [Errno 2] No such file or directory: '/home/willem/.config/daily-wallpaper/daily-wallpaper.conf'

Workaround: create empty config file.

Enable debug mode?

Since a couple of weeks, wallpapers of National Geographic are not loading.
I think it could be useful to get some kind of debug mode when running program from terminal, something like a -d flag, just to gather some info before opening an issue here.
Currently, if I run /usr/bin/daily-wallpaper I can only get the normal application window.

FileNotFoundError crash (Arch Linux)

Hi, I have created a package for Arch Linux: https://aur.archlinux.org/packages/national-geographic-wallpaper-git/

Now national-geographic-wallpaper.py crashes:

Traceback (most recent call last):
  File "/usr/share/national-geographic-wallpaper/national-geographic-wallpaper.py", line 158, in <module>
    ngw = NGW()
  File "/usr/share/national-geographic-wallpaper/national-geographic-wallpaper.py", line 69, in __init__
    self.croni = Croni()
  File "/usr/share/national-geographic-wallpaper/croni.py", line 42, in __init__
    filename = FILE % os.getlogin()
FileNotFoundError: [Errno 2] No such file or directory

To get the home folder you could use an alternative.

To get the username (see https://docs.python.org/3/library/os.html?highlight=os%20getlogin#os.getlogin), the following works::

os.getenv("LOGNAME")

or

pwd.getpwuid(os.getuid())[0]

Or what I would suggest, use os.path.expanduser:

os.path.join(os.path.expanduser("~"), ".config/national-geographic-wallpaper/potd.jpg")

Force change

Hi! Does exist a way to force automatically the change? I noticed that the change wallpaper doesn't occur as soon as the image is available in nationalgeographic.com/photography/photo-of-the-day.

no wallpaper set

in:
DISTRIB_DESCRIPTION="Linux Mint 18 Sarah"
UBUNTU_CODENAME=xenial.

No wallapper set.
I follow the readme and after i run the application neither "change now" nor "change automatically" works.

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.