Is there a way to prepare php/html files for use on a server?
At the moment i have a leo workbook containing php, javascript and html files and nodes.
Is there a way to export files and strip leo comments/node information so that I can put these files onto a web server? Or is there another way to accomplish this that I am missing?
This should be a non-issue, Leo is supposed to insert it's sentinels
(the name for Leo's metadata inserts and comments stored in @file
contents on disk) in the language's native comment delimiters so the
interpreter ignores them. This works for the languages I use, python
and dos batch files, but maybe the php/js ones leak a little.(?)
One method to save files without sentinels:
1. change the @file headline to @no-sent, save,
2. copy the output files somewhere else, then
3. change the headline back to @file (and save).
On Wed, Apr 25, 2012 at 3:38 AM, Richard <richardjohnl...@gmail.com> wrote:
> Is there a way to prepare php/html files for use on a server?
> At the moment i have a leo workbook containing php, javascript and html
> files and nodes.
> Is there a way to export files and strip leo comments/node information so
> that I can put these files onto a web server?
> Or is there another way to accomplish this that I am missing?
I thought there was a FAQ for this, but the closest match I found is
how to always work without sentinels[1,2], which is a different
scenario from "export this node tree without sentinels".
I found a menu item, "File >> Export >> Remove Sentinels" that works,
albeit in a strange (to me) fashion. Rather than operate on the
currently selected node it requires one to navigate to a file stored
on disk using the standard OS file chooser and then writes
"foobar.ext.txt" to the same directory.
So it's clunky, but a bit less so than the manual
@file-->@no-sent-->@file method I outlined earlier.
On Wednesday, April 25, 2012 6:53:21 PM UTC+1, Matt Wilkie wrote:
> > One method to save files without sentinels:
> I thought there was a FAQ for this, but the closest match I found is > how to always work without sentinels[1,2], which is a different > scenario from "export this node tree without sentinels".
> I found a menu item, "File >> Export >> Remove Sentinels" that works, > albeit in a strange (to me) fashion. Rather than operate on the > currently selected node it requires one to navigate to a file stored > on disk using the standard OS file chooser and then writes > "foobar.ext.txt" to the same directory.
> So it's clunky, but a bit less so than the manual > @file-->@no-sent-->@file method I outlined earlier.
On Wed, Apr 25, 2012 at 1:32 PM, Richard <richardjohnl...@gmail.com> wrote:
> Thank you very much.
> Export >> Remove Sentinals works great.
Glad to hear it. And thanks to Matt for his comments.
The great thing about Python (and Leo) is that you can create a Leo
script based on the remove-sentinels command that will be easier to
use than using the system's file-save dialog.
A little searching (I never remember these kinds of details) leads to
the following node in leoPy.leo:
Code-->Core classes-->@file leoImport.py--><< class leoImportCommands
>>-->Export-->ic.removeSentinelsCommand--><< Write s into newFileName
You can use this as the nucleus of (say) an @button script that will
automatically convert an @file tree to a corresponding file without
sentinels.
If you decide to do this, please feel free to ask whatever questions
you might have. I'm always happy to help script writers, and it's a
lot easier for me because I know what kind of searches will yield the
info I want.
On Wednesday, April 25, 2012 7:49:31 PM UTC+1, Edward K. Ream wrote:
> On Wed, Apr 25, 2012 at 1:32 PM, Richard <richardjohnl...@gmail.com> > wrote: > > Thank you very much.
> > Export >> Remove Sentinals works great.
> Glad to hear it. And thanks to Matt for his comments.
> The great thing about Python (and Leo) is that you can create a Leo > script based on the remove-sentinels command that will be easier to > use than using the system's file-save dialog.
> A little searching (I never remember these kinds of details) leads to > the following node in leoPy.leo:
> Code-->Core classes-->@file leoImport.py--><< class leoImportCommands > >>-->Export-->ic.removeSentinelsCommand--><< Write s into newFileName
> You can use this as the nucleus of (say) an @button script that will > automatically convert an @file tree to a corresponding file without > sentinels.
> If you decide to do this, please feel free to ask whatever questions > you might have. I'm always happy to help script writers, and it's a > lot easier for me because I know what kind of searches will yield the > info I want.