Skip to content

Instantly share code, notes, and snippets.

@fereria
Created September 6, 2017 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/acc43ffff805c8e7812e88e98c38df14 to your computer and use it in GitHub Desktop.
Save fereria/acc43ffff805c8e7812e88e98c38df14 to your computer and use it in GitHub Desktop.
BoostNoteフォルダに画像を送ってクリップボードにパスを入れる
# -*- coding: utf-8 -*-
import shutil
import os.path
import clipboard
import sys
to_path = "<boostnoteの画像置き場>"
argvs = sys.argv
argvs.pop(0)
if len(argvs) == 0:
exit
from_file = argvs[0]
shutil.copy(from_file, to_path + os.path.basename(from_file))
clipboard.copy("![](/:storage/{0})".format(os.path.basename(from_file)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment