This script is used for uploading image and get markdown quote from file or clipboard (include screenshot) by simply click ctrl+alt+c/w -> ctrl+v. Never worrying about copying image to markdown!
This script is based on this implementation, which use qiniu cloud as image storage and AutoHotkey to get hot key action. For MAC users, an altertive implementation is here.
Require:
ConfigParser
modual.
- AutoHotkey + AutoHotkey.dll
Install AutoHotkey from the official website and copy AutoHotkey.dll that match your system into windows/System32 folder
- Qiniu cloud account Refer to this repo to find out how to get AK, SK and url of your storage.
- In
config.ini
, fill in your AK, SK, url and bucket. - Modify
upload_qiniu.ahk
. Set all the three path to the absolute path of your program. - Modify
clipboard.py
. Change the temporary store location of copied image to an already exist path. - Double click
upload_qiniu.ahk
to execute AutoHotkey script.
You can change the hot key settings in
upload_qiniu.ahk
.
- Select an image file.
- Click ctrl+alt+c. A command window will show up.
- After the command window disappear, the markdown script is in the clipboard and you can use ctrl+v to copy that to your markdown file.
- You should first make the image in the clipboard, either use ctrl+c or right-click it and clike Copy. This process can automatically be done by most screenshot software.
- Click ctrl+alt+w, again after the command window shows up and disappear, you can copy your markdown script.
MIT
Follow this.
Enjoy using Markdown!