Edit detail for LeoToHTML revision 5 of 5

1 2 3 4 5
Editor: SegundoBob
Time: 2010/08/30 15:55:32 GMT-7
Note: Working around problems with "Save node as HTML" under Ubuntu

-From SegundoBob Mon Aug 30 15:00:28 -0700 2010
From !SegundoBob Mon Aug 30 15:00:28 -0700 2010

-From: SegundoBob
From: !SegundoBob

-linux2    (Ubuntu Studio 10.04)<br> 
linux2    (Ubuntu Studio 10.04)<br>


-leo_to_html: failed writing to /home/bob/c:/BalancePortfolio.html<br>
leo_to_html: failed writing to /home/bob/c:/!BalancePortfolio.html<br>



-Note that "Properties" is misspelled.<br> 
Note that "Properties" is misspelled.<br>


-IOError: [Errno 13] Permission denied: u'/usr/share/pyshared/leo/ 
!IOError: [Errno 13] Permission denied: u'/usr/share/pyshared/leo/ 

-sudo gedit /usr/share/pyshared/leo/plugins/leo_to_html.ini<br> 
sudo gedit /usr/share/pyshared/leo/plugins/leo_to_html.ini<br>


-    flagjustheadlines = No<br> 
    flagjustheadlines = No<br>

leoToHTML 1.1 plugin by Dan Rahmel, bullet list code by Mike Crowe.

This plugin takes an outline stored in LEO and outputs it as an HTML file. The outline is output as either a set of headings or an unordered list.

If this plug-in loads properly, you should have an "Outline to HTML" option added to your File > Export... menu in Leo.

Settings such as outputing just the headlines (vs. headlines & body text) and whether to include or ignore the contents of @file nodes are stored in the html_export.ini file in your Leo\plugins 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.


Working around problems with "Save node as HTML" under Ubuntu --SegundoBob, Mon, 30 Aug 2010 15:00:28 -0700 reply

I'm using:
Leo 4.7.1 final, build 3005, February 26, 2010
Python 2.6.5, qt version 4.6.2
linux2 (Ubuntu Studio 10.04)

I selected the root of a subtree I wanted to convert to HTML, then I clicked:
File -> Export -> Save node as HTML

This failed with these messages in the log pane:
leo_to_html: running ...
leo_to_html: failed writing to /home/bob/c:/BalancePortfolio.html
leo_to_html: done

Examining the source code, I guessed that I should change the "exportPath" that is set in the leo-to-HTML properties menu:
Plugins -> Leo-to-html -> Properties

But clicking Properties only displayed this error message in the log pane:
Properies menu not supported for Qt gui
Note that "Properties" is misspelled.

I then started leo with the tk gui (--gui=tk).
The export path default shows "c:\".
I cleared the export path and clicked OK, but this only displayed these errors in the log pane:

Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/leo/core/leoCommands.py", line 366, in doCommand
val = command(event)
File "/usr/share/pyshared/leo/plugins/plugins_menu.py", line 530, in properties
File "/usr/share/pyshared/leo/plugins/plugins_menu.py", line 549, in writeConfiguration
f = open(self.configfilename, "w")
IOError: [Errno 13] Permission denied: u'/usr/share/pyshared/leo/ core/../plugins/leo_to_html.ini'

So I used an editor to directly edit the .ini file as the super user:
sudo gedit /usr/share/pyshared/leo/plugins/leo_to_html.ini

Change line:
exportpath = c:\
exportpath =

Because I also want the node bodies, I changed Line:
flagjustheadlines = Yes
flagjustheadlines = No

This worked around my problems with "Save node as HTML". I hope this narrative helps others with similar problems and someone who generates a patch to improve "Save node as HTML".