Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Leo php export for use on a server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard  
View profile  
 More options Apr 25 2012, 6:38 am
From: Richard <richardjohnl...@gmail.com>
Date: Wed, 25 Apr 2012 03:38:22 -0700 (PDT)
Local: Wed, Apr 25 2012 6:38 am
Subject: Leo php export for use on a server

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?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wilkie  
View profile  
 More options Apr 25 2012, 1:46 pm
From: Matt Wilkie <map...@gmail.com>
Date: Wed, 25 Apr 2012 10:46:13 -0700
Local: Wed, Apr 25 2012 1:46 pm
Subject: Re: Leo php export for use on a server
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).

--matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Wilkie  
View profile  
 More options Apr 25 2012, 1:53 pm
From: Matt Wilkie <map...@gmail.com>
Date: Wed, 25 Apr 2012 10:53:21 -0700
Local: Wed, Apr 25 2012 1:53 pm
Subject: Re: Leo php export for use on a server

> 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".

[1] http://webpages.charter.net/edreamleo/FAQ.html#how-can-i-use-leo-coop...
[2] http://webpages.charter.net/edreamleo/FAQ.html#how-do-i-inhibit-senti...

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.

--
-matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard  
View profile  
 More options Apr 25 2012, 2:32 pm
From: Richard <richardjohnl...@gmail.com>
Date: Wed, 25 Apr 2012 11:32:16 -0700 (PDT)
Local: Wed, Apr 25 2012 2:32 pm
Subject: Re: Leo php export for use on a server

Thank you very much.

Export >> Remove Sentinals works great.

I had tried that before but for some reason had assumed that I was
selecting where to save the exported file and not which file to export.
*DOH*

Thanks again


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Edward K. Ream  
View profile  
 More options Apr 25 2012, 2:49 pm
From: "Edward K. Ream" <edream...@gmail.com>
Date: Wed, 25 Apr 2012 13:49:31 -0500
Local: Wed, Apr 25 2012 2:49 pm
Subject: Re: Leo php export for use on a server

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.

Edward


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard  
View profile  
 More options Apr 25 2012, 6:19 pm
From: Richard <richardjohnl...@gmail.com>
Date: Wed, 25 Apr 2012 15:19:33 -0700 (PDT)
Local: Wed, Apr 25 2012 6:19 pm
Subject: Re: Leo php export for use on a server

Thanks for the information.

I think I need to upgrade my python skills before I attempt anything like
that.

I've had a look through some of the code you mentioned and when I do get
around to attempting this I'm sure I'll be back for your help.

Thanks,
Richard


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Apr 26 2012, 3:42 am
From: HansBKK <hans...@gmail.com>
Date: Thu, 26 Apr 2012 00:42:40 -0700 (PDT)
Local: Thurs, Apr 26 2012 3:42 am
Subject: Re: Leo php export for use on a server

On Thursday, April 26, 2012 1:49:31 AM UTC+7, 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.

Wouldn't the use of @shadow also satisfy this use case, but more
transparently?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »