aboutsummaryrefslogtreecommitdiff
path: root/fiv-reverse-search
diff options
context:
space:
mode:
Diffstat (limited to 'fiv-reverse-search')
-rwxr-xr-xfiv-reverse-search9
1 files changed, 9 insertions, 0 deletions
diff --git a/fiv-reverse-search b/fiv-reverse-search
new file mode 100755
index 0000000..dc12790
--- /dev/null
+++ b/fiv-reverse-search
@@ -0,0 +1,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')"