You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Butscher edited this page Jan 23, 2021
·
1 revision
# Select a path, press CTRL-U and it will turn into a clickable URL.
# Install: Put the source below into "WikidPad/user_extensions/URLifyFile.py"
# and restart WikidPad.
import urllib
WIKIDPAD_PLUGIN = (("MenuFunctions",1),)
def describeMenuItems(wiki):
return ((URLifyFile, "URLify file\tCtrl-U", "URLify file"),)
def URLifyFile(wiki, evt):
text = wiki.getActiveEditor().GetSelectedText()
url = urllib.pathname2url(text)
wiki.getActiveEditor().ReplaceSelection("file:%s" % url)