On Friday, August 21, 2020 at 4:08:35 PM UTC+2, k-hen wrote:
>
> Thank you for the import script and the responses.
>
> I feel like maybe I'm missing something with @nosent though, why is it 
> much harder to use? 
>
> Let's say I have a directory of files that are each templated, i.e. 
> possibly having a header and footer. 
> These files are checked into git and synchronized using @auto nodes and 
> can both be edited and read _into_ Leo when changes occur, e.g. after git 
> pulling.
> Then I can clone the body (inner section) of these nodes and write them 
> out somewhere else using an @nosent file.
> Never would I want a change to this output file to be read back _into_ Leo.
> This file is local only and would not be checked into git, it could be 
> deleted and would always be overwritten.
> As you know, Git prefers small files rather than large ones and this one 
> could be quite massive and treated as a 'large file' and therefore lose 
> certain functionality. 
>
> Sure a script could do this too, but it's a poor man's version of using 
> includes. 
>
>
>

You can try md_docer plug-in or write your own scripts using the code from 
md_docer as an inspiration.

In almost all my Leo documents now, the first thing I do is to add a node 
with the headline '@button nsave @key=Ctrl-s'. So, whenever I press Ctrl-s 
to save my Leo document, script in this node is executed. There is alwayas 
a 'c.save()' line in this script, so that the document is saved, but then 
my script writes all nodes that need to be written in some special way. For 
example, nodes whose headline starts with '@coffee ...', are compiled with 
the coffee compiler, '@pug' nodes are compiled with the pug compiler, @css 
nodes are compiled with sass compiler, ... The limit is just your 
imagination. You can easily write your nodes without sentinels and Leo 
won't try to read file and synchronize Leo. Actually I don't have coffee, 
scss, pug and other types of files that are considered to be source files. 
I have just compiled versions written as a real files.

HTH Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5131e5c1-413a-4acc-8802-08ee8e491f62o%40googlegroups.com.

Reply via email to