Webmaster4o
Aug 08, 2015 - 19:20
It is often useful when porting to this forum to include images. But to properly do this in markdown, you need to upload the image to the web and get a valid URL. This script aims to do that.
Note: this script requires pyimgur
import pyimgur,photos,clipboard,os,console
i=photos.pick_image()
format = 'gif' if (i.format == 'GIF') else 'jpg'
i.save('img.'+format)
clipboard.set('.upload_image('img.'+format, title="Uploaded-Image").link)+')')
console.hud_alert("markdown imagecopied!")
os.remove('img.'+format)
This will copy markdown code for your image to the clipboard.