Edit detail for Plumloco revision 24 of 24

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Editor: plumloco
Time: 2008/01/01 04:55:37 GMT-8
Note:

changed:
-I am currently working on a WxPythonGui plugin for leo, which is a development of Edwards original prototype.
I am currently working on a WxPythonGui plugin for leo, which is a development of Edward's original prototype.

WxPytonGui

I am currently working on a WxPythonGui plugin for leo, which is a development of Edward's original prototype.

This will be found as __alt_wx_gui.py in the plugin directory.

GtkDialogs

Linux users may be interested in GtkDialogs, which is a plugin that replaces leo's Tk file selection dialogs with the equivelent Gtk dialogs.

You need reasonably modern gtk and pygtk packages installed on your system, but it is likely that most modern graphical systems (other than pure KDE installations) will already have everything needed already installed.

Leo outline to valid xhtml script.

Here is a simple script that will convert the headlines in a leo outline to VALID xhtml list format (<ol><li> etc).

outline_to_valid_xhtml.py

The result of applying the script to leoOPML.leo can be seen at:

http://plumloco.co.uk/leo_outline_to_xhtml/

Leo outline to dhtml demo script.

I have produced a demo script that will convert a leo outline to dhtml.

The result of applying the script to leoOPML.leo can be seen at:

http://plumloco.co.uk/leo_outline_to_dhtml/

The result of applying the script with no javascript or styling can be seen here.

http://plumloco.co.uk/leo_outline_to_dhtml_raw/

The source can be found here. (I've had to move it because my computer is blocking uploads to zwiki.)

outline_to_dhtml_demo.py

The script should be put in a node of the file you wish to convert, and run from a button.

You need to change the name of the destination folder at the top of the script to one that suits you. All output files will then be put in that folder.

Three files are produced in the destination folder. Point a browser (firefox, opera AND ie) to index.html to see the results. Two frames are used, one on the right for the headlines and one on the left for body text. Clicking on a headline will show the body text for that headline, if the headline has children, the visibility of the child nodes will be toggled.

This is a simple implementation for demonstration purposes only, but it could be built into a decent plugin, or at least serve as a starting point for something better.

The routine for converting the headlines to xhtml is the same one I already use to convert them to valid xhtml using <ul> and <li>.

Have simplified the javascript and modified it to be safe with <ol><li> tags again.

This is a prelude to a full function xhtml/dhtml plugin, and suggestions, advice or contributions will be gratefully received.