From f144006daea838f3095880444d48e2941447e4e7 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 13 Dec 2023 09:33:47 +0100 Subject: Add some API methods --- test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test.sh') diff --git a/test.sh b/test.sh index 13cb028..920bae9 100755 --- a/test.sh +++ b/test.sh @@ -5,7 +5,21 @@ rm -rf $target $input mkdir -p $target cp -ra $HOME/Pictures/Anime $input + ./gallery init $target ./gallery import $target $input ./gallery thumbnail $target ./gallery dhash $target $HOME/Projects/fiv/build/hash +./gallery tag $target autotagger "DanBooru autotagger" \ + < ../build-db/autotagger.tsv + +./gallery run $target :8080 & +web=$! + +echo '{"path":"/tmp/Gi"}' | \ +curl http://localhost:8080/api/browse -X POST --data-binary @- +echo '{"sha1":"d53fc82162fd19a6e7b92b401b08b7505dbf3dfd"}' | \ +curl http://localhost:8080/api/info -X POST --data-binary @- + +kill $web +wait $web -- cgit v1.2.3-70-g09d2