# -*- coding: utf-8 -*- ''' :Title Insert all Page Names :Author Flying Meat :Website http://flyingmeat.com/ :Planguage Python :Requires VoodooPad 3.5+ :Description This plugin will insert the name of all the pages in the current document, into the current text page. EOD ''' VPScriptMenuTitle = "Insert all Page Names" import AppKit def main(windowController, *args, **kwargs): thelist = "" textView = windowController.textView() document = windowController.document() for key in document.keys(): page = document.pageForKey_(key) thelist = thelist + page.displayName() + "\n" textView.insertText_(thelist)