4 # $ make title='My Photos' base='https://example.com/sub/my-photos'
6 # See http://purl.mro.name/Photos2Atom
9 .PHONY
: all build
clean large thumb
13 @
# https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/
14 @
# https://www.linuxquestions.org/questions/linux-software-2/question-about-thumbnail-orientation-dimensions-with-imagemagick-493034/
15 convert
$< -thumbnail
200x200
-quality
30% -auto-orient
-strip -define png
:exclude-chunk
=all -interlace Plane
$@
19 @
-mkdir
-p _build
/1200
20 convert
$< -resize
1200x1200\
> -quality
82% -auto-orient
-strip -define png
:exclude-chunk
=all -interlace Plane
$@
23 build
: _build
/index.xml
30 SRC
:= $(wildcard src
/*)
32 thumb
: $(patsubst src
/%,_build
/200/%,${SRC})
33 large
: $(patsubst src
/%,_build
/1200/%,${SRC})
35 _build
/index.xml.raw
: thumb large
36 sh .
/atom.sh
'$(title)' '$(base)' ${SRC} > $@
38 _build
/index.xml
: rfc4287.rng _build
/index.xml.raw
39 xmllint
--format
--encode utf-8
--nocdata
--nonet
--output
$@
--relaxng
$^