robacarp / start.photos

A fast, minimal new tab page which simply shows a safe-for-work picture. Works in Firefox and Chrome.

Home Page:https://start.photos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feed creation automation

Gitoffthelawn opened this issue · comments

How did you create your feed JSON files? Did you find a way to automate the process?

I think one of the great features of this project is that you include shutter speed, ISO, and f/stop values for each photo. I'm interested in creating a feed with thousands of photos, but only if I don't have to enter details of each one by hand!

commented

@Gitoffthelawn thanks for checking things out! Great question, and the answer is, absolutely I had some automation. The automation folder in the root of the repo contains a smattering of scripts which I've used over time to generate the feed data. The feed data itself is stored in this very repo and served up via github pages.

The feed data is in the docs/_data/photos directory. The docs dir is a jekyll site, in keeping with convention to use github pages.

The automation script I know to be working is at assistant/bin/unsplash.rb. The scripts in that folder come with no guarantee.

unsplash.rb monitors the [macOS] system clipboard by spamming pbpaste. When an unsplash-looking url is found it queries the unsplash API for the photo details. In order to query the API you need to export an env var with an api key. The free/non-production api key is easy enough to use for this purpose.

With unsplash.rb running in the background you can just click around on unsplash.com and cmd-l cmd-a cmd-c to copy the url to the clipboard whenever you're looking at an image you want to keep.

Let me know if that doesn't get you started. A bunch of these instructions are vague and make expectations about your ability to infer details. I'm happy to answer questions where it's outside your comfort / experience! 🍰

Thanks! That quite clever!

I didn't realize you had it set up so you could browse for photographs and add them as you discovered them.

I've added this post to my saved notifications within GitHub so I can refer back to it again.

Thank you!