mirror of
https://github.com/danog/captionbot-clients.git
synced 2024-11-26 19:34:41 +01:00
Merge branch 'master' of https://github.com/danog/captionbot-clients
This commit is contained in:
commit
15b21481be
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
bash/token
|
||||
*~
|
||||
|
@ -27,6 +27,12 @@ This script will try to recognize the content of any image you give him using Mi
|
||||
Usage: ./captionbot.sh file
|
||||
or
|
||||
Usage: ./captionbot.sh url
|
||||
|
||||
Add the norate parameter to avoid the rating prompt:
|
||||
Usage: ./captionbot.sh url norate
|
||||
|
||||
Add the script parameter to avoid the rating prompt and delete all output apart from the image description:
|
||||
Usage: ./captionbot.sh url script
|
||||
```
|
||||
Here follow the instructions :)
|
||||
|
||||
|
@ -56,7 +56,7 @@ if [ "$2" != "norate" ];then
|
||||
[ $s -gt 0 -a $s -le 5 ] 2>/dev/null || echo "You didn't input a valid number. Please try again!"
|
||||
done
|
||||
|
||||
result=$(curl -s https://www.captionbot.ai/api/message -H "Content-Type: application/json; charset=utf-8" -X POST -d '{"conversationId":'$conversationId', waterMark:'$watermark', "userMessage":"'$s'"}' | sed 's/\\"/"/g;s/^"//g;s/"$//g' | ./JSON.sh -s)
|
||||
result=$(curl -s https://www.captionbot.ai/api/message -H 'Accept: */*'-H 'Referer: https://www.captionbot.ai/' -H 'Content-Type: application/json; charset=utf-8' -X POST -d '{"conversationId":'$conversationId', waterMark:'$watermark', "userMessage":"'$s'"}' | sed 's/\\"/"/g;s/^"//g;s/"$//g' | ./JSON.sh -s)
|
||||
message=$(echo "$result" | sed '/\[".*Message"\]/!d;s/\[".*Message"\]\t//g;s/^"//g;s/"$//g')
|
||||
|
||||
[ "$message" = "$s" ] && echo "Thanks for leaving your feedback!" || echo "$message"
|
||||
|
Loading…
Reference in New Issue
Block a user