This plugin came from a long thread we had on Google Groups more than a 
year ago.  The thread was about the possibility of using Leo as a 
"Zettelkasten", which translates as "Card Case".  The thread is at

Zettelkasten Thread <https://groups.google.com/g/leo-editor/c/TqiNdBfnEig>

In brief, the zettelkasten system is a system for research and deep 
thinking in which small topics or thoughts are written on index cards.  The 
index cards each have an identifying number so they can be found and 
referred to.  The key feature is that the cards are to contain links to 
other cards, including to other, subsidiary thoughts about a given card.  
After a period of use, the card case can contain a large number of 
carefully thought-out cards that are (hopefully) highly cross-referenced.  
Eventually the card collection, it has been written, can become almost like 
a helping second brain, capable of coming up with unexpected or forgotten 
ides that can be pursued.

There are a few software systems that try to do the same job, but I didn't 
like any of the ones I tried, and in many of them the data was contained in 
a proprietary format.  Imagine if you had a decade of work and thoughts in 
one of them and then you had to move to another system!

Eventually, I came up with a system for Leo that involved a couple of 
command scripts and a way of using them. I thought that this system would 
not only emulate a card-case pretty well, with improved linking and 
searching, but that it should be fairly easy to write a script to output 
the data in a textual format in case one ever had to get the data out of 
Leo for some reason.

Then I got diverted and didn't do much more with the concept until 
recently.  I got interested in capturing genealogy and family history 
information.  This seemed like a good thing to use a zettelcasten system 
on.  I discovered a bug in one of the commands, tweaked another, and came 
up with a third.

In use, a physical card case would have you spreading out a number of 
related cards on a table or desk so you could see them all at the same 
time.  That is the main rationale behind the Freewin plugin.  The Freewin 
view of a node emulates a note card laid out on a desk.  It is editable for 
convenience, and the RsT rendered view makes for better viewing when you 
don't have to do editing. (My original concept uses a few RsT features - I 
will illustrate that in a following post).

This is convenient, and if you have a second screen you could lay out a lot 
more cards.

As for other uses, Freewin is useful any time you need to refer to one node 
while working in another.  I used it during the development of Freewin 
itself.  Several times I was developing code improvements in another 
outline (my Workbook.leo outline), and I needed to fold them into Freewin 
with changes to fit the details of the Freewin surrounding code.  Keeping 
the Workbook code in a Freewin window made this process much easier.

Developing Freewin has involved a lot of dog-fooding!

In a followup post I will give some examples how I use RsT features.  It 
turns out that the main one I use will make it fairly easy to parse the 
data into a structured for, such as RDF or topic maps.
On Wednesday, June 16, 2021 at 5:45:11 PM UTC-4 tbp1...@gmail.com wrote:

> Freewin windows display with either a light or dark theme, depending on 
> whether your Leo theme is marked as light or dark. The colors are not 
> picked up from the theme, but at least the light/dark character is 
> maintained.
>
> For the editing view, by default built-in stylesheets are used.  For the 
> Restructured Text view, the default stylesheet used by Docutils is 
> applied.  Unfortunately the same RsT stylesheet will be used for both light 
> and dark themes, since Docutils has only one default stylesheet.
>
> You can use your own stylesheets.  They must have specific names, and be 
> located in your user's .leo/css directory.  I recommend that you copy the 
> RsT stylesheets from Leo's leo/plugins/viewrendered3 directory, renaming 
> them as you do so.  The plugin's Readme info has the details.  You can read 
> them by invoking the Leo menu item Plugins/freewin/about. In summary:
>
>                            Freewin Css Stylesheet Names
>                           
>  --------------------------------------------------
>                                              Editor
>                                             -----------
>             Light                                                Dark
> freewin_editor_light.css                    freewin_editor_dark.css
>                                      RsT Rendering
>                                     ------------------------
> freewin_rst_light.css                          freewin_rst_dark.css
>
> The VR3 RsT stylesheet displays a little on the large side, but I will 
> soon be submitting a VR3 pull request that will  reduce the size.
>
> Freewin works with PyQt5, or PyQt6 if that is installed. Unfortunately 
> with PyQt6 the RsT dark theme renders as if there is no stylesheet.  This 
> appearance is not the best, and it is not dark-themed.  This should be 
> fixed when the Qt6 WebEngineView component is released, if not before.
>
> My next post will cover the rationale for the plugin design, how I 
> expected to use it, and and some other uses I have already found to be 
> convenient.
> On Wednesday, June 16, 2021 at 5:21:43 PM UTC-4 tbp1...@gmail.com wrote:
>
>> My new Freewin plugin has just been merged into the devel branch.  This 
>> plugin will open a smaller-than-Leo window that is dedicated to showing the 
>> node that was selected when the Freewin window was opened.
>>
>> This window is provides a plain editing view, and can be switched to 
>> provide a view of the node's body rendered as Restructured Text.  The 
>> window is synchronized with its host node - editing changes in the window 
>> get reflected in the host node, and changes to the host node appear in the 
>> Freewin window.  The editor has all the basic editing functions, but no 
>> Leo-specific enhancements nor syntax coloring.
>>
>> You can have any number of windows open at the same time, each linked to 
>> a different node.
>>
>> You enable the plugin like any other, by adding its name to the *enabled 
>> plugins* node in your *MyLeoSettings.leo *file.
>>
>> There is one command, to open a window, and no settings.  The open 
>> command is called *z-open-freewin.* I like to have it linked to a 
>> button, which you can do by adding an @setting to the @settings tree in 
>> either a specific outline or in myLeoSettings.leo.  The setting is like 
>> this:
>>
>> Headline: @button Freewin 
>> Body: c.executeMinibufferCommand('z-open-freewin')
>>
>> In my next post, I will explain how to customize Freewin's appearance and 
>> get the most out of theme switching.
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d532775f-1671-4604-83c1-bcd092eaf480n%40googlegroups.com.

Reply via email to