Re: Leo as backbone for dictionary reference service

2018-04-02 Thread Edward K. Ream
On Monday, April 2, 2018 at 7:02:39 AM UTC-5, Edward K. Ream wrote:
>
> On Sat, Mar 31, 2018 at 3:19 PM, Joe Orr  wrote:
>
> ​> ​
> This gave me the idea to have Leo Vue be able to outline a page by 
> pointing to it.
>

The HTML5 outline standard 
 is 
bizarre.  All "nodes" are implicit. There is no indication whatever of 
outline structure. Instead, there is a "standard algorithm" for recognizing 
nodes. This is less a standard than a standard hack. 

Anyway, Leo can clearly already write documents that represent html5 
outlines.  I wonder whether that would be useful...

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-04-02 Thread Edward K. Ream
On Sat, Mar 31, 2018 at 3:19 PM, Joe Orr  wrote:

​> ​
This gave me the idea to have Leo Vue be able to outline a page by pointing
to it.
​...

​> ​
So you can put any outlineUrl and title as params in the url above and it
will attempt to outline it.

​> ​
These pages make testing a target a bit easier:
https://kaleguy.github.io/leo-examples/outliner/outline-wikipedia.html
https://kaleguy.github.io/leo-examples/outliner/outline-page.html

​Very cool.​

> ​I didn't yet find any other good candidates for outlining besides
Wikipedia though.

​Well, it's a great start. Many thanks for this work.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-31 Thread Joe Orr
This gave me the idea to have Leo Vue be able to outline a page by pointing 
to it.

HTML5 has an outline spec, and there is an npm module for it, so this 
seemed like a fairly straightforward task. Turns out there aren't many 
pages that support the spec. Wikipedia supports the HTML4 spec, but it 
required a few hacks to get it to work.

Example:
https://kaleguy.github.io/leovue/#/t/44/

Leo Vue now supports named nodes, so you can also write:
https://kaleguy.github.io/leovue/#/t/Dinosaur

It is also possible to set up a copy of Leo Vue to take the target as a 
parameter:
https://kaleguy.github.io/leo-examples/outliner/?outlineUrl=https://en.wikipedia.org/wiki/Dinosaur&outlineTitle=Dinosaur
 
 
So you can put any outlineUrl and title as params in the url above and it 
will attempt to outline it.

These pages make testing a target a bit easier:
https://kaleguy.github.io/leo-examples/outliner/outline-wikipedia.html
https://kaleguy.github.io/leo-examples/outliner/outline-page.html

I didn't yet find any other good candidates for outlining besides Wikipedia 
though.

Dictionary.com doesn't work, but there is wiktionary.com:
https://kaleguy.github.io/leo-examples/outliner/?outlineUrl=https://www.wiktionary.org/wiki/test
or
https://kaleguy.github.io/leo-examples/outliner/?outlineUrl=https://www.wiktionary.org/wiki/test&path=English~Noun

Joe

On Saturday, March 3, 2018 at 2:18:55 AM UTC-5, Edward K. Ream wrote:
>
>
>
> On Fri, Mar 2, 2018 at 9:15 PM, Matt Wilkie  > wrote:
>
>>
>> #771 Support --outline-only command-line argument 
>>>  is a new issue 
>>> that would skip this pass entirely.
>>>
>>> I shall do this only if you actually need it.
>>>
>>
>> I don't need it, not right now. I have my hands full with other things. 
>> Mostly the intent of the post was to document and share an idea, so I could 
>> stop thinking about it and do other things, with the hopeful self-promise 
>> that I'd come back to it someday when I do have time.
>>
>
> ​That's fine.  There is no milestone attached to this item.
>
> Edward
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-02 Thread Edward K. Ream
On Fri, Mar 2, 2018 at 9:15 PM, Matt Wilkie  wrote:

>
> #771 Support --outline-only command-line argument
>>  is a new issue
>> that would skip this pass entirely.
>>
>> I shall do this only if you actually need it.
>>
>
> I don't need it, not right now. I have my hands full with other things.
> Mostly the intent of the post was to document and share an idea, so I could
> stop thinking about it and do other things, with the hopeful self-promise
> that I'd come back to it someday when I do have time.
>

​That's fine.  There is no milestone attached to this item.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-02 Thread Matt Wilkie


> #771 Support --outline-only command-line argument 
>  is a new issue that 
> would skip this pass entirely.
>
> I shall do this only if you actually need it.
>

I don't need it, not right now. I have my hands full with other things. 
Mostly the intent of the post was to document and share an idea, so I could 
stop thinking about it and do other things, with the hopeful self-promise 
that I'd come back to it someday when I do have time.

matt

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-02 Thread Edward K. Ream
On Friday, March 2, 2018 at 2:20:46 AM UTC-6, Edward K. Ream wrote:

> On Thu, Mar 1, 2018 at 4:21 PM, Matt Wilkie  wrote:
 
> > ​What's the practical limit for number of nodes in Leo?

> 3. Leo scans the outline after loading it, looking for @ nodes.  
This code skips @ignore trees, so you would want to put the entire outline 
tree under an @ignore directive.

#771 Support --outline-only command-line argument 
 is a new issue that 
would skip this pass entirely.

I shall do this only if you actually need it.

Edward

>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-02 Thread Edward K. Ream
On Thu, Mar 1, 2018 at 4:21 PM, Matt Wilkie  wrote:

​> ​
What's the practical limit for number of nodes in Leo?

​Good question.  I don't know the answer in all its details, but here are a
few ideas:

1. Leo now supports representing outlines as sqlite databases, with .leo.db
extension.  See this post
.
Afaik, there are no practical limits to such db's nor are there limits in
Leo's ability to access them.

2. Leo uses ​Python's sax parser to parse xml.  This is likely to be
significantly slower than using sqlite-based code.

3. Leo scans the outline after loading it, looking for @ nodes.  This
code skips @ignore trees, so you would want to put the entire outline tree
under an @ignore directive.

4. Leo's tree drawing code would likely choke on showing more than a few
thousand nodes.  There are several ways around this.  First, one could
access the dictionary in a null gui, say from the Leo bridge.  Or one could
hide the dict so that it never gets redrawn.

In short, it should be possible to represent a very large outline as a
sqlite (.leo.db) file.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo as backbone for dictionary reference service

2018-03-01 Thread Matt Wilkie


> With Edwards help I cobbled together a script that uses the Wordnet 
> database to generate an overview of a word. It outputs to the log pane.
>

thanks for this 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.