Pls try the screencasts in test.leo

68 views
Skip to first unread message

Edward K. Ream

unread,
Sep 15, 2012, 7:35:11 PM9/15/12
to leo-e...@googlegroups.com
The screencast plugin is a major breakthrough in explaining Leo.  I estimate that creating a screencast is at least 100 times faster than creating the corresponding slideshow.  Furthermore, the effects that can *easily* be produced far exceed anything that can be done with the slideshow plugin.

My apologies to Tom F. for not having this ready in time for PyOhio :-)  It would have made a big difference.

Two big steps forward today:

1. It is now dead easy to put up a graphic, scaled and centered, anywhere you like.  For a cool example, see the tree:

    @screencast the parts of the screen

This screencast discusses the icon box:  the icons are scaled so they are all 100 pixels high!

2. Screencasts can now simulate, fairly exactly, what happens when typing in the minibuffer.  See the tree:

    @screencast minibuffer

This screencast shows tab completion in action.  It's quite nifty.

To run any @screencast node, just select it and hit Alt-9 in test.leo.

Screencasts are the perfect tools for creating videos about Leo.  They easily stand all by themselves, but if a narrative is wanted one does not need to do anything except hit the right arrow button and talk.  No need to do any real typing.  No mistakes.  Folks, this is the most exciting work I have done in a long time.  A little bit of effort creating "tools" in the screencast plugin goes a long, long way.

Next up:  a screencast about Leo's find/change commands.

Edward

P.S.  The yellow background in the caption area comes from this part of the stylesheet in the @data qt-gui-plugin-style-sheet node in leoSettings.leo::

    QPlainTextEdit#screencastcaption {
        background-color: yellow;
    }

As usual, you can change this to anything you want in your myLeoSettings.leo.

EKR

Edward K. Ream

unread,
Sep 15, 2012, 7:42:39 PM9/15/12
to leo-e...@googlegroups.com
On Saturday, September 15, 2012 6:35:11 PM UTC-5, Edward K. Ream wrote

> The screencast plugin is a major breakthrough in explaining Leo...

You can think of the (brief!) screencast commands as an extreme form of compression.  For example, it takes about 1000 characters to create the screencasts about icons, and yet the visual experience is rich and compelling.  It doesn't get any better than this: the screencast plugin directly converts simple scripts to the screencast itself.  The contrast with the pain of creating slideshows could not be greater.

EKR

Viktor Ransmayr

unread,
Sep 16, 2012, 4:43:43 AM9/16/12
to leo-e...@googlegroups.com
Hello Edward,


Am Sonntag, 16. September 2012 01:42:39 UTC+2 schrieb Edward K. Ream:
On Saturday, September 15, 2012 6:35:11 PM UTC-5, Edward K. Ream wrote

> The screencast plugin is a major breakthrough in explaining Leo...

A minor issue: As of rev. 5438 this plugin is available as a file - but - is not yet added/ accessible
via the outline "leoPluginsRef.leo".

With kind regards,

Viktor

Edward K. Ream

unread,
Sep 16, 2012, 7:05:41 AM9/16/12
to leo-e...@googlegroups.com
On Sun, Sep 16, 2012 at 3:43 AM, Viktor Ransmayr
<viktor....@gmail.com> wrote:

> A minor issue: As of rev. 5438 this plugin is available as a file - but - is
> not yet added/ accessible via the outline "leoPluginsRef.leo".

Thanks for this. Fixed at 5439.

EKR

Edward K. Ream

unread,
Sep 16, 2012, 7:29:48 AM9/16/12
to leo-e...@googlegroups.com


On Saturday, September 15, 2012 6:35:11 PM UTC-5, Edward K. Ream wrote:

> Two big steps forward today:

Actually, there were three :-) I forgot to mention that moving backwards in the slide show mostly works.  In particular, m.command handles undo correctly.  However, if you put your own "raw" code in a node, you must handle undo yourself.  This includes calls such as p.insertAfter.  Usually commander methods such as c.insertHeadline handle undo already.  When in doubt, look at the code.

Ideally, moving back one node should put up any captions, but it doesn't at present.  The workaround is to move back two nodes, then move forward a node.

Edward

Terry Brown

unread,
Sep 16, 2012, 3:16:00 PM9/16/12
to leo-e...@googlegroups.com
On Sat, 15 Sep 2012 16:35:11 -0700 (PDT)
"Edward K. Ream" <edre...@gmail.com> wrote:

> To run any @screencast node, just select it and hit Alt-9 in test.leo.

How to you move on from the display of the first caption in the
screencast? That's all I get with Alt-9

Cheers -Terry

Brian Theado

unread,
Sep 16, 2012, 6:06:52 PM9/16/12
to leo-e...@googlegroups.com
Terry,

On Sun, Sep 16, 2012 at 3:16 PM, Terry Brown <terry_...@yahoo.com> wrote:
> How to you move on from the display of the first caption in the
> screencast? That's all I get with Alt-9

I tried it and the Right Arrow key advances to the next command/screen.

Pretty impressive.

Brian

Terry Brown

unread,
Sep 16, 2012, 9:23:11 PM9/16/12
to leo-e...@googlegroups.com
On Sun, 16 Sep 2012 18:06:52 -0400
Brian Theado <brian....@gmail.com> wrote:

> On Sun, Sep 16, 2012 at 3:16 PM, Terry Brown <terry_...@yahoo.com> wrote:
> > How to you move on from the display of the first caption in the
> > screencast? That's all I get with Alt-9
>
> I tried it and the Right Arrow key advances to the next command/screen.

Thanks.

> Pretty impressive.

Yes, very slick :-)

Cheers -Terry

Edward K. Ream

unread,
Sep 17, 2012, 9:02:08 AM9/17/12
to leo-e...@googlegroups.com
On Sun, Sep 16, 2012 at 6:29 AM, Edward K. Ream <edre...@gmail.com> wrote:

>> Two big steps forward today:

The latest work: rev 4443 removes the "fakes" in m.state_handler that
simulated minibuffer handling. Now m.next, m.single_key and
m.state_handler properly switch between key-handling states so that:

a) RtArrow still switches between slides and

b) All "simulated" keys produced by m.ctrl_key and m.plain_keys now
actually switch input modes.

Examples:

1. The revised minibuffer screencast simply does m.ctrl_key('Alt-x')
in one node. Another node does m.keys('ins'). Another node does
m.key('\t'). This actually invokes the minibuffuffer(!) and it shows
the Completion tab in the log pane. When the minibuffer shows
"insert-node", a final m.key('\n') actually inserts a node(!!)

The point is that the user has just been hitting RtArrow all along:
the screencast plugin switches between key states behind the scenes.
It was tricky to get right.

2. Similarly, the screencast that discusses the find command starts
with m.ctrl_key('ctrl-f'). This shows the screen exactly as if I had
typed ctrl-f outside a screencast.

Important: the arg to m.ctrl_key can be anything that would be a
valid key setting. So the following are all equivalent: "ctrl-f",
"Ctrl-f", "Ctrl+F", etc. But "ctrl-F" is different from
"ctrl-shift-f".

Note: m.ctrl_key is somewhat misnamed. Alt keys work too. In fact,
m.ctrl_key is equivalent to m.single_key. I'll be eliminating
redundant methods soon.

With these improvements, the essentials of the screencast plugin are
complete. Still to do:

- One bug remains: for some reason, backspace doesn't get handled
properly in the minibuffer screencast. I'll fix this asap.

- Document the plugin, both in the docstring, and in a screencast!

- Create screencast-start and screencast-find-and-start commands. The
former will allow *any* sequence of nodes to be a screencast; the
latter will look for an @screencast node, and then start a screencast
at that node.

Edward

Edward K. Ream

unread,
Sep 17, 2012, 9:05:39 AM9/17/12
to leo-e...@googlegroups.com
On Mon, Sep 17, 2012 at 8:02 AM, Edward K. Ream <edre...@gmail.com> wrote:

> 1. The revised minibuffer screencast simply does m.ctrl_key('Alt-x')
> in one node. Another node does m.keys('ins'). Another node does
> m.key('\t').

Oops. This should be m.keys('\t'). There is no m.key method.

EKR

Edward K. Ream

unread,
Sep 17, 2012, 3:04:15 PM9/17/12
to leo-e...@googlegroups.com


On Monday, September 17, 2012 8:05:40 AM UTC-5, Edward K. Ream wrote:

> Oops.  This should be m.keys('\t').

Actually, the correct method is m.plain_keys :-)

Edward K. Ream

unread,
Sep 17, 2012, 3:09:54 PM9/17/12
to leo-e...@googlegroups.com
On Monday, September 17, 2012 8:02:09 AM UTC-5, Edward K. Ream wrote:

> One bug remains: for some reason, backspace doesn't get handled properly in the minibuffer screencast.

This was a "user" error, not a bug in the screencast plugin itself.  Indeed, it is useless to do m.plain_keys('\b\b\t') when in the minibuffer, because the tab will undo the effects of the previous backspaces.  Instead, one should do::

    m.plain_keys('\b\b')

in one node to show the effects of the backspaces on the completion list, and then do::

    m.plain_keys('\t')

in the next node to show the effects of the new tab completion.

Test .leo now has an example of this in an expanded explanation of tab completion.

Edward

Edward K. Ream

unread,
Sep 17, 2012, 4:12:28 PM9/17/12
to leo-e...@googlegroups.com
On Monday, September 17, 2012 8:02:09 AM UTC-5, Edward K. Ream wrote:

> With these improvements, the essentials of the screencast plugin are complete.

Rev 5446 completes the essentials of the plugin with a brilliant hack, if I do say so myself.

Instead of just having m.state_handler just ignore all keys except LtArrow, RtArrow, Escape (and Ctrl-g which k.masterKeyHandler honors),  the state handler will pass them along to m.single_key (which passes them along to k.masterKeyhandler) *provided* that the screencast is in the midst of simulating *another* key state.  (provided m.k_state.kind is neither empty nor 'screencast'.)

For example, suppose the screencast has done an Alt-X to open the minibuffer.  Now, if you type anything except LtArrow, RtArrow, Escape or Ctrl-g, the character will be sent to the minibuffer(!!!).  This allows a presenter to go "off script".  But the presenter is still executing a screencast as usual, so the arrow keys still control the screencast.

The motivation for this trick came from experiments with the LtArrow (undo) key, which now accurately shows the previous slide's captions and images.  However, there is *no way* for the undo logic to handle what the previous slide might have put into the minibuffer.  But with this excellent hack, the presenter can "correct" the contents of the minibuffer (or anything else) after doing the undo.

If people find this hack confusing, it can always be disabled.  However, I have already fallen in love with it, and I think you may too.

Edward
Reply all
Reply to author
Forward
0 new messages