blob: 844148c6fb6f5e46972d13e457f30b892cd97d52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh -xe
cd "$(dirname "$0")"
make gallery
target=/tmp/G input=/tmp/G/Images
rm -rf $target
mkdir -p $target $input
# TODO: Generate something in there.
./gallery init $target
./gallery sync $target $input "$@"
./gallery thumbnail $target
./gallery dhash $target
./gallery tag $target test "Test space" < /dev/null
./gallery web $target :8080 &
web=$!
trap "kill $web; wait $web" EXIT INT TERM
sleep 0.25
call() (curl http://localhost:8080/api/$1 -X POST --data-binary @-)
echo '{"path":"'"$(basename "$input")"'"}' | call browse
echo '{}' | call tags
echo '{}' | call duplicates
echo '{}' | call orphans
# TODO: Use hashes of generated images.
echo '{"sha1":"d53fc82162fd19a6e7b92b401b08b7505dbf3dfd"}' | call info
echo '{"sha1":"9539d9895ab8c25d76c321b23b8a327801a496bb"}' | call similar
|