blob: 4a8932f617e162e2a62c83e09e10282aa987fbe8 (
plain)
1
2
3
4
5
6
7
8
|
#!/bin/bash
TEMPDIR=$(mktemp -d)
trap "rm -rf '${TEMPDIR}'" EXIT TERM
curl -s -F "image=@$1" -F "key=486690f872c678126a2c09a9e196ce1b" \
https://imgur.com/api/upload.xml > "$TEMPDIR/imgur.xml"
xmllint "$TEMPDIR/imgur.xml" --xpath '//original_image/text()' | xclip
|