Created
January 27, 2019 09:19
-
-
Save TakamiChie/101e4ee6d3c5582e7b639bf4c444c94e to your computer and use it in GitHub Desktop.
クリップボード内のMarkdownをHTMLに変換して貼り付ける(Clipboard-Historyでの利用向け)。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
クリップボード内のMarkdownをHTMLに変換して貼り付ける。 | |
markdownモジュールのインストールが必要 | |
`pip install markdown` | |
# Clipboard-Historyで使う場合の例 | |
クリップボードのMarkdownをHTMLに変換 || <#clip, #paste> || Run | D:\Users\TakamiChie\AppData\Local\Packages\6432853C62D86.ClipboardHistory_mmq3pnrvshaxt\LocalCache\Roaming\ClipboardHistory\md.py | I O | |
""" | |
import sys | |
from markdown import Markdown | |
base = "\n".join(sys.stdin.readlines()) | |
md = Markdown().convert(base) | |
print(md) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment