Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
I seem to remember that somewhere in the code base, Leo code to capture the screen has already been worked out. If that's the case we're in clover. On Saturday, March 9, 2024 at 3:09:24 PM UTC-5 jkn wrote: > The way I have been using the Obsidian feature is to paste image bytes > (eg. from a

A Script To Insert An Image

2024-03-09 Thread Thomas Passin
We can't directly insert an image into a standard Leo node because they are text-only. I find this very annoying sometimes, especially when I am writing a note and want to include an image. But we can do the next best thing - insert an ReStructuredText (RsT) instruction to display an image

Re: A Script To Insert An Image

2024-03-09 Thread jkn
This looks interesting and useful, thanks Thomas. I confess I rarely/never use Leo with images, I really should experiment a little. Recently I have been using Obsidian as a note-taking app (Joplin is similar). Neither are as capable as Leo, in many ways, but they have their niceties. One that

Re: A Script To Insert An Image

2024-03-09 Thread jkn
I would expect that to be somewhat os-dependant (I mostly use Linux), but perhaps it is there. I will try to take a look for clipboard-paste functions. On Saturday, March 9, 2024 at 8:22:44 PM UTC tbp1...@gmail.com wrote: > I seem to remember that somewhere in the code base, Leo code to

Re: A Script To Insert An Image

2024-03-09 Thread jkn
I am really thinking of the situation where I have already captured an image to the clipboard (using some other app...), and then want to paste into Leo. But there will undoubtably be something useful in what Terry has done On Saturday, March 9, 2024 at 8:34:45 PM UTC tbp1...@gmail.com wrote:

Re: A Script To Insert An Image

2024-03-09 Thread jkn
The way I have been using the Obsidian feature is to paste image bytes (eg. from a screen region capture). So Obsidian saves a file: /path/to/attachments/ Pasted image 20240228230106.png Where /path/to/attachments is an Obsidian setting, and the name of the file is clearly a timestamp.

Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
Yup, Terry Brown has already done most of it for us in the screen_capture plugin. Here's the docstring: """ screen_capture.py = Capture screen shots - single frames are useful. The `Recorder` class can also capture frames continuously but that's not really useful, it doesn't

Re: A Script To Insert An Image

2024-03-09 Thread Thomas Passin
Shouldn't be hard. What would be on the clipboard? Image bytes? Or an image filename? I often select an image in a file manager window, copy it to an "images" subdirectory of the current outline, then write the embedding code into and "images" child node. That would be easy to write a

Re: LeoJS - How To Write To File System And Run External Programs

2024-03-09 Thread Félix
I'm still working on this! Thanks for your patience :) (The latest LeoJS 0.2.12 release is the result of trying to capture many features for that video tutorial, and realizing that they needed a bit of polishing!) Félix On Wednesday, January 3, 2024 at 7:18:33 PM UTC-5 tbp1...@gmail.com

Re: ✨LeoJS beta 0.2.12 Released!

2024-03-09 Thread Thomas Passin
A great achievement, Felix! So much work, too! I see this update isn't in the marketplace for vscodium yet. Coming soon, I imagine? It updated successfully in VScode. On Saturday, March 9, 2024 at 9:40:56 PM UTC-5 Félix wrote: > Introducing LeoJS Beta 0.2.12 > Félix here, ecstatic to

Re: LeoJS - How To Write To File System And Run External Programs

2024-03-09 Thread Thomas Passin
I don't know if you got around to thinking about it yet (you've got so much else going on!), but the command I wrote to run external files is in LeoPyRef and it's called *execute-external-file*. It has some trickiness because it has to run on Linux as well as Windows, and the terminal