Re: Use Leo as database

2018-03-23 Thread Edward K. Ream
On Fri, Mar 23, 2018 at 12:25 PM, Largo84  wrote:

In Leo's online documentation for Advanced Topics>>The Leonine World
> , I am intrigued by the last
> topic:
>
> *Databases*: Leo’s clones create new opportunities for scriptable
> databases. In my brother Speed’s outlines, suboutlines *are* SQL queries!
>
> I would like to know more about how that is done.
>

​So would I.  He hasn't written up what he has done, despite repeated
requests.
​


> Are there any sample database.leo files that demonstrate that use case?
>

​No.  All He has told me is that he uses clones to represent queries.​


>
>- Are tables represented by external files? If so, what format?
>- Are nodes individual records?
>- How are attributes (fields) stored? YAML? Other?
>
> ​I don't think Speed is using this level of representation.  I suspect
there are scripts that convert outlines into queries, but I could be wrong.

I'll ask Speed again, referencing 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: Nodetags plugin errors

2018-03-23 Thread Edward K. Ream
On Fri, Mar 23, 2018 at 2:13 PM, Largo84  wrote:

> Now, I'm also getting a slightly different error in other files when I
> copy/paste nodes.
>

​Rev​
 1f40d97 adds a guard.  How does that work for you?

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: Nodetags plugin errors

2018-03-23 Thread Largo84
Now, I'm also getting a slightly different error in other files when I 
copy/paste nodes.

hook failed: command2, >, 
leo.plugins.nodetags
Traceback (most recent call last):

  File "D:\Synced\github repos\leo\leo\core\leoPlugins.py", line 342, in 
callTagHandler
result = handler(tag, keywords)

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 437, in 
command2_hook
self.update_all()

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 412, in 
update_all
self.update_list()

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 394, in 
update_list
n = gnxDict[gnx]

KeyError: 'largo84.20180323121353.1'

-- 
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: Nodetags plugin errors

2018-03-23 Thread Chris George
I use nodetags and I am not seeing this, but then I am on different 
versions of everything including OS.

Leo 5.8 devel, build 20180319100646, Mon, Mar 19, 2018 10:06:46 AM
Git repo info: branch = devel, commit = 1b2a05bbca73
Python 3.6.4, PyQt version 5.10.1
linux
isPython3: True
caching enabled

Chris

On Friday, March 23, 2018 at 9:31:23 AM UTC-7, Largo84 wrote:
>
> Getting the following errors when re-opening a file with nodes tagged 
> using the nodetags plugin:
>
>
> hook failed: after-create-leo-frame, , 
> leo.plugins.nodetags
> Traceback (most recent call last):
>
>
>   File "D:\Synced\github repos\leo\leo\core\leoPlugins.py", line 342, in 
> callTagHandler
> result = handler(tag, keywords)
>
>
>   File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 122, in 
> onCreate
> theTagController = TagController(c)
>
>
>   File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 138, in 
> __init__
> self.ui.update_all()
>
>
>   File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 412, in 
> update_all
> self.update_list()
>
>
>   File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 394, in 
> update_list
> n = gnxDict[gnx]
>
> KeyError: 'largo84.20180323113211.1'
>
> There is a @persistence node to store this information as many of these 
> nodes are in @auto-md external files. Running the cft command suggests that 
> the nodes are indeed tagged. However, the nodes no longer show up in the 
> Tags list window. In case it matters, my environment:
>
> Leo 5.8 devel, build 20180303100141, Sat Mar  3 10:01:41 CST 2018
> Git repo info: branch = master, commit = 6c2eef28ef1e
> Python 3.4.3, PyQt version 5.4.1
> Windows 8 AMD64 (build 6.2.9200) 
> isPython3: True
> caching enabled
>
> Anyone else seeing this? Shall I file a issue on GitHub?
>
> Rob
>

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


Use Leo as database

2018-03-23 Thread Largo84
In Leo's online documentation for Advanced Topics>>The Leonine World 
, I am intrigued by the last topic:

*Databases*: Leo’s clones create new opportunities for scriptable 
databases. In my brother Speed’s outlines, suboutlines *are* SQL queries!

I would like to know more about how that is done. Are there any sample 
database.leo files that demonstrate that use case?

   - Are tables represented by external files? If so, what format?
   - Are nodes individual records?
   - How are attributes (fields) stored? YAML? Other?

Rob...


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


Nodetags plugin errors

2018-03-23 Thread Largo84
Getting the following errors when re-opening a file with nodes tagged using 
the nodetags plugin:

hook failed: after-create-leo-frame, , 
leo.plugins.nodetags
Traceback (most recent call last):

  File "D:\Synced\github repos\leo\leo\core\leoPlugins.py", line 342, in 
callTagHandler
result = handler(tag, keywords)

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 122, in 
onCreate
theTagController = TagController(c)

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 138, in 
__init__
self.ui.update_all()

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 412, in 
update_all
self.update_list()

  File "D:\Synced\github repos\leo\leo\plugins\nodetags.py", line 394, in 
update_list
n = gnxDict[gnx]

KeyError: 'largo84.20180323113211.1'

There is a @persistence node to store this information as many of these 
nodes are in @auto-md external files. Running the cft command suggests that 
the nodes are indeed tagged. However, the nodes no longer show up in the 
Tags list window. In case it matters, my environment:

Leo 5.8 devel, build 20180303100141, Sat Mar  3 10:01:41 CST 2018
Git repo info: branch = master, commit = 6c2eef28ef1e
Python 3.4.3, PyQt version 5.4.1
Windows 8 AMD64 (build 6.2.9200) 
isPython3: True
caching enabled

Anyone else seeing this? Shall I file a issue on GitHub?

Rob

-- 
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: effective collaborate with .leo for doc.?[via]Advices for Leo documentation in Chinese translated version?

2018-03-23 Thread Zoom.Quiet
On Thu, Mar 22, 2018 at 10:51 PM, Edward K. Ream  wrote:
>
>
> On Sat, Feb 17, 2018 at 9:14 AM, Zoom.Quiet  wrote:
>>
>> 2 years ago: Re: How to collaborate using Leo
>> https://groups.google.com/d/msg/leo-editor/Mr1cAfi8BLs/Q2PlDxsrBwAJ
>> discuss about  Leonard(Leo user) and Nancy(not Leo user) how to work
>> together,
>> the result is :
>> @clean be upgraded, and support perfect auto merge from Nancy fixed
>> resource files.
>>
>> but for the doc. translate project:
>> work in doc/LeoDocs.leo is the necessarily, because:
>>
>> 0: the target for translate doc. of Leo , just for Chinese Nancy start
>> love Leo
>> 1: so contributor base LeoDocs.leo is the only right start
>
>
> I think the best solution may be to put everything in an @clean or (if Nancy
> agrees) an @file node.  That way updates happen automatically, which
> doesn't/can't happen with the actual .leo files.
>

Sayeahooo..
in the begin , i think same with u,
but when u try, there is so many rST special append commend,
such as:

@rst docs/leoLinks.html

...

.. _`Icons`:icons.html

...

@ @rst-options
call_docutils=False
stylesheet_path=..\doc
write_intermediate_file = True
@c

will all need reformat as normal format,
that will make bigger diff with official .leo documentation,

if official LeoDoc.leo upgrade,
translation usage LeoDoc_zh.leo can not easy know what is changed.

so, i think the better way for LeoDoc,
is Official LeoDoc.leo also make all @rst ->@clean

change Doc. is only .leo @rST ->.rst,
update as .leo @clean <-> .rst
so work with .leo or .rst , is all ok.

right?


> Edward
>

-- 
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

-- 
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: tree icons

2018-03-23 Thread Edward K. Ream
On Thu, Mar 22, 2018 at 5:22 PM, Edward K. Ream  wrote:

Arrrgh. The present code does not handle --theme correctly, nor does it
> handle double-clicking, say,
> ​​
> BreezeDarkTheme.leo.  The stylesheet is computed correctly, but not the
> icons (in general).
>

​Oh joy. Experiments show that qt_gui.getImageFinder "just works" *provided*
that theme files define the @string theme_name setting.
​
BreezeDarkTheme.leo was lacking that setting. I've just asked Chris to add:

 @string theme_name = BreezeDarkTheme

Rev fc3f40b8 completes all theme-related work for me.

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.


Chris, please add @string theme_name setting to BreezeDarkTheme.leo

2018-03-23 Thread Edward K. Ream
I've upped this several times, but understandably you may not have wanted 
to merge it by hand.

The crucial setting is: @string theme_name = BreezeDarkTheme

With this setting defined as above, Leo will find icon boxes correctly when:

1. Someone opens BreezeDarkTheme as the first (or only) .leo file in the 
files list.

This is mostly a convenience for you, as a theme dev, but users might also 
test themes this way.

2 Anyone uses --theme=BreezeDarkTheme

This will save users of the BreezeDarkTheme.leo considerable confusion.

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.