VoodooPad's Scripting API

You may extend VoodooPad using JavaScript, Python, or even in Objective-C using loadable bundles written in Cocoa.  Downloadable documentation in the form of a header (VPPlugin.h) along with example code is available from http://plausible.coop/static/download/VoodooPad_plugin.zip.

Important Implementation Note: The Python interpreter is global to the VoodooPad process, and you should always perform actions on the main thread.  You should also take care with global variables, since they will be seen between documents.  If you don't know what that means, then don't worry about it.

In comparison, documents will have one or more JavaScript interpreters to use for its scripts.  You don't have to worry about global variables setup in one document writing over the same global variable in another document.  In addition, don't assume that the same interpreter will be used for a document, because it probably won't be.  For example, Web Export might have a different JS interpreter than a PDF Export.  You can't assume that setting a variable when running a JavaScript plugin or page event script will show up when you export your document.

Plausible Labs makes no promises that this will always stay this way.  There are obvious advantage to using the same interpreter throughout a document's lifetime.