i HIGHLY doubt anyone's going to make use of this, but here's what i've been doing because posting images to this site has frankly always been a complete PITA... i hope, if nothing else, this post illustrates the need to make this suck less.
https://gist.github.com/anonymous/32f33 ... 90b6024a24
this script takes a path to an image (local file or URL), generates a thumbnail (because teachat requires 640x1000 px max), and uploads the image and thumbnail to imgur.
then it copies BBCode to the clipboard that embeds the thumbnail in the
IMG tag and makes it a link to the fullsize image, so you can just paste it in your post. example (click for fullsize image):
Code: Select all
teachat-imgur.sh https://static.pexels.com/photos/36753/flower-purple-lical-blosso.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 834k 100 834k 0 0 2993k 0 --:--:-- --:--:-- --:--:-- 3002k
/usr/local/bin/imgur-screenshot.sh: line 113: terminal-notifier: command not found
/usr/local/bin/imgur-screenshot.sh: line 113: terminal-notifier: command not found
orig image:
----------
Uploading '/tmp/teachat-imgur.jpg'...
image link: https://i.imgur.com/AM2q2iN.jpg
delete link: https://imgur.com/delete/kCDyFXzjCrdUNm
URL copied to clipboard
Opening 'open https://i.imgur.com/AM2q2iN.jpg'
Version v1.7.4 is up to date.
----------
shrunk image:
----------
Uploading '/tmp/teachat-imgur-shrunk.jpg'...
image link: https://i.imgur.com/3qLQxYj.jpg
delete link: https://imgur.com/delete/FlEm0pKNkqkUbq
URL copied to clipboard
Opening 'open https://i.imgur.com/3qLQxYj.jpg'
Version v1.7.4 is up to date.
----------
[url=https://i.imgur.com/AM2q2iN.jpg][img]http://i.imgur.com/3qLQxYj.jpg[/img][/url]
it's written for macOS and should work on linux etc, possibly with minor tweaking.
it has the following dependencies:
imagemagick convert
imgur-screenshot
they can be easily installed using
homebrew:
Code: Select all
brew install imagemagick imgur-screenshot
enjoy
