Re: Command To Convert Selection Or Body To Title Case

2023-01-11 Thread Kevin Henderson
I'll check out that Freewin plugin, thank you. I'm not sure how to actually execute the functions, even if i've found the definition. Recently I made this (which is obviously very ugly for multiple reasons) - for a duplicate-line command. I started with your example, Tom, then added/modified the

Re: Command To Convert Selection Or Body To Title Case

2023-01-10 Thread Thomas Passin
Yes, it can be hard to find out how to do things you want in Leo. The good news is that you can do most anything. Remember to undo/redo operations that change a node or the tree - my title-case script shows how to do that for node content. Leo's code base is in the PyLeoRef.leo outline, as I

Re: Command To Convert Selection Or Body To Title Case

2023-01-10 Thread Kevin Henderson
This is great timing Thomas, thank you! I've been away from Leo for a while, but making another attempt to get back into it. I've had a _heck_ of time figuring out how to do what showed, in my case I wanted a 'duplicate-line' command. It really is tremendously difficult to figure out what to

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Edward K. Ream
> Thomas: Let's add the scripting-miscellany link to Leo's Help menu. > EKR: Good idea. Done via PR #3030 . See also #3029 : Add undoable check-nodes command. Edward -- You received this

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Edward K. Ream
On Wed, Jan 4, 2023 at 12:27 PM Thomas Passin wrote: > Let's add the scripting-miscellany link to Leo's Help menu. > Good idea. 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

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Thomas Passin
Let's add the scripting-miscellany link to Leo's Help menu. On Wednesday, January 4, 2023 at 11:32:09 AM UTC-5 Edward K. Ream wrote: > On Wednesday, January 4, 2023 at 10:18:53 AM UTC-6 Edward K. Ream wrote: > > > I've just added this entry >

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Edward K. Ream
On Wednesday, January 4, 2023 at 10:18:53 AM UTC-6 Edward K. Ream wrote: > I've just added this entry (online and in devel). And I've just updated this page in

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Edward K. Ream
On Wed, Jan 4, 2023 at 8:22 AM Thomas Passin wrote: > Hah! That's what I was trying to remember. If we forget about these > places, how is a newbie going to find them? It's in Leo's table of contents. I've just added this entry

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Thomas Passin
Hah! That's what I was trying to remember. If we forget about these places, how is a newbie going to find them? Isn't there a link in the cheatsheet stuff that Leo puts into the default workbook when it is run for the first time? On Wednesday, January 4, 2023 at 6:28:31 AM UTC-5 jkn wrote:

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread jkn
It is/was my starting-off place re. scripting; especially when I forget about scripts.leo ... On Wednesday, January 4, 2023 at 9:06:31 AM UTC Edward K. Ream wrote: > On Wed, Jan 4, 2023 at 2:56 AM jkn wrote: > >> This is the other candidate place, of course: >> >>

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Edward K. Ream
On Wed, Jan 4, 2023 at 2:56 AM jkn wrote: > This is the other candidate place, of course: > > https://leoeditor.com/scripting-miscellany.html > Heh. I had forgotten about this. Thanks for the reminder. Edward -- You received this message because you are subscribed to the Google Groups

Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread jkn
This is the other candidate place, of course: https://leoeditor.com/scripting-miscellany.html On Tuesday, January 3, 2023 at 9:28:42 PM UTC Edward K. Ream wrote: > On Tue, Jan 3, 2023 at 2:58 PM jkn wrote: > >> Well, maybe we should have a push to improve the 'visibility' of >>

Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread Edward K. Ream
On Tue, Jan 3, 2023 at 2:58 PM jkn wrote: > Well, maybe we should have a push to improve the 'visibility' of > scripts.leo. I can't remember how it is 'promoted', perhaps some work in > that are would be worthwhile. > > I see there is no introduction to itself inside the file, so it's not very >

Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread jkn
Well, maybe we should have a push to improve the 'visibility' of scripts.leo. I can't remember how it is 'promoted', perhaps some work in that are would be worthwhile. I see there is no introduction to itself inside the file, so it's not very clear what it's supposed to represent. Would

Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread Edward K. Ream
On Tue, Jan 3, 2023 at 4:23 AM jkn wrote: > > Yes ... 'many' of the scripts I come across, eg. on this newsgroup, need a > bit of tweaking to run with more modern Leo. But I think a collection with > some of the concepts 'curated' and commented on would be useful. > > Like you, I always forget

Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread Thomas Passin
Where do you think a collection like that should live, bearing in mind that it should be easy for a newbie to learn about it? On Tuesday, January 3, 2023 at 5:23:47 AM UTC-5 jkn wrote: > > Yes ... 'many' of the scripts I come across, eg. on this newsgroup, need a > bit of tweaking to run with

Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread jkn
Yes ... 'many' of the scripts I come across, eg. on this newsgroup, need a bit of tweaking to run with more modern Leo. But I think a collection with some of the concepts 'curated' and commented on would be useful. Like you, I always forget about scripts.leo; not sure that is the right place.

Re: Command To Convert Selection Or Body To Title Case

2023-01-02 Thread Thomas Passin
Theoretically they can go into scripts.leo, but I always forget about that outline and a lot of its scripts are so long unmaintained that they don't even work. That, or they are so specialized that it's hard to even know what they do. I do agree that a collection of small utility scripts

Re: Command To Convert Selection Or Body To Title Case

2023-01-02 Thread jkn
It would be good to have a miscellany of little script examples like this easily available, to give people assistance with learning Leo scripting. I know a few have been published as Github gists in the past, and there are some clues in the Leoeditor.com documentation, but a few dozen snippets

Command To Convert Selection Or Body To Title Case

2023-01-01 Thread Thomas Passin
Leo has commands to capitalize, upcase, and lowercase the body text or selections of the body text. I could not find a command to convert to title case (first letter of every word capitalized). So here is a script to do so. The script does not take into account any tricky edge cases - it