#!/bin/sh -xe make gallery target=/tmp/G input=/tmp/Gi rm -rf $target $input mkdir -p $target cp -ra $HOME/Pictures/Anime $input ./gallery init $target ./gallery sync $target $input ./gallery thumbnail $target ./gallery dhash $target ./gallery tag $target autotagger "DanBooru autotagger" \ < ../build-db/autotagger.tsv ./gallery web $target :8080 & web=$! call() (curl http://localhost:8080/api/$1 -X POST --data-binary @-) echo '{"path":"/tmp/Gi"}' | call browse echo '{}' | call tags echo '{}' | call duplicates echo '{}' | call orphans echo '{"sha1":"d53fc82162fd19a6e7b92b401b08b7505dbf3dfd"}' | call info echo '{"sha1":"9539d9895ab8c25d76c321b23b8a327801a496bb"}' | call similar kill $web || : wait $web