On Wed, 5 Oct 2011 13:49:18 -0700 (PDT)
Todd Mars <[email protected]> wrote:
> Can I export text representation with both headlines and bodies in a
> simple outline structure? (like a text dump)Perhaps there is a way to
> do this in rst but output defaults to all left justified.
> thanks!
If you do File -> Export -> Show node as HTML... oh wait, that's
headlines only. Anyway, if you do that, it gives you the text in a
browser window which you can save as text (which includes numbering) or
copy / paste to a text file, which may remove the numbering.
You could make a node `@button export` along these lines:
def export_text(p, level=0):
indent = ' '*3*level+'o '
print(indent+p.h)
if p.b.strip():
indent =' '*3*level+' '
print('\n'.join(indent+i for i in p.b.strip().split('\n')))
for child in p.children():
export_text(child, level+1)
for i in c.getSelectedPositions():
export_text(i)
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.