Last active
May 29, 2024 08:09
-
-
Save GloryAlex/9c91a1dfd6b8267182fdd0bc6b4415d2 to your computer and use it in GitHub Desktop.
CotEditor Script
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
#!/usr/bin/env python3 | |
# %%%{CotEditorXInput=AllText}%%% | |
# %%%{CotEditorXOutput=Discard}%%% | |
import sys | |
import urllib.parse | |
import webbrowser | |
content = sys.stdin.read() | |
content = urllib.parse.quote(content) | |
webbrowser.open('x-marked://preview?text='+content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment