This chapter discusses the plugins contained in leoPlugins.leo. These plugins are part of Leo’s official distribution. The next chapter, Writing Plugins, tells how to write plugins.
The scripting plugin (mod_scripting.py) deserves special mention. This plugin lets you create script buttons in a matter of seconds. See Creating script buttons. Script buttons are extraordinarily useful. Try them, you’ll be instantly hooked.
Contents
You enable or disable plugins using @enabled-plugins nodes in leoSettings files (leoSettings.leo, myLeoSettings.leo or the .leo file being loaded). See Specifying settings for full details of settings files.
The body text of the @enabled-plugins node contains a list of enabled plugins. Notes:
If the plugin has already been loaded, Leo silently ignores the request to re-enable the plugin. Leo never attempts to disable a plugin while processing enabled plugin strings. Thus, plugins enabled in an @enabled-plugins node in leoSettings.leo will be enabled regardless of the contents of any other @enabled-plugins node.
g.app.gui.getEnabledPlugins contains the last processed @enabled-plugins node.
Allows users to define new @direcives.
Adds a context menu to each node containing all the commands in the bzr Qt interface. Bzr is invoked based on the path of the current node.
Requires contextmenu.py.
Allows Leo to open any empty file as a minimal .leo file.
Allows the user to import Cisco configuration files.
Adds the “File:Import:Import Cisco Configuration” menu item. The plugin will:
All created sections are alphabetically ordered.
Modifies the Python @auto importer so that the importer puts the __init__ method (ctor) into the body of the class node.
This makes it easier to keep the instance variable docs in the class docstring in sync. with the ivars as manipulated by __init__, saves repeating explanations in both places.
Note that this is done after the consistency checks by the @auto import code, so using this plugin is at your own risk. It will change the order of declarations if other methods are declared before __init__.
Allows the user to browse XML documents in Leo.
This file implements an interface to XML generation, so that the resulting file can be processed by leo.
Adds #line directives in perl and perlpod programs.
Over-rides two methods in leoAtFile.py to write #line directives after node sentinels. This allows compilers to give locations of errors in relation to the node name rather than the filename. Currently supports only perl and perlpod.
Creates new nodes containing parameterized section reference.
This plugin adds nodes under the currently selected tree that are to act as section references. To do so, go the Outline menu and select the ‘Parameterize Section Reference’ command. This plugin looks for a top level node called ‘Parameterized Nodes’. If it finds a headline that matches the section reference it adds a node/nodes to the current tree.
To see this in action, do the following:
Important: in the examples below, type << instead of < < and type >> instead of > >. Docstrings can not contain section references!
Create a node called ‘Parameterized Nodes’, with a sub-node called < < Meow >>. The body of < < Meow > > should have the text:
I mmmm sooo happy I could < < 1$ > >.
But I don't know if I have all the < < 2$ > >
money in the world.
In a node called A, type:
< < meow( purrrrrr, zzooot ) > >
(leave the cursor at the end of the line)
In a node called B, type:
< < meow ( spit or puke, blinkin ) > >
(leave the cursor at the end of the line)
Leave the cursor in Node A at the designated point.
Go to Outline and select Parameterize Section Reference.
The plugin searches the outline, goes to level one and finds a Node with the Headline, “Parameterized Nodes”. It looks for nodes under that headline with the the headline << meow >>. It then creates this node structure under Node A:
< < meow ( purrrrrr, zzooot ) > >
< <2$> >
< <1$> >
Examine the new subnodes of Node A:
< < meow ( purrrrrr, zzooot ) > > contains the body text of the < < meow > > node. < < 1$ > > contains the word purrrrrr. < < 2$ > > contains the word zzooot.
Go to Node B, and leave the cursor at the designated point.
Go to Outline Menu and select Parameterize Section Reference command.
It’s a lot easier to use than to explain!
Autosaves the Leo outline every so often.
The time between saves is given by the setting, with default as shown:
@int mod_autosave_interval = 300
This plugin is active only if:
@bool mod_autosave_active = True
Allows Leo to read a complete directory tree into a Leo outline. Converts directories into headlines and puts the list of file names into bodies.
Ce plug-in permet de traduire l’arborescence d’un répertoire en une arborescence Leo : Chaque dossier est converti en noeud dans Leo ; son nom est placé dans l’entête du noeud et chaque nom de fichier qu’il contient est listé dans son contenu.
Feedback on this plugin can be sent to:
Frédéric Momméja
<frederic [point] mommeja [at] laposte [point] net>
Timestamps all save operations to show when they occur.
Allows the definition of double-click actions.
When the user double-clicks a node this plugin checks for a match of the clicked node’s headline text with a list of patterns. If a match occurs, the plugin executes the associated script.
nodeAction nodes may be located anywhere in the outline. Such nodes should contain one or more pattern nodes as children. The headline of each pattern node contains the pattern; the body text contains the script to be executed when the pattern matches the double-clicked node.
For example, the “nodeActions” node containing a “launch URL” pattern node and a “pre-process python code” node could be placed under an “@settings” node:
@settings
|
+- nodeActions
|
+- http:\\*
|
+- @file *.py
Configuration
The nodeActions plugin supports the following global configurations using Leo’s support for setting global variables within an @settings node’s sub-nodes in the leoSettings.leo, myLeoSettings.leo, and the project Leo file:
@bool nodeActions_save_atFile_nodes = False
True: Double-click on an @file type node will save the file to disk before executing the script. False: Double-click on an @file type node will not save the file to disk before executing the script. (default)
@int nodeActions_message_level = 1
Specifies the type of messages to be sent to the log pane. Specifying a higher message level will display that level and all lower levels. The following integer values are supported:
0 no messages 1 Plugin triggered and the patterns that were matched (default) 2 Double-click event passed or not to next plugin 3 Patterns that did not match 4 Code debugging messages
Patterns
Pattern matching is performed using python’s support for Unix shell-style patterns unless overwritten by the “X” pattern directive. The following pattern elements are supported:
* matches everything
? matches any single character
[<seq>] matches any character in <seq>
[!<seq>] matches any character **not** in <seq>
Unix shell-style pattern matching is case insensitive and always starts from the beginning of the headline. For example:
Pattern Matches Does not match *.py Abc_Test.py .py .py - Test Abc_Test.py test* Test_Abc.py Abc_Test.py
To enable a script to run on any type of @file node (@thin, @shadow, ...), the pattern can start with “@files” to match on any external file type. For example, the pattern “@files *.py” will match a node with the headline “@file abcd.py”.
The headline of the double-clicked node is matched against the patterns starting from the first sub-node under the “nodeActions” node to the last sub-node.
Only the script associated with the first matching pattern is invoked unless overwritten by the “V” pattern directive.
Using the “V” pattern directive allows a broad pattern such as “@files *.py” to be invoked, and then, by placing a more restrictive pattern above it, such as “@files *_test.py”, a different script can be executed for those files requiring pre-processing:
+- nodeActions
|
+- @files *_test.py
|
+- @files *.py
Note: To prevent Leo from trying to save patterns that begin with a derived file directive (@file, @auto, ...) to disk, such as “@file *.py”, place the “@ignore” directive in the body of the “nodeActions” node.
Pattern nodes can be placed at any level under the “nodeActions” node. Only nodes with no child nodes are considered pattern nodes. This allows patterns that are to be used in multiple Leo files to be read from a file. For example, the following structure reads the pattern definition from the “C:\Leo\nodeActions_Patterns.txt” file:
+- nodeActions
|
+- @files C:\\Leo\\nodeActions_Patterns.txt
|
+- http:\\*
|
+- @file *.py
Pattern directives
The following pattern specific directives can be appended to the end of a pattern (do not include the ‘:’):
[X]: | Use python’s regular expression type patterns instead of the Unix shell-style pattern syntax. For example, the following patterns will match the same headline string: Unix shell-style pattern:
@files *.py
Regular Expression pattern:
^@files .*\.py$ [X]
|
---|---|
[V]: | Matching the pattern will not block the double-click event from being passed to the remaining patterns. The “V” represents a down arrow that symbolizes the passing of the event to the next pattern below it. For example, adding the “[V]” directive to the “@files *_test.py” in the Patterns section above, changes its script from being ‘an alternate to’ to being ‘a pre-processor for’ the “@files *.py” script: +- nodeActions
|
+- @files *_test.py [V]
|
+- @files *.py
|
[>]: | Matching the pattern will not block the double-click event from being passed to other plugins. The “>” represents a right arrow that symbolizes the passing of the event to the next plugin. If the headline matched more than one headline, the double-click event will be passed to the next plugin if the directive is associated with any of the matched patterns. |
The directive(s) for a pattern must be contained within a single set of brackets, separated from the pattern by a space, with or without a comma separator. For example, the following specifies all three directives:
^@files .*\.py$ [X,V>]
Scripts
The script for a pattern is located in the body of the pattern’s node. The following global variables are available to the script:
c
g
pClicked - node position of the double-clicked node
pScript - node position of the invoked script
Examples
Double-clicking on a node with a “http:\\www.google.com” headline will invoke the script associated with the “http:\\*” pattern. The following script in the body of the pattern’s node displays the URL in a browser:
import webbrowser
hClicked = pClicked.h #Clicked node's Headline text
webbrowser.open(hClicked) #Invoke browser
The following script can be placed in the body of a pattern’s node to execute a command in the first line of the body of a double-clicked node:
g.os.system('"Start /b ' + pClicked.bodyString() + '"')
Modifies the way exported outlines are written.
Creates new headlines from clipboard text.
If the pasted text would be greater than 50 characters in length, the plugin truncates the headline to 50 characters and pastes the entire line into the body text of that node. Creates a “Paste as Headlines” option the Edit menu directly under the existing Paste option.
Customizes pretty printing.
The plugin creates a do-nothing subclass of the default pretty printer. To customize, simply override in this file the methods of the base prettyPrinter class in leoCommands.py. You would typically want to override putNormalToken or its allies. Templates for these methods have been provided. You may, however, override any methods you like. You could even define your own class entirely, provided you implement the prettyPrintNode method.
Creates buttons to move nodes quickly to other nodes.
Quickly move/copy/clone nodes from around the tree to one or more target nodes. It can also create bookmark and tagging functionality in an outline (see Set Parent Notes below).
Adds Move/Clone/Copy To Last Child Button and Move/Clone/Copy To First Child Button, Link To/From and Jump To commands to the Move sub-menu on the Outline menu, and each node’s context menu, if the contextmenu plugin is enabled.
Select a node Foo and then use the Move To Last Child Button command. This adds a ‘to Foo’ button to the button bar. Now select another node and click the ‘to Foo’ button. The selected node will be moved to the last child of the node ‘Foo’.
To First Child Button works the same way, except that moved nodes are inserted as the first child of the target node.
Clone and Copy variants are like Move, but clone or copy instead of moving.
Link works in conjunction with the backlink plugin (and also the graphcanvas plugin) creating a link to/from the target and current nodes.
Jump buttons act as bookmarks, taking you to the target node.
You can right click on any of these buttons to access their context menu:
- Goto Target
- takes you to the target node (like a Jump button).
- Make Permanent
- makes the button permanent, it will reappear when the file is saved / closed / re-opened.
- Set Parent
- allows you to move buttons to sub-menu items of other quickMove buttons. This implicitly makes the moved button permanent. It also causes the moved button to lose its context menu.
- Remove Button
- comes from the mod_scripting plugin, and just removes the button for the rest of the current session.
Create somewhere out of the way in your outline a node called Bookmarks. Use the quickMove menu to make it a Jump To button, and use its context menu to make it permanent. There is no particular reason to jump to it, but it needs to be a quickMove button of some kind.
Now, when you want to bookmark a node, first use the quickMove menu to make the node a Jump To button, and then use the context menu on the button to set its parent to your Bookmarks button. It becomes a sub-menu item of the Bookmarks button.
In conjunction with the backlinks plugin you can use quickMove to tag nodes. The backlinks plugin adds a Links tab to the Log pane.
Create somewhere in your outline a node called Tags. Use the quickMove menu to make it a Jump To button, and use its context menu to make it permanent. Clicking on it will jump you to your tag list. Now create a node under the Tags node for each tag you want. The node’s name will be the tag name, and can be changed later. Then use the quickMove menu to make each of these nodes a Link To button, and then use the context menu on the button to set its parent to your Tags button. It becomes a sub-menu item of the Tags button.
To see the tags on a node, you need to be looking at the Links tab in the Log pane. To see all the nodes with a particular tag, click on the Tags button to jump to the tag list, and select the node which names the tag of interest. The nodes with that tag will be listed in th Links tab in the Log pane.
Sets g.app.homeDir to a hard-coded path.
Counts characters, words, lines, and paragraphs in the body pane.
It adds a “Word Count...” option to the bottom of the Edit menu that will activate the command.
Makes g.pdb() enter the Pudb debugger instead of pdb.
Pudb is a full-screen Python debugger: http://pypi.python.org/pypi/pudb
Dumps Python globals at startup.
Enables debugging and tracing for Python’s garbage collector.
Shows how to force Leo to quit.
Traces changes to Leo’s objects at idle time.
Traces keystrokes in the outline and body panes.
Traces most common hooks, but not key, drag or idle hooks.
Creates a two-way communication (bridge) between Leo scripts and IPython running in the console from which Leo was launched.
Using this bridge, scripts running in Leo can affect IPython, and vice versa. In particular, scripts running in IPython can alter Leo outlines!
For full details, see Leo Users Guide: http://webpages.charter.net/edreamleo/IPythonBridge.html
Replaces c.openWithTempFilePath to create alternate temporary directory paths.
Two alternates are supported. The default method creates temporary files with a filename that begins with the headline text, and located in a “username_Leo” subdirectory of the temporary directory. The “LeoTemp” prefix is omitted. If ‘open_with_clean_filenames’ is set to true then subdirectories mirror the node’s hierarchy in Leo. Either method makes it easier to see which temporary file is related to which outline node.
Creates an ‘Extensions’ menu containing two commands: Open Console Window and Open Explorer.
The Open Console Window command opens xterm on Linux. The Open Explorer command Opens a Windows explorer window.
This allows quick navigation to facilitate testing and navigating large systems with complex directories.
Please submit bugs / feature requests to etaekema@earthlink.net
Current limitations: - Not tested on Mac OS X ... - On Linux, xterm must be in your path.
Allows imports of notes created in Tomboy / gnote.
Usage:
Enables two-way communication with VIM.
It’s recommended that you have gvim installed–the basic console vim is not recommended.
When properly installed, this plugin does the following:
By default, the plugin opens nodes on icondclick2 events. (double click in the icon box)
The setting:
@string vim_trigger_event = icondclick2
controls when nodes are opened in vim. The default, shown above, opens a node in vim on double clicks in Leo’s icon box. A typical alternative would be:
@string vim_trigger_event = iconclick2
to open nodes on single clicks in the icon box. You could also set:
@string vim_trigger_event = select2
to open a node in vim whenever the selected node changes for any reason.
Leo will put Vim cursor at same location as Leo cursor in file if ‘vim_plugin_positions_cursor’ set to True.
Leo will put node in a Vim tab card if ‘vim_plugin_uses_tab_feature’ set to True.
Leo will update the node in the outline when you save the file in VIM.
To install this plugin do the following:
Allows you to edit nodes in emacs/xemacs.
Important: the open_with plugin must be enabled for this plugin to work properly.
Depending on your preference, selecting or double-clicking a node will pass the body text of that node to emacs. You may edit the node in the emacs buffer and changes will appear in Leo.
Adds the Plugins:Word Export:Export menu item to format and export the selected outline to a Word document, starting Word if necessary.
Synchronizes @path nodes with folders.
If a node is named '@path path_to_folder’, the content (file and folder names) of the folder and the children of that node will synchronized whenever the node’s status-iconbox is double clicked.
For files not previously seen in a folder a new node will appear on top of the children list (with a mark).
Folders appear in the list as /foldername/. If you double click on the icon-box of the folder node, it will have children added to it based on the contents of the folder on disk. These folders have the '@path‘ directive as the first line of their body text.
When files are deleted from the folder and the list is updated by double clicking the files will appear in the list as filename (or /foldername/).
You can describe files and directories in the body of the nodes.
You can organize files and directories with organizer nodes, an organizer node name cannot contain with ‘/’.
Files and folders can be created by entering a node with the required name as its headline (must start and/or end with “/” for a folder) and then double clicking on the node’s status-iconbox.
@auto nodes can be set up for existing files can be loaded by double clicking on the node’s status-iconbox. If you prefer @shadow or something else use the “active_path_attype” setting, without the “@”.
There are commands on the Plugins active_path submenu:
If you want to use an input other than double clicking a node’s status-iconbox set active_path_event to a value like ‘iconrclick1’ or ‘iconclick1’.
There are @settings for ignoring directory entries and automatically loading files. re.search is used, rather than re.match, so patterns need only match part of the filename, not the whole filename.
The body of the @setting @data active_path_ignore is a list of regex patterns, one per line. Directory entries matching any pattern in the list will be ignored. The names of directories used for matching will have forward slashes around them (‘/dirname/’), so patterns can use this to distinguish between directories and files.
The body of the @setting @data active_path_autoload is a list of regex patterns, one per line. File entries matching any pattern in the list will be loaded automatically. This works only with files, not directories (but you can load directories recursively anyway).
Set @bool active_path_load_docstring = True to have active_path load the docstring of .py files automatically. These nodes start with the special string:
@language rest # AUTOLOADED DOCSTRING
which must be left intact if you want active path to be able to double-click load the file later.
@float active_path_timeout_seconds (default 10.) controls the maximum time active_path will spend on a recursive operation.
@int active_path_max_size (default 1000000) controls the maximum size file active_path will open without query.
active_path is a rewrite of the at_directory plugin to use @path directives (which influence @auto and other @file type directives), and to handle sub-folders more automatically.
Synchronizes @folder nodes with folders.
If a node is named '@folder path_to_folder’, the content (filenames) of the folder and the children of that node will be sync. Whenever a new file is put there, a new node will appear on top of the children list (with mark). So that I can put my description (i.e. annotation) as the content of that node. In this way, I can find any files much easier from leo.
Moreover, I add another feature to allow you to group files(in leo) into children of another group. This will help when there are many files in that folder. You can logically group it in leo (or even clone it to many groups), while keep every files in a flat/single directory on your computer.
Executes commands in nodes whose body text starts with @produce.
To use, put in the body text of a node:
@produce javac -verbose Test.java
To execute, you goto Outline and look at Produce. Choose Execute All Produce or Execute Tree Produce. The Tree does the current Tree, All does the whole Outline. Executing will fire javac, or whatever your using. @produce functions as a directive. After executing, a log file/node is created at the top of the Outline. Any output, even error messages, should be there.
It executes in a hierarchal manner. Nodes that come before that contain @produce go first.
I’m hoping that this orthogonal to @run nodes and anything like that. Its not intended as a replacement for make or Ant, but as a simple substitute when that machinery is overkill.
WARNING: trying to execute a non-existent command will hang Leo.
Adds support for @clip, @view and @strip nodes.
This plugin also accumulates the effect of all @path nodes.
Allows arbitrary links between nodes.
Allows users to insert headlines containing dates.
‘Date nodes’ are nodes that have dates in their headlines. They may be added to the outline one at a time, a month’s-worth at a time, or a year’s-worth at a time. The format of the labels (headlines) is configurable.
There are options to omit Saturdays and Sundays.
An ‘Insert Date Nodes ...’ submenu will be created (by default) in the ‘Outline’ menu. This menu can be suppressed by using either of the following settings:
- @bool suppress-datenodes-menus
- @bool suppress-all-plugins-menus
The following commands are available for use via the minibuffer or in @menu/@popup settings.
- datenodes-today
- datenodes-this-month
- datenodes-this-year
Adds @expfolder nodes that represent folders in the file system.
Double clicking on the icon of an @expfolder heading reads the files in the directory at the path specified and creates child nodes for each file in the subfolder. Subdirectories are made into child @expfolder nodes so the tree can be easily traversed. If files have extensions specified in the expfolder.ini file they are made into @text nodes so the content of the files can be easily loaded into leo and edited. Double clicking a second time will delete all child nodes and refresh the directory listing. If there are any changed @text nodes contained inside you will be prompted about saving them.
The textextensions field on the expfolder Properties page contains a list of extensions which will be made into @text nodes, separated by spaces.
For the @text and @expfolder nodes to interact correctly, the textnode plugin must load before the expfolder plugin. This can be set using the Plugin Manager’s Plugin Load Order pane.
Defines actions taken when double-clicking on @<file> nodes and supports @file-ref nodes.
Double-clicking any kind of @<file> node writes out the file if changes have been made since the last save, and then runs a script on it, which is retrieved from the outline.
Scripts are located in a node whose headline is FileActions. This node can be anywhere in the outline. If there is more than one such node, the first one in outline order is used.
The children of that node are expected to contain a file pattern in the headline and the script to be executed in the body. The file name is matched against the patterns (which are Unix-style shell patterns), and the first matching node is selected. If the filename is a path, only the last item is matched.
Execution of the scripts is similar to the “Execute Script” command in Leo. The main difference is that the namespace in which the scripts are run contains these elements:
‘c’ and ‘g’ and ‘p’: as in the regular execute script command.
‘filename’: the filename from the @file directive.
external windows, thus permitting programs to be called that require user interaction
File actions are implemented for all kinds @<file> nodes. There is also a new node type @file-ref for referring to files purely for the purpose of file actions, Leo does not do anything with or to such files.
Creates a LeoCursor object that can walk around a Leo outline and decode attributes from nodes.
Node names can be used through . (dot) notation so cursor.Data.Name._B for example returns the body text of the Name node which is a child of the Data node which is a child of the cursors current location.
See .../plugins/examples/leocursorexample.leo for application.
Opens files with their default platform program.
Double-clicking @mime nodes will attempt to open the named file as if opened from a file manager. @path parent nodes are used to find the full filename path. Fore example:
@mime foodir/document.pdf
The string setting ‘mime_open_cmd’ allows specifying a program to handle opening files:
@settings
@string mime_open_cmd = see
.. or ..
@string mime_open_cmd = see %s
Where ‘%s’ is replaced with the full pathname.
Note: This plugin terminates handling of the ‘icondclick1’ event by returning True. If another plugin using this event (e.g. vim.py) is also enabled, the order in @enabled-plugins matters. For example: if vim.py is enabled before mime.py, double-clicking on an @mime node will both open the body text in [g]vim AND call the mime_open_cmd.
This plugin is complementary to the UNL.py plugin’s @url nodes. Use @url for opening either URLs or Uniform Node Locators in “*.leo” files and use @mime nodes for opening files on the local file system. It also replaces the startfile.py plugin, where here the headline must start with @mime to activate this plugin.
For other sys.platform’s, add an elif case to the section “guess file association handler” and either define a default _mime_open_cmd string, where “%s” will be replaced with the filename, or define a function taking the filename string as its only argument and set as open_func.
Allows Leo to write a file to multiple locations.
This plugin acts as a post-write mechanism, a file must be written to the file system for it to work. At this point it is not a replacement for @path or an absolute path, it works in tandem with them.
To use, place @multipath at the start of a line in the root node or an ancestor of the node. The format is (On Unix-like systems):
@multipath /machine/unit/:/machine/robot/:/machine/
New in version 0.6 of this plugin: the separator used above is ‘;’ not ‘:’, for example:
@multipath c:\prog\test;c:\prog\unittest
It will places copy of the written file in each of these directories.
There is an additional directive that simplifies common paths, it is called @multiprefix. By typing @multiprefix with a path following it, before a @multipath directive you set the beginning of the paths in the @multipath directive. For example:
#@multiprefix /leo #@multipath /plugins
or:
#@multiprefix /leo/
#@multipath plugins: fungus : drain
copies a file to /leo/plugins /leo/fungus /leo/drain.
Note I put # in front of the directives here because I don’t want someone browsing this file to accidentally save multiple copies of this file to their system :) )
The @multiprefix stays in effect for the entire tree until reset with another @multiprefix directive. @multipath is cumulative, in that for each @multipath in an ancestor a copy of the file is created. These directives must at the beginning of the line and by themselves.
Ensures that all descendants of @file-nosent nodes end with exactly one newline, replaces all tabs with spaces, and adds a newline before class and functions in the derived file.
Creates and updates @read-only nodes.
Here’s my first attempt at customizing leo. I wanted to have the ability to import files in “read-only” mode, that is, in a mode where files could only be read by leo (not tangled), and also kept in sync with the content on the drive.
The reason for this is for example that I have external programs that generate resource files. I want these files to be part of a leo outline, but I don’t want leo to tangle or in any way modify them. At the same time, I want them to be up-to-date in the leo outline.
So I coded the directive plugin. It has the following characteristics:
The syntax to access files in @read-only via ftp/http is the following:
@read-only http://www.ietf.org/rfc/rfc0791.txt
@read-only ftp://ftp.someserver.org/filepath
If FTP authentication (username/password) is required, it can be specified as follows:
@read-only ftp://username:password@ftp.someserver.org/filepath
For more details, see the doc string for the class FTPurl.
Davide Salomoni
Runs a program and interface Leos through its input/output/error streams.
Double clicking the icon box whose headlines are @run ‘cmd args’ will execute the command. There are several other features, including @arg and @input nodes.
The run_nodes.py plugin introduce two new nodes that transform leo into a terminal. It was mostly intended to run compilers and debuggers while having the possibility to send messages to the program.
Double clicking on the icon of an node whose headline is @run <command> <args> will launch <command> with the given arguments. It will also mark the node. # Terminates the argument list. @run # <comment> is also valid.
@in nodes are used to send input to the running process. Double clicking on the icon of an @in <message> node will append a “n” to <message> and write it to the program, no matter where the node is placed. If no @run node is active, nothing happens.
The body text of every child, in which the headlines do not begin with '@run‘ or '@in‘, will be appended to <command>, allowing you to add an unlimited number of arguments to <command>.
The output of the program is written in the log pane (Error output in red). When the program exit the node is set unmarked and the return value is displayed... When the enter key is pressed in the body pane of an active @run node the content of it body pane is written to the program and then emptied ready for another line of input. If the node have @run nodes in its descendants, they will be launched successively. (Unless one returned an exit code other than 0, then it will stop there)
By Alexis Gendron Paquette. Please send comments to the Leo forums.
Launches (starts) a file given by a headline when double-clicking the icon.
This plugin ignores headlines starting with an ‘@’. Uses the @folder path if the headline is under an @folder headline. Otherwise the path is relative to the Leo file.
Adds the Outline:XSLT menu containing XSLT-related commands.
This menu contains the following items:
Requires 4Suite 1.0a3 or better, downloadable from http://4Suite.org.
Allows interaction with shell apps via screen.
Analysis environments like SQL, R, scipy, ipython, etc. can be used by pasting sections of text from an editor (Leo) and a shell window. Results can be pasted back into the editor.
This plugin streamlines the process by communicating with screen, the shell multiplexer
Commands
Interactively get prefix for inserting text into body (#, –, //, etc/) Can also set using:
c.leo_screen.get_line_prefix = '#'
Settings
Theory of operation
leoscreen creates a instance at c.leo_screen which has some methods which might be useful in @button and other Leo contexts.
Example SQL setup
In a Leo file full of interactive SQL analysis, I have:
@settings
@string leoscreen_prefix = --SPACE
@button rollback
import time
c.leo_screen.run_text('ROLLBACK; -- %s\n' % time.asctime())
@button commit
import time
cmd = 'COMMIT; -- %s' % time.asctime()
c.leo_screen.run_text(cmd)
c.leo_screen.insert_line(cmd)
which creates a button to rollback messed up queries, another to commit (requiring additional action to supply the newline as a safeguard) and sets the prefix to “– ” for text pulled back from the SQL session into Leo.
Implementation note: screen behave’s differently if screen -X is executed with the same stdout as the target screen, vs. a different stdout. Although stdout is ignored, Popen() needs to ensure it’s not just inherited.
Creates script buttons and @button, @command, @plugin and @script nodes.
This plugin puts buttons in the icon area. Depending on settings the plugin will create the ‘Run Script’, the ‘Script Button’ and the ‘Debug Script’ buttons.
The ‘Run Script’ button is simply another way of doing the Execute Script command: it executes the selected text of the presently selected node, or the entire text if no text is selected.
The ‘Script Button’ button creates another button in the icon area every time you push it. The name of the button is the headline of the presently selected node. Hitting this newly created button executes the button’s script.
For example, to run a script on any part of an outline do the following:
That’s all.
For every @button node, this plugin creates two new minibuffer commands: x and delete-x-button, where x is the ‘cleaned’ name of the button. The ‘x’ command is equivalent to pushing the script button.
You can specify global buttons in leoSettings.leo or myLeoSettings.leo by putting @button nodes as children of an @buttons node in an @settings trees. Such buttons are included in all open .leo (in a slightly different color). Actually, you can specify global buttons in any .leo file, but @buttons nodes affect all later opened .leo files so usually you would define global buttons in leoSettings.leo or myLeoSettings.leo.
The cleaned name of an @button node is the headline text of the button with:
Thus, cleaning headline text converts it to a valid minibuffer command name.
You can delete a script button by right-clicking on it, or by executing the delete-x-button command.
The ‘Debug Script’ button runs a script using an external debugger.
This plugin optionally scans for @button nodes, @command, @plugin nodes and @script nodes whenever a .leo file is opened.
Such nodes may be security risks. This plugin scans for such nodes only if the corresponding atButtonNodes, atPluginNodes, and atScriptNodes constants are set to True in this plugin.
You can specify the following options in leoSettings.leo. See the node: @settings–>Plugins–>scripting plugin. Recommended defaults are shown:
@bool scripting-at-button-nodes = True
True: adds a button for every @button node.
@bool scripting-at-commands-nodes = True
True: define a minibuffer command for every @command node.
@bool scripting-at-plugin-nodes = False
True: dynamically loads plugins in @plugins nodes when a window is created.
@bool scripting-at-script-nodes = False
True: dynamically executes script in @script nodes when a window is created.
This is dangerous!
@bool scripting-create-debug-button = False
True: create Debug Script button.
@bool scripting-create-run-script-button = False
True: create Run Script button.
Note: The plugin creates the press-run-script-button regardless of this setting.
@bool scripting-create-script-button-button = True
True: create Script Button button in icon area.
Note: The plugin creates the press-script-button-button regardless of this setting.
@int scripting-max-button-size = 18
The maximum length of button names: longer names are truncated.
You can bind key shortcuts to @button and @command nodes as follows.
@button name @key=shortcut
Binds the shortcut to the script in the script button. The button’s name is ‘name’, but you can see the full headline in the status line when you move the mouse over the button.
@command name @key=shortcut
Creates a new minibuffer command and binds shortcut to it. As with @buffer nodes, the name of the command is the cleaned name of the headline.
This plugin is based on ideas from e’s dynabutton plugin, quite possibly the most brilliant idea in Leo’s history.
You can run the script with sys.argv initialized to string values using @args. For example:
@button test-args @args = a,b,c
will set sys.argv to [u’a’,u’b’,u’c’]
Sends output from the Execute Script command to the end of the body pane.
Remote control for Leo.
Example client:
from leo.external import lproto
import os
addr = open(os.path.expanduser('~/.leo/leoserv_sockname')).read()
print("will connect to",addr)
pc = lproto.LProtoClient(addr)
pc.send("""
g.es("hello world from remote")
c = g.app.commanders()[0]
""")
# note how c persists between calls
pc.send("""c.k.simulateCommand('stickynote')""")
A minimal http plugin for LEO, based on AsyncHttpServer.py.
Use this plugin is as follows:
Start Leo with the plugin enabled. You will see a purple message that says something like:
"http serving enabled on port 8080, version 0.91"
Start a web browser, and enter the following url: http://localhost:8080/
You will see a a “top” level page containing one link for every open .leo file. Start clicking :-)
You can use the browser’s refresh button to update the top-level view in the browser after you have opened or closed files.
To enable this plugin put this into your file:
@settings
@bool http_active = True
@int port = 8080
@string rst_http_attributename = 'rst_http_attribute'
Note: the browser_encoding constant (defined in the top node of this file) must match the character encoding used in the browser. If it does not, non-ascii characters will look strange.
Creates stand-alone slideshows containing screenshots.
This plugin defines five commands. The apropos-slides command prints this message to Leo’s log pane. The slide-show-info command prints the settings in effect.
The make-slide and make-slide-show commands, collectively called slide commands, create collections of slides from @slideshow trees containing @slide nodes.
Slides may link to screenshots. The slide commands can generate screenshots from @screenshot-tree nodes, but this feature has proven to be clumsy and inflexible. It is usually more convenient to use screenshots taken with a program such as Wink. The meld-slides command creates references to externally-generated screenshots within @slide nodes.
@slide nodes may contain @url nodes. These @url nodes serve two purposes. First, they allow you to see various files (slides, initial screenshots, working files and final screenshots). Second, these @url nodes guide the meld script and the four commands defined by this plugin (see below). By inserting or deleting these @url nodes you (or your scripts) can customize how the commands (and meld) work. In effect, the @url nodes become per-slide settings.
Prerequisites
Summary
Options are child nodes of @slideshow or @slide nodes that control the make-slide and make-slide-show commands. See the Options section below.
The make-slide and make-slide-show commands create the following @url nodes as children of each @slide node:
Thus, to completely recreate an @slide node, you must delete any of the following nodes that appear as its children:
@url screenshot
@url working file
@url built slide
Making slides
For each slide, the make-slide and make-slide-show commands do the following:
If the @slide node contains an @screenshot tree, the plugin appends an .. image:: directive referring to the screenshot to the body text of the @slide node. The plugin also creates a child @image node referring to the screenshot.
The plugin creates a screenshot for an @slide node only if the @slide node contains an @screenshot node as a direct child.
Important: this step has largely been superseded by the @button meld script in LeoDocs.leo.
Taking a screenshot involves the following steps:
- Create the target outline: screenshot-setup.leo.
The target outline contains consists of all the children (and their descendants) of the @screenshot node.
- Create the screenshot, a bitmap (PNG) file.
The slide commands take a screen shot of the target outline. The @pause option opens the target outline but does not take the screenshot. The user must take the screenshot manually. For more details, see the the options section below.
- Convert the screenshot file to a work file.
The work file is an SVG (Scalable Vector Graphics) file: http://www.w3.org/Graphics/SVG/.
- (Optional) Edit the work file.
If the @slide node has a child @edit node, the plugin opens Inkscape so that the user can edit the work file.
- Render the final output file.
The plugin calls Inkscape non-interactively to render the final output file (a PNG image) from the work file. If the Python Imaging Library (PIL) is available, this step will use PIL to improve the quality of the final output file.
After making all files, the plugins runs Sphinx by running ‘make html’ in the slideshow folder. This command creates the final .html files in the _build/html subfolder of the slideshow folder.
Depending on options, and already-existing @url nodes, the make-slide and make-slide-show commands may create one or more of the following @url nodes:
@url built slide @url screenshot @url working file @url final output file
Options and settings
You specify options in the headlines of nodes. Global options appear as direct children of @slideshow nodes and apply to all @slide nodes unless overridden by a local option. Local options appear as direct children of an @slide node and apply to only to that @slide node.
Global options nodes
The following nodes may appear either as a direct child of the @slideshow node or as the direct child of an @slide node.
The pattern used to generate patterns for one slide or the entire slideshow. The title is computed as follows:
d = {
'slideshow_name':slideshow_name,
'slide_name': slide_name,
'slide_number': sc.slide_number,
}
title = (pattern % (d)).title()
If neither an @title or @title_pattern option node applies, the title is the headline of the @slide node. If this is empty, the default pattern is:
'%(slideshow_name)s:%(slide_number)s'
Local options nodes
The following nodes are valid only as the direct child of an @slide node.
If True (or true or 1) the user must take the screenshot manually. Otherwise, the plugin takes the screenshot automatically.
If the slide node contains an @pause node as one of its directive children, the slide commands open the target node, but do not take a screen shot.
The user may adjust the screen as desired, for example by selecting menus or showing dialogs. The user must then take the screen shot manually. Important: the screenshot need not be of Leo–it could be a screenshot of anything on the screen.
As soon as the user closes the target outline, the slide commands look for the screen shot on the clipboard. If found, the slide commands save the screenshot to the screenshot file.
Settings
File names
Suppose the @slide node is the n’th @slide node in the @slideshow tree whose sanitized name is ‘name’. The following files will be created in (relative to) the slideshow directory:
slide-n.html.txt: the slide's rST source.
screenshot-n.png: the original screenshot.
screenshot-n.svg: the working file.
slide-n.png: the final output file.
_build/html/slide-n.html: the final slide.
Support slideshows in Leo outlines.
This plugin defines four new commands:
Slides shows consist of a root @slideshow node with descendant @slide nodes. @slide nodes may be organized via non-@slide nodes that do not appear in the slideshow.
All these commands ignore @ignore trees.
Manages BibTeX files with Leo.
Create a bibliographic database by putting '@bibtex filename’ in a headline. Entries are added as nodes, with '@entrytype key’ as the headline, and the contents of the entry in body text. The plugin will automatically insert a template for the entry in the body pane when a new entry is created (hooked to pressing enter when typing the headline text). The templates are defined in dictionary ‘templates’ in the <<globals>> section, by default containing all required fields for every entry.
The file is written by double-clicking the node. Thus the following outline:
-@bibtex biblio.bib
+@book key
author = {A. Uthor},
year = 1999
will be written in the file ‘biblio.bib’ as:
@book{key,
author = {A. Uthor},
year= 1999}
Strings are defined in @string nodes and they can contain multiple entries. All @string nodes are written at the start of the file. Thus the following outline:
-@bibtext biblio.bib
+@string
j1 = {Journal1}
+@article AUj1
author = {A. Uthor},
journal = j1
+@string
j2 = {Journal2}
j3 = {Journal3}
Will be written as:
@string{j1 = {Journal1}}
@string{j2 = {Journal2}}
@string{j3 = {Journal3}}
@article{AUj1,
author = {A. Uthor},
journal = j1}
No error checking is made on the syntax. The entries can be organized under nodes — if the headline doesn’t start with ‘@’, the headline and body text are ignored, but the child nodes are parsed as usual.
BibTeX files can be imported by creating an empty node with '@bibtex filename’ in the headline. Double-clicking it will read the file ‘filename’ and parse it into a @bibtex tree. No syntax checking is made, ‘filename’ is expected to be a valid BibTeX file.
Sends code to the doctest module and reports the result.
When the Dtest plugin is enabled, the dtest command is active. Typing:
Alt-X dtest
will run doctest on a file consisting of the current node and it’s children. If text is selected only the selection is tested.
From Wikipedia:
'Doctest' is a module included in the Python programming language's
standard library that allows for easy generation of tests based on
output from the standard Python interpreter.
http://tinyurl.com/cqh53 - Python.org doctest page
http://tinyurl.com/pxhlq - Jim Fulton’s presentation:
Literate Testing:
Automated Testing with doctest
Converts a leo outline to an html web page.
This plugin takes an outline stored in LEO and converts it to html which is then either saved in a file or shown in a browser. It is based on the original leoToHTML 1.0 plugin by Dan Rahmel which had bullet list code by Mike Crowe.
The outline can be represented as a bullet list, a numbered list or using html <h?> type headings. Optionally, the body text may be included in the output.
If desired, only the current node will be included in the output rather than the entire outline.
An xhtml header may be included in the output, in which case the code will be valid XHTML 1.0 Strict.
The plugin is fully scriptable as all its functionality is available through a Leo_to_HTML object which can be imported and used in scripts.
Menu items and @settings
If this plugin loads properly, the following menu items should appear in your File > Export... menu in Leo:
Save Outline as HTML (equivalent to export-html)
Save Node as HTML (equivalent to export-html-node)
Show Outline as HTML (equivalent to show-html)
Show Node as HTML (equivalent to show-html-node)
Unless the following appears in an @setting tree:
@bool leo_to_html_no_menus = True
in which case the menus will not be created. This is so that the user can use @menu and @item to decide which commands will appear in the menu and where.
Commands
Several commands will also be made available
The following commands will start a browser showing the html.
The following commands are the same as above except only the current node is converted:
export-html-node
export-html-node-*
show-html-node
show-html-node-*
Properties
There are several settings that can appear in the leo_to_html.ini properties file in leo’s plugins folder or be set via the Plugins > leo_to_html > Properties... menu. These are:
If this is ‘bullet’ then the output will be in the form of a bulleted list. If this is ‘number’ then the output will be in the form of a numbered list. If this is ‘heading’ then the output will use <h?> style headers.
Anything else will result in <h?> type tags being used where ‘?’ will be a digit starting at 1 and increasing up to a maximum of six depending on depth of nesting. Default: number
Set this to the command needed to launch a browser on your system or leave it blank to use your systems default browser.
If this is an empty string or the browser can not be launched using this command then python’s webbrowser module will be tried. Using a bad command here will slow down the launch of the default browser, better to leave it blank. Default: empty string
Configuration
At present, the file leo/plugins/leo_to_html.ini contains configuration settings. In particular, the default export path, “c:” must be changed for *nix systems.
Outputs a Leo outline as a numbered list to an RTF file. The RTF file can be loaded into Microsoft Word and formatted as a proper outline.
If this plug-in loads properly, you should have an “Outline to Microsoft RTF” option added to your File > Export... menu in Leo.
Settings such as outputting just the headlines (vs. headlines & body text) and whether to include or ignore the contents of @file nodes are stored in the rtf_export.ini file in your Leoplugins folder.
The default export path is also stored in the INI file. By default, it’s set to c:so you may need to modify it depending on your system.
Supports Uniform Node Locators (UNL’s) for linking to nodes in any Leo file.
UNL’s specify nodes within any Leo file. You can use them to create cross-Leo-file links! UNL
This plugin consists of two parts:
Format of UNL’s:
UNL’s referring to nodes within the present outline have the form:
headline1-->headline2-->...-->headlineN
headline1 is the headline of a top-level node, and each successive headline is the headline of a child node.
UNL’s of the form:
file:<path>#headline1-->...-->headlineN
refer to a node specified in <path> For example, double clicking the following headline will take you to Chapter 8 of Leo’s Users Guide:
@url file:c:/prog/leoCvs/leo/doc/leoDocs.leo#Users Guide-->Chapter 8: Customizing Leo
For example, suppose you want to email someone with comments about a Leo file. Create a comments.leo file containing @url UNL nodes. That is, headlines are @url followed by a UNL. The body text contains your comments about the nodes in the _other_ Leo file! Send the comments.leo to your friend, who can use the comments.leo file to quickly navigate to the various nodes you are talking about. As another example, you can copy UNL’s into emails. The recipient can navigate to the nodes ‘by hand’ by following the arrows in the UNL.
Notes:
Creates hoist buttons.
This plugin puts two buttons in the icon area: a button called ‘Save Hoist’ and a button called ‘Dehoist’. The ‘Save Hoist’ button hoists the presently selected node and creates a button which can later rehoist the same node. The ‘Dehoist’ button performs one level of dehoisting
Requires at least version 0.19 of mod_scripting.
Colorizes URLs everywhere in node’s body on node selection or saving. Double click on any URL launches it in default browser.
URL regex: (http|https|file|ftp)://[^s’”]+[w=/]
Related plugins: color_markup.py; rClick.py
Lets the user to associate text with a specific node.
Summon it by pressing button-2 or button-3 on an icon Box in the outline. This will create an attribute editor where the user can add, remove and edit attributes. Since attributes use the underlying tnode, clones will share the attributes of one another.
Adds buttons so Leo can interact with command line environments.
20100226: | see also leoscreen.py for a simpler approach. |
---|
Currently implements bash shell and psql (postresql SQL db shell).
Single-line commands can be entered in the headline with a blank body, multi-line commands can be entered in the body with a descriptive title in the headline. Press the bash or psql button to send the command to the appropriate interpreter.
The output from the command is always stored in a new node added as the first child of the command node. For multi-line commands this new node is selected. For single-line command this new node is not shown, instead the body text of the command node is updated to reflect the most recent output. Comment delimiter magic is used to allow single-line and multi-line commands to maintain their single-line and multi-line flavors.
Both the new child nodes and the updated body text of single-line commands are timestamped.
For the bash button the execution directory is either the directory containing the .leo file, or any other path as specified by ancestor @path nodes.
Currently the psql button just connects to the default database. ”;” is required at the end of SQL statements.
Requires pexpect module.
Maximizes all new windows.
Sets a hard coded frame size.
Prevents Leo from setting custom frame size (e.g. from an external .leo document)
Sends all output to the log pane.
Replaces the gui file dialogs on Linux with external calls to the zenity gtk dialog package.
This plugin is more a proof of concept demo than a useful tool. The dialogs presented do not take filters and starting folders can not be specified.
Despite this, some Linux users might prefer it to the gui dialogs.
Edits user attributes in a Qt frame.
This plugin creates a frame for editing attributes similar to:
Name: Fred Blogs
Home: 555-555-5555
Work: 555-555-5556
attrib_edit is also intended to provide attribute editing for other plugins, see below.
The attributes can be stored in different ways, three modes are implemented currently:
The plugin defines the following commands, available either in the plugin’s sub-menu in the Plugins menu, or as Alt-X attrib-edit-*.
Select which attribute setting / getting modes to use. More than one mode can be used at the same time.
You can also control which modes are active by listing them with the @data attrib_edit_active_modes setting. For example:
Field:
@Child
# v.u mode
would cause only the “Field:” and “@Child” modes to be active be default.
Create a new attribute on the current node. If Field: or @Child modes are active, they simply remind you how to create an attribute in the log pane. If the “v.u mode” mode is active, you’re prompted for a path for the attribute. For example:
addressbook First
to store the attribute in v.u[‘addressbook’][‘_edit’][‘First’]
As a convenience, entering a path like:
todo metadata created|creator|revised
would create:
v.u.['todo']['metadata']['_edit']['created']
v.u.['todo']['metadata']['_edit']['creator']
v.u.['todo']['metadata']['_edit']['revised']
Technical details
See the source for complete documentation for use with other plugins. Here are some points of interest:
Manipulates appearance of individual tree widget items.
This plugin is mostly an example of how to change the appearance of headlines. As such, it does a relatively mundane chore of highlighting @thin, @auto, @shadow nodes in bold.
Creates a wizard that creates @auto nodes.
Opens a file dialog and recursively creates @auto & @path nodes from the path where the selected file is (the selected file itself doesn’t matter.)
Adds a fast-to-use search widget, like the “Find in files” feature of many editors.
Just load the plugin, activate “Nav” tab, enter search text and press enter.
The pattern to search for is, by default, a case insensitive fnmatch pattern (e.g. foo*bar), because they are typically easier to type than regexps. If you want to search for a regexp, use ‘r:’ prefix, e.g. r:foo.*bar.
Regexp matching is case sensitive; if you want to do a case-insensitive regular expression search (or any kind of case-sensitive search in the first place), do it by searching for “r:(?i)Foo”. (?i) is a standard feature of Python regular expression syntax, as documented in
http://docs.python.org/library/re.html#regular-expression-syntax
Provides a Scrolled Message Dialog service for Qt.
The plugin can display messages supplied as plain text or formatted as html. In addition the plugin can accept messages in rst format and convert them to be displayed as html.
The displayed format can be controlled by the user via check boxes, so rst messages may be viewed either as text or as html. Html messages can also be viewed as raw text, which will be a good debug feature when creating complex dynamically generated html messages.
The user interface is provided by a ScrolledMessage.ui file which is dynamically loaded each time a new dialog is loaded.
The dialog is not modal and many dialogs can exist at one time. Dialogs can be named and output directed to a dialog with a specific name.
The plugin is invoked like this:
g.doHook('scrolledMessage', c=c, msg='message', title='title', ...etc )
or:
g.app.gui.runScrolledMessageDialog(c=c, ...etc)
All parameters are optional except c.
Parameters
The text to be displayed (html, rst, plain).
If the text starts with ‘rst:’ it is assumed to be rst text and is converted to html for display after the rst: prefix has been removed. If the text starts with ‘<’ it is assumed to be html. These auto detection features can be overridden by ‘flags’.
Says what kind of message: ‘rst’, ‘text’, ‘html’. This overrides auto-detection.
Flags can be combined, for example, ‘rst html’ causes the message to be interpreted as rst and displayed as html.
Launches the spyder environment with access to Leo instance. See http://packages.python.org/spyder/
Execute alt-x spyder-launch to start spyder. Execute alt-x spyder-update to pass current c,p,g to spyder interactive session. spyder-update also shows the window if it was closed before.
Adds simple “sticky notes” feature (popout editors) for Qt gui.
Adds the following (Alt-X) commands:
Sticky notes are synchronized (both ways) with their parent Leo node.
Encrypted mode requires the python-crypto module.
The first time you open a note in encrypted mode you’ll be asked for a pass phrase. That phrase will be used for the rest of the session, you can change it with Alt-X stickynoteenckey, but probably won’t need to.
The encrypted note is stored in base64 encoded encrypted text in the parent Leo node, if you forget the pass phrase there’s no way to un-encrypt it again. Also, you must not edit the text in the Leo node.
When creating an encrypted note, you should start with an empty node. If you want to encrypt text that already exists in a node, select-all cut it to empty the node, then paste it into the note.
Provides to-do list and simple task management for leo (Qt only).
This plugin adds time required, progress and priority settings for nodes. With the @project tag a branch can display progress and time required with dynamic hierarchical updates.
For full documentation see:
Creates a window for live rendering of rst, html, etc. Qt only.
viewrendered.py creates a single Alt-X style command, viewrendered, which opens a new window where the current body text is rendered as HTML (if it starts with ‘<’), or otherwise reStructuredText. reStructuredText errors and warnings may be shown. For example, both:
Heading
-------
`This` is **really** a line of text.
and:
<h1>Heading<h1>
<tt>This</tt> is <b>really</b> a line of text.
will look something like:
Heading
This is really a line of text.
Adds a graph layout for nodes in a tab. Requires Qt and the backlink.py plugin.