The AutoTrees? plugin is a helper plugin designed to make it very easy to write "hanlder" plugins to manage dynamic content in Leo outlines. AutoTrees? provides:

AutoTrees? doesn't do anything that you cannot do in other ways, but it does provide a consistent way of adding dynamic content. This means that individual plugin writers don't have to rewrite all the same kinds of code each time and also makes it easier to maintain Leo, since it standardizes the way that certain classes of plugin interact with the Leo core.

Why use this? I'm a plugin writer and I want to write a plugin to display dynamic content - ie content not directly contained in the .leo or derived files, e.g.,

You can do this as a standard plugin, but as an AutoTrees? handler you,

Details. AutoTrees? is itself a plugin. When it starts it,

  1. Scans the leopluginstrees folder to find handlers.
  2. Activates specific handlers (this is managed via a plugin manager type window).
  3. Waits for clicks and double-clicks on special nodes.

To create an AutoTree? node, you add a node with @auto-my_handler. The @auto tells the plugin to go and look for the "my_handler" handler, if it is enabled. The handler is then called and this is then used to populate the node body and child nodes below this node.

For example, for an @auto-rss node, the node headline is "@auto-rss http://myurl/news.xml". The handler goes to the URL mentioned and downloads the news stories. It then creates child nodes for each story and populates the bodies.

For example handlers, see the source code in leoPlugins.leo