@Perfectionisht RE Random Photos
I have been working on a way to show random photos from a given Google Photos Album. It was … not as easy as I’d hoped. I ended up writing a tool in Go that generates the .webp and then use pixlet to push the .webp to the Tidbyt. It all runs as a cron on my Raspberry Pi.
Unfortuantely right now it just shows the LATEST landscape photo from an album I used the API to create (it can’t find albums the API didn’t create). I’ve got a bug out with the gphotos module that it doesn’t support paging of albums with lots of photos. Need paging before I can make it random across the album.
Auth is the real tricky part that I still need to write up but here’s my code
One thing missing is a command line option to instead create an album. I just wrote one-off code to do that but would like to integrate it into my tool.
Had to create a project in Google Cloud for the Photos API and enable the Photos API for it, then create an OAuth2 Client ID credential and export that as json. That’s the creds json that is defined in my .config.json file. RUn it manually the first time to do the auth and allow access, from then on as long as there’s a token.json file it doesn’t need user intervention.
I’m hoping to write up a README tonight about how I got it working. At least sometime this week.
Also, VIDEO! It currently, if it runs into a video file instead of a photo, it just WORKS, showing the first frame of the video. I’d LOVE to figure out how to resize and downsample a video into a gif and push that if it’s a video. THat’d be super cool.