all repos — site @ 08e4585f71a83e447d2a54d2c1e994184bc15a6e

source for my site, found at icyphox.sh

bin/photos.sh (view raw)

 1#!/usr/bin/env bash
 2#
 3# usage: printf "<bunch of photos>" | ./bin/photos.sh >> pages/photos.md
 4
 5prefix="$1"
 6printf '<div class="image-grid">\n'
 7while IFS=$'\n' read -r line; do
 8    printf '  <a href="https://cdn.icyphox.sh/film/%s">\n' "$prefix/$line"
 9    printf '    <img src="https://cdn.icyphox.sh/fit?file=%s&width=1000&height=1000" />\n' "$prefix/$line"
10    printf '  </a>\n'
11done < /dev/stdin
12printf '</div>'