forked from butscher/WikidPad
-
Notifications
You must be signed in to change notification settings - Fork 0
DropboxRevisions
Christian Ziemski edited this page Mar 7, 2016
·
3 revisions
This code will insert url:s in WikidPad pages, to the Dropbox revision pages, if the wiki is stored on Dropbox.
# This code will insert url:s in WikidPad pages, to the Dropbox revision pages
# if the wiki is stored on Dropbox
# Install: Put the source below into "WikidPad/user_extensions/DropboxRevisions.py"
# and restart WikidPad.
# Press CTRL-ALT-R to insert a link to the revision page on Dropbox.
# Look into the code and customize the path to the Dropbox revision pages:
# Replace 'YourWiki' in the path, with your wikis real name.
# This code is based on the SubpageCreate plugin
# on http://wikidpad.python-hosting.com/wiki/SubpageCreate
WIKIDPAD_PLUGIN = (("MenuFunctions",1),)
def describeMenuItems(wiki):
return ((DropboxRev, "Dropbox Revisions\tCtrl-Alt-R", "Dropbox Revisions"),)
def DropboxRev(pwiki, evt):
editor=pwiki.getActiveEditor()
text = pwiki.getCurrentWikiWord() # get current WikiWord
text = text.replace(" ", "%20") # replace spaces in pagename, otherwise the url won't work
editor.AddText("[https://www.getdropbox.com/revisions/YourWiki/data/"+ text +".wiki | Dropbox Revisions]")
Source: http://trac.wikidpad2.webfactional.com/wiki/DropboxRevisions