Introduction and teaser

83 views
Skip to first unread message

Peter Mills

unread,
Feb 24, 2014, 5:12:08 AM2/24/14
to leo-e...@googlegroups.com
This is my first post here, so let me introduce myself. I'm not a professional programmer; I'm an engineer who needs/likes to program to do ad hoc technical analysis.  I've converted from Matlab to Python over the last decade.  The Python link led me to Leo (since I love outliners for info management).  As a somewhat frustrated on-and-off Leo user over these python years it is good to see Leo becoming more user friendly.  I saw features that I wanted in Leo (especially outlining, clones and reST), but gave up on it twice because of:

* hard to install
* bugs
* "find" didn't work as I expected
* no printing facilities
* cut and paste, drag and drop didn't work well with other applications

What changed?

* I wrote myself a few usability modifications and a plugin (more on this later)
* less bugs
* Move to Qt GUI (which matched my own move to Python(x,y) which uses Qt)
* New "Nav" tab could do much of the undecipherable Find function (I think this
  has changed now)
* Seemed to be better cut/paste/drag/drop functionality
* @auto, @edit etc. making ad hoc editing easier

Leo is still improving and getting closer to my idea of the perfect PIM as well as a useful engineering tool (but alas not a IDE).  So thanks to Edward and others for all the recent usability development and the tool that Leo has become.

I've been a lurker on this newsgroup for some time now, but I thought it was time for me to throw some of my own ideas and work into the ring to see if these were of value to others as they have been for me.

The attached screenshot shows an upgraded viewrendered plugin which has been critical for me to truly use Leo effectively.  This is just a teaser - I'll post (a lot) more in another thread when I cobble together what it's about.

Peter.
VR2test2.png

Terry Brown

unread,
Feb 24, 2014, 10:11:48 AM2/24/14
to leo-e...@googlegroups.com
On Mon, 24 Feb 2014 02:12:08 -0800 (PST)
Peter Mills <peter.m...@gmail.com> wrote:

> The attached screenshot shows an upgraded viewrendered plugin

Looks like it supports rendering a tree, that will be popular :-)

Cheers -Terry

Edward K. Ream

unread,
Feb 24, 2014, 5:33:06 PM2/24/14
to leo-editor
On Mon, Feb 24, 2014 at 4:12 AM, Peter Mills <peter.m...@gmail.com> wrote:

This is my first post here, so let me introduce myself. I'm not a professional programmer; I'm an engineer who needs/likes to program to do ad hoc technical analysis.  I've converted from Matlab to Python over the last decade.  The Python link led me to Leo (since I love outliners for info management).

​Thanks for this public postcard​
 

The attached screenshot shows an upgraded viewrendered plugin which has been critical for me to truly use Leo effectively.  This is just a teaser - I'll post (a lot) more in another thread when I cobble together what it's about.

​The matlab integration shown in the screenshot looks very cool.  I'll be very interested in how you put it all together.  Many thanks for this work.

Edward

Peter Mills

unread,
Feb 25, 2014, 2:28:04 AM2/25/14
to leo-e...@googlegroups.com


On Tuesday, February 25, 2014 8:33:06 AM UTC+10, Edward K. Ream wrote:

​The matlab integration shown in the screenshot looks very cool.  I'll be very interested in how you put it all together.  Many thanks for this work.
No, sorry Edward.  That isn't matlab.  That chart is from matplotlib (part of the SciPy collection of python tools).  The plot is generated automatically by the code block shown at the bottom of the screenshot.  This is part of the "notebook" type functionality of the new plugin (See my other post).  Hopefully, matlab will remain just a memory for me.

Peter

Edward

Fidel N

unread,
Feb 25, 2014, 2:49:08 AM2/25/14
to leo-e...@googlegroups.com
Peter, thanks for this, it looks very appealing.

I have a question, can the rendered result be exported as some short of html?

So, for instance, we could be editing different head nodes, each of them being different htmls pages from a website we would be managing and globally editing from Leo?

Another question, this about functionality, can you somehow click on your rendered view and directly be sent to the node whose code has the clicked content,so you can directly edit it?

Thanks again!


Peter Mills

unread,
Feb 25, 2014, 4:15:26 AM2/25/14
to leo-e...@googlegroups.com


On Tuesday, February 25, 2014 5:49:08 PM UTC+10, Fidel N wrote:
Peter, thanks for this, it looks very appealing.

I have a question, can the rendered result be exported as some short of html?
Indeed, it is exported every render as leo.html in the local directory, so grabbing this and using it elsewhere is helpful.  However, more convenient is the ability to simply cut and paste from the VR2 pane to your word processor etc.  You can also use the export button to push it to your browser, from which you can save in (typically many formats).

So, for instance, we could be editing different head nodes, each of them being different htmls pages from a website we would be managing and globally editing from Leo?
Yes, I use reST to generate html files to export to a web page (of sorts).  However, there is currently no way to automatically direct the html file to a file of your choice - you would need to do that by hand. 

Another question, this about functionality, can you somehow click on your rendered view and directly be sent to the node whose code has the clicked content,so you can directly edit it?
Sorry, this renderer is too primitive to be able to do that - it's an interesting idea though (alas, I don't think it's possible in this QWebView-based renderer).

Peter 

Thanks again!


Fidel N

unread,
Feb 25, 2014, 4:30:57 AM2/25/14
to leo-e...@googlegroups.com
Wow sounds awesome!
Cant wait to be using it!

The redirection of the files can be done with ease, for instance, having each "master html" node under a @path node.

Then, with a script, you loop through all the nodes under @path nodes, render, get the generated file from local folder, and rename/move it, named as the header, and located in the @path location.

If you want such a script I can help you build it, it would be quick.


The idea for the click / opening the node, would be to insert each node gnx as sandwich for each text block. (Hidden)

This way, when user clicks, you can easily find the gnx linked to that block of text (find clicked word or group of words, find previous or later hidden "gnx" line).
Then you got it hehe.

Making it very "badly", even if text cant be inserted hidden, it would be about linking a signal (control+right click for instance) to get the text in the clicked line, then search with Leo the node that contains that text, then send the user to it. This would be very basic though hehe.



Fidel N

unread,
Feb 25, 2014, 4:39:00 AM2/25/14
to leo-e...@googlegroups.com
Just checked the qt documentation, it could be done like this:

void QWebView::selectionChanged() [signal]

This signal is emitted whenever the selection changes -> Link this signal to the following function

selectedText : const QString


When the signal selectionChanged is fired, we would get "selectedText", and find the node that contains that text, then select that node in Leo

Peter Mills

unread,
Feb 25, 2014, 6:03:09 AM2/25/14
to leo-e...@googlegroups.com
Interesting ideas - maybe some trickery can be done after all.  However, I wouldn't like it to interfere with the ability to copy html from the rendered window by selecting text and pressing ctl-C.  But there might be a control-click signal or some other way we can distinguish the desire to jump back to the node.

Please have a read of my other post "viewrendered2 plugin" for the overview of this plugin and how it works (and possibly try it out).  It might fire up some more ideas on other tricks that might be played.

Peter.

Fidel N

unread,
Feb 25, 2014, 6:12:34 AM2/25/14
to leo-e...@googlegroups.com
Hehe yes I already read it twice, but will need some time to digest it, since it comes with a lot of possibilities.
Its really an amazing plugin, and Im specially impressed by both the direct wikipedia rendering and the direct html exporting, along with the whole subtree rendering hehehe...im currently in the middle of migrating to github / last Leo version and with some issues with it, but as soon as I solve that im definetly going to be playing with your plugin =)

Peter Mills

unread,
Feb 25, 2014, 6:22:55 AM2/25/14
to leo-e...@googlegroups.com


On Tuesday, February 25, 2014 9:12:34 PM UTC+10, Fidel N wrote:
Hehe yes I already read it twice, but will need some time to digest it, since it comes with a lot of possibilities.
Its really an amazing plugin, and Im specially impressed by both the direct wikipedia rendering and the direct html exporting, along with the whole subtree rendering hehehe...im currently in the middle of migrating to github / last Leo version and with some issues with it, but as soon as I solve that im definetly going to be playing with your plugin =)
I may have misled you by the image showing wikipedia.  On the path to seeing that image, the plugin renders the node as is with just the title and wikipedia link showing.  If you click on the wikipedia link it works just like a normal browser and brings up wikipedia.  Perhaps not as impressive as you originally thought :-(

Fidel N

unread,
Feb 25, 2014, 6:37:52 AM2/25/14
to leo-e...@googlegroups.com
I think it can be made so it "auto-clicks" whenever the only contains of the node are 1 link, and perhaphs we should add a "no children" test before:

c.p.b.splitlines[0].startswith("httml") and len(c.p.b.splitlines[0].startswith("httml"))==1:

This is probably personal preference, since I'm currently studying Forex trading, and am researching from a forum. So I don't know if that would be useful for everyone.

Whenever I find an interesting post or image, I drop the url to Leo under the desired strategy edge that is represented by that post.

Hence, for coming back to those, its way more comfortable to be browsing them inside Leo than switching among programs. Just imagine, you could click a few url nodes and keep navigating among them, within Leo, without actually needing to open each in the browser, etc.




Terry Brown

unread,
Feb 25, 2014, 9:07:20 AM2/25/14
to leo-e...@googlegroups.com
On Tue, 25 Feb 2014 01:15:26 -0800 (PST)
Peter Mills <peter.m...@gmail.com> wrote:

> > Another question, this about functionality, can you somehow click
> > on your rendered view and directly be sent to the node whose code
> > has the clicked content,so you can directly edit it?
> >
> Sorry, this renderer is too primitive to be able to do that - it's an
> interesting idea though (alas, I don't think it's possible in this
> QWebView-based renderer).

I wonder if you can use
http://qt-project.org/doc/qt-4.8/qwebview.html#linkClicked
to handle special links which trigger Leo to select the node the
generated the part of the view the link covers. So you could insert
inconspicuous (invisible without hover?) links into the view, and they
could be trapped by Leo when the user clicks them.

Cheers -Terry

Edward K. Ream

unread,
Feb 25, 2014, 9:42:37 AM2/25/14
to leo-editor
On Tue, Feb 25, 2014 at 1:28 AM, Peter Mills <peter.m...@gmail.com> wrote:

No, sorry Edward.  That isn't matlab.  That chart is from matplotlib (part of the SciPy collection of python tools).  The plot is generated automatically by the code block shown at the bottom of the screenshot.  This is part of the "notebook" type functionality of the new plugin (See my other post).  Hopefully, matlab will remain just a memory for me.

​Thanks for the clarification.

I've wanted Leo to be a scientific notebook for a long time.  It could be said to be Leo's last major missing feature (not counting vim emulation).  Your plugin will make Leo a perfect fit for scientists, their data and their scripts.  I can hardly wait ;-)

​Edward​
Reply all
Reply to author
Forward
0 new messages