I bought a Pixel 4 and received a Google Nest Hub. It seems that it can be used as a digital photo frame. Since it's a big deal, I'll try to display the grass image on GitHub.
Immediately after purchase, Nest Hub will display an art gallery prepared by Google. Change this to a setting that allows you to display your favorite images.
Select the Google Photos album to display in the photo frame. The script that will be introduced later automatically creates the album that saves the grass image.
We're going to run a python script that will generate a grass image and upload it to the Google Photos API. To do this, you need to enable the Google Photos API, which is disabled by default, and get an OAuth 2.0 token.
This time, I got the token by referring to this Qiita article.
You will use the Client ID, Client Secret, and Refresh Token later. These are things that should not be published, so please be careful about management.
In the following repository, I have prepared a python script that generates a grass image of GitHub and uploads it to Google Photos.
In generating the grass image, I referred to https://grass-graph.moshimo.works/.
When you run the script, a Google Photos album for saving grass images will be created automatically. The default name is "GitHub grass". Please set Google Nest Hub to display this album.
The repository contains GitHub Actions settings. If you set the following secrets, grass images will be automatically generated and uploaded every day.
The scripts I made are distributed under the Apache 2.0 license. By forking the GitHub repository, you can use it including automation functions.
However, please note the following points.
Thanks to @ u_akihir0 for all the advice this time around. Have a nice Nest Hub life!