Coder Social home page Coder Social logo

alexwohlbruck / google-photos-wallpaper Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 132.62 MB

Sets your wallpaper each day from your Google Photos albums.

License: MIT License

Python 40.74% JavaScript 30.39% HTML 3.62% Vue 23.85% SCSS 1.40%
google-photos wallpaper desktop-app python vue automation photography

google-photos-wallpaper's Introduction

Google Photos Wallpaper

This is a utility that will update your desktop wallpaper from your Google Photos library on a custom schedule.

Features

  • Select the photo albums that you'd like to use, and your wallpaper will change automatically either in sequence or random order.
  • Filter photos that are too small, have a poor aspect ratio, or create a custom blacklist.
  • Previous, next, and random buttons to quickly change the wallpaper, or select one from the album list.

App screenshot

Installation

Production version

There are no executable available for installation yet. They will be available soon on the releases page.

Development version

  1. To compile the app, first clone the repository in the desired location on your computer.
git clone https://github.com/alexwohlbruck/google-photos-wallpaper.git

cd google-photos-wallpaper
  1. Create and activate a python virtual environment.
python3 -m venv env
source env/Scripts/activate
  1. Install packages using pip.
pip3 install -r requirements.txt
  1. Create a Google Cloud Platform project.

    • Enable the Photos Library API.
    • In the credentials tab, create an OAuth 2.0 client ID and download the secrets file
    • Name the file client_secrets.json and place in your /src directory.
  2. Run the python app.

python3 main.py

Build and distribute

Build the executable using pyupdater.

pyupdater build win.spec --app-version=X.X.X

Pass the flag --pyinstaller-log-info to see pyinstaller build logs.

The app will be built to /pyu-data/new/gpwallpaper-win-X.X.X.zip.

FAQ

How do I sign in?

The app will automatically open a browser tab with a Google sign in prompt. You may have to manually switch to your browser. After you have signed in, the your album library will be displayed.

Can I select individual photos?

You can pick photo albums to be used, but I will add an option to add a custom search as a photo source.

Why does it take so long to load albums?

When you select an album to use for your wallpaper, the app will download the metadata for every photo in the album, and can only do so in intervals of 50 photos. If the album is very large, it will take some time to download all of the data.

What operating systems are supported?

I am currently developing the app for Windows. Support for Linux and MacOS is possible in the future, but after a full Windows release is done.

Support

To get support, report a bug, or request features, go to the Issues page of this repository.

Contribute

If you would like to contribute to the project, I will gladly look over any pull requests. Thank you!

License

MIT

google-photos-wallpaper's People

Contributors

alex-xenial avatar alexwohlbruck avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

jelitox mrl8199

google-photos-wallpaper's Issues

Filter out videos from albums

The Photos API does not allow filters on an album search, so a manual filter will be required to remove video results. When retrieving an album's mediaItems, remove any results with a filename property ending in '.mp4', '.avi', '.mov', etc. Ensure case insensitivity.

Options window does not load information

After signing in to the options window, the Google Photos albums appear but the details above that (don't even know what is supposed to be there) don't load. And after selecting an album, nothing happens besides the console printing that it requests the albums content.

Allow users to define a custom search as a wallpaper source

Use the Photos API's search filters feature to allow searching by keyword. For example, the user could choose to have a search on the keyword "dogs", and any of their photos of dogs would be used as the wallpaper. This will also work for tagged people & pets, places, things, and image types (eg. "screenshots").

Next, previous, random buttons

These can be used to quickly change the wallpaper. For this to work, all data for the selected albums and their media items MUST be downloaded on the device beforehand. Retrieve this data form the Photos API when they are selected by the user.
Pull the album data from the local config file and use it to find the corresponding media item to set as the wallpaper. Before setting the wallpaper, be sure to use the media item's ID to get a fresh copy of the item's data, ensuring that the baseUrl will be valid.###

Dynamically load album and mediaItem data on scroll

Currently, only the first 50/100 albums are loaded in the app, as well as the first 100 items in each album. When the user scrolls to the bottom, use the nextPageToken to load the next batch of items in automatically. Always pull this data directly from the API, do not use locally stored data.

Cannot run application

Hi there,

I did just try to run the application as specified in the readme.md - but it does not work for me. After installing all the dependencies with pip I get this error:

(env) C:\Users\*****\Code\google-photos-wallpaper>python3 main.py
Traceback (most recent call last):
  File "main.py", line 12, in <module>
    from src.scheduler import Scheduler
  File "C:\Users\*****\Code\google-photos-wallpaper\src\scheduler.py", line 8, in <module>
    options = Options.get_user_options()
  File "C:\Users\*****\Code\google-photos-wallpaper\src\options.py", line 43, in get_user_options
    with open(OPTIONS_PATH, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\*****\\Code\\google-photos-wallpaper\\storage/options.json'

Is it correct that there is no options directory? What do I miss? I really appreciate your work and hope that you can help me to get it up and running. Thank you in advance! :)

Selectable albums to use as source

User will be able to choose which photo albums they want to use as their wallpaper source. Selected albums and all of their data (including media items) should be stored locally when they are set.

Send options data updates from python app using eel function instead of returning promise

Example: Setting wallpaper by clicking an image

old js:

window.eel.set_wallpaper(data)(newWall => doSomething(newWall));`

new:

window.eel.setWallpaper()
eel.expose(function wallpaperChanged(newWall) {
  doSomething(newWall);
});

old python:

@eel.expose
def set_wallpaper(data):
  return= do_something(data)

new:

def do_something(data):
  new_wall = do_something_else()
  eel.wallpaperChanged(new_wall)
  
@eel.expose
def set_wallpaper(data)
  do_something(data)

Get fresh copy of currentWallpaper on app load

The baseUrl will expire after a period of time, so once the app has attained the id of the current wallpaper, it must retrieve the mediaItem again from the Photos API in order to ensure it will load properly.

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.