Leo as a file system

15 views
Skip to first unread message

Kent Tenney

unread,
Aug 8, 2011, 3:35:42 PM8/8/11
to leo-editor
On my quest for a list of recently edited nodes, I realized I'm asking
for "mtime", as in
$ stat file
<snip>
Access: 2011-06-10 14:40:09.476805858 -0500
Modify: 2010-11-29 16:35:49.000000000 -0600
Change: 2011-05-31 11:31:14.050618001 -0500

That got me wondering if it would be useful to have the other 2
timestamps: Change and Access

maybe.

That got me thinking what would a Leo cli look like:

$ leocli myLeoSettings.leo

~myLeoSettings~

~myLeoSettings~ pwd
myLeoSettings.leo

~myLeoSettings~ ls
Options for new windows
Leo debug settings
@settings

~myLeoSettings~ cd @settings

~myLeoSettings-->@settings~ ls
@string vim_trigger_event = disable
<snip>
@enabled-plugins

~myLeoSettings-->@settings~ cd @enabled-plugins
Can't cd, @enabled-plugins is a node

~myLeoSettings-->@settings-->~ gvim @enabled-plugins
<editor opens with contents of node, changes are saved back>

~myLeoSettings-->@settings~ cd ..

~myLeoSettings~ cd ..
Already at root

~myLeoSettings~ cd @settings

~myLeoSettings-->@settings~ ls -l
mtime <long ago> @string vim_trigger_event = disable
<snip>
mtime <just now> @enabled-plugins

On and On.

Does anyone else find that interesting?
leoBridge offers gui-free access, probably almost all the required methods.

A "stat" type element on a node could hold the timestamps, size etc.

Maybe stat could include Ville's recent "class" attribute.

Thanks,
Kent

Ville M. Vainio

unread,
Aug 8, 2011, 4:27:06 PM8/8/11
to leo-e...@googlegroups.com
On Mon, Aug 8, 2011 at 10:35 PM, Kent Tenney <kte...@gmail.com> wrote:

> That got me thinking what would a Leo cli look like:
>
> $ leocli myLeoSettings.leo

The ILeo (leo-ipython bridge) is a sort of stab at being a Leo cli.
Without tree navigation, that is.

On Linux side, it might be funny to hook up a .leo document with FUSE,
making it mountable.

Kent Tenney

unread,
Aug 8, 2011, 4:53:00 PM8/8/11
to leo-e...@googlegroups.com

Right, there's also pyfilesystem http://pypi.python.org/pypi/fs/0.4.0
which is pretty cool.

The 9 minimal requirements to implement Leo as a filesystem look doable:
http://packages.python.org/fs/implementersguide.html#essential-methods
>
> --
> You received this message because you are subscribed to the Google Groups "leo-editor" group.
> To post to this group, send email to leo-e...@googlegroups.com.
> To unsubscribe from this group, send email to leo-editor+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
>
>

Edward K. Ream

unread,
Aug 31, 2011, 8:59:55 AM8/31/11
to leo-e...@googlegroups.com
On Mon, Aug 8, 2011 at 3:27 PM, Ville M. Vainio <viva...@gmail.com> wrote:

> On Linux side, it might be funny to hook up a .leo document with FUSE,
> making it mountable.

Paul Patterson was first: http://leo.zwiki.org/LeoAsAFileSystem

Edward

Seth Johnson

unread,
Aug 31, 2011, 11:02:16 AM8/31/11
to leo-e...@googlegroups.com
I find it very interesting. But for me the idea is more like a souped
up extension to XBASE:

SET USE TYPE TO "Leo Outliner File"
SET LINK TYPE TO "Leo Outline Elements"
SET USE TO "myLeoSettings.leo"

GO TOP LINK
PRINT LINK

Options for new windows

LIST ALL LINKS

Options for new windows
Leo debug settings
@settings

@string vim_trigger_event = disable
<snip>
@enabled-plugins

SKIP 3 LINKS
PRINT LINK

@string vim_trigger_event = disable

SKIP USE
PRINT USE

MyFirstPersonalLeoFile.leo

GO TOP LINK
PRINT LINK

First header line in my first Leo file

LIST ALL LINKS

First header line in my first Leo file
A subheader
Another subheader
Second header line in my first Leo file

SKIP 3 LINKS
PRINT LINK

Second header line in my first Leo file

LIST LINK ATTRIBUTES

HeaderLineText
BodyText
HTMLOrNot
etc.

LIST LINK VALUES

HeaderLineText = "Second header line in my first Leo file"
BodyText = "@ignore [. . .]"
HTMLOrNot = .False.
etc.

LIST CONTEXT

Space = "Authoritative Leo Community"
Location = "Seth's Leo Home Server"
Standpoint = .Null.
Use Type = "Leo Outliner File"
Link Type = "Leo Outline Elements"
Use = "MyFirstPersonalLeoFile.leo"

GO TOP USE
LIST ALL USES

myLeoSettings.leo
MyFirstPersonalLeoFile.leo
WorkStuff.leo
To-Do-List.leo
Code-In-Progress.leo

SET USE TO "WorkStuff.leo"

GO TOP LINK
LIST ALL LINKS

and so on

Reply all
Reply to author
Forward
0 new messages