aboutsummaryrefslogtreecommitdiff
path: root/fiv-reverse-search
blob: dc12790cdaf47c797ad9db12c8fa2f62eebc7167 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh -e
if [ "$#" -ne 2 ]; then
	echo "Usage: $0 SEARCH-ENGINE-URI-PREFIX {PATH | URI}" >&2
	exit 1
fi

xdg-open "$1$(fiv --thumbnail-for-search large "$2" \
	| curl --silent --show-error --form 'files[]=@-' https://uguu.se/upload \
	| jq --raw-output '.files[] | .url | @uri')"