Paste Selection in

This script uses curl and xsel to make Geany paste your editor selection in and return the URL in your clipboard.

Download the script below. You will need to chmod u+x to make the script executable.

Add the custom command to Geany: Edit → Format → Send Selection To → Set Custom Commands → Add

Type the name of script ( or optionally you can write the whole custom command here:

sh -c "curl -s -F 'f:1=<-' | xsel -ib; exit 1"

Both, script or one liner command, will work very well.
# The script need be in path or you will need specify complete script path
# in Custom Commands Add box.
sel=$(< /dev/stdin);
curl -s -F "f:1=$sel" | xsel -ib
echo -n "$sel";
exit 1