Re: New picture_viewer.py plugin in devel

2021-10-23 Thread Edward K. Ream
On Sat, Oct 23, 2021 at 12:38 PM tbp1...@gmail.com wrote: I now noticed that an initial path is already one of the *run(*) > arguments. Great! > :-) It's remarkable how simple all the methods are. Edward -- You received this message because you are subscribed to the Google Groups

Re: New picture_viewer.py plugin in devel

2021-10-23 Thread tbp1...@gmail.com
On Saturday, October 23, 2021 at 11:14:24 AM UTC-4 tbp1...@gmail.com wrote: > I'm also thinking it might be useful to be able to optionally specify the > target directory. > I now noticed that an initial path is already one of the *run(*) arguments. Great! -- You received this message

Re: New picture_viewer.py plugin in devel

2021-10-23 Thread tbp1...@gmail.com
Turns out you can set the initial zoom factor like this: from leo.plugins.picture_viewer import Slides Slides.scale = .5 Slides().run(c, reset_zoom = False) So no need to change any code. You must use reset_zoom = False for this to work. The one minor negative is that the window itself doesn't

Re: New picture_viewer.py plugin in devel

2021-10-23 Thread tbp1...@gmail.com
I tried the *width* argument, and I had expected that the aspect ratio would be the original. Instead, the width was set to my value but the original size was not changed. So the image was clipped in width. This is not very helpful. I'd rather see the zoom factor set so that the specified

Re: New picture_viewer.py plugin in devel

2021-10-23 Thread tbp1...@gmail.com
Oh, I see, those args are for *run()*, not the constructor. On Saturday, October 23, 2021 at 9:39:14 AM UTC-4 tbp1...@gmail.com wrote: > Those args in the docstring are not set in the *Slides* constructor: > > exception executing script > TypeError: 'reset_zoom' is an unknown keyword argument >

Re: New picture_viewer.py plugin in devel

2021-10-23 Thread tbp1...@gmail.com
Those args in the docstring are not set in the *Slides* constructor: exception executing script TypeError: 'reset_zoom' is an unknown keyword argument line 4: from leo.plugins.picture_viewer import Slides * line 5: Slides(reset_zoom = False, width = 900, sort_kind =

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 8:34 PM tbp1...@gmail.com wrote: > Here's my stab at it. Replace all the current text in the docstring ahead > of the binding and API information with the following: Done at rev 2f65d83

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 8:47 PM tbp1...@gmail.com wrote: > This is very nice, and one of the nice things about it is how it > automatically ignores non-image files without the user having to do > anything. > > A suggestion for better usability - after you zoom or shrink a slide, the > new zoom

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 10:52 PM tbp1...@gmail.com wrote: > In get_files(), there is > > os.path.splitext(str(z))[1].lower() in self.extensions > > I'm just wondering why it isn't g.os_path_splitext() instead. Are these > *g.os_path_** commands being phased out? (Actually, I never understood >

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
In get_files(), there is os.path.splitext(str(z))[1].lower() in self.extensions I'm just wondering why it isn't g.os_path_splitext() instead. Are these *g.os_path_** commands being phased out? (Actually, I never understood why we have them at all but given that we do, why not use it here?)

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
This is very nice, and one of the nice things about it is how it automatically ignores non-image files without the user having to do anything. A suggestion for better usability - after you zoom or shrink a slide, the new zoom factor should stay in effect for all other slides until you change

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
Here's my stab at it. Replace all the current text in the docstring ahead of the binding and API information with the following: Display image files in a directory tree as a slide show. This plugin will display all files in a directory tree that have image extensions. By default the

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 10:59 AM tbp1...@gmail.com wrote: And I see from the PixMap docs that it can actually support some other > formats. > > You may think it's the same thing, but I suggest spelling out just what > the viewer can do would be helpful. > Ah, the curse of knowledge. Please

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 10:45 AM tbp1...@gmail.com wrote: > picture_viewer.py is in the plugins directory but not in LeoPyRef. > Thanks for this report. Rev 2693456 in devel adds the missing @file node. Edward -- You received this message because you are subscribed to the Google Groups

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
Maybe the docstring said that at one time but it doesn't now : ). It says this: A plugin for displaying slides from a folder and its subfolders. And this: The following keyword arguments may be supplied to the run method: ... extensions = ['.jpeg', '.jpg', '.png'], # List of file extensions.

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
picture_viewer.py is in the plugins directory but not in LeoPyRef. On Friday, October 22, 2021 at 10:50:49 AM UTC-4 Edward K. Ream wrote: > On Fri, Oct 22, 2021 at 8:13 AM tbp1...@gmail.com > wrote: > >> What are the slides? Image files? HTML bullet files? >> > > Good question. As the

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread Edward K. Ream
On Fri, Oct 22, 2021 at 8:13 AM tbp1...@gmail.com wrote: > What are the slides? Image files? HTML bullet files? > Good question. As the docstrings says, by default the viewer will display all .jpeg, .jpg, and .png files in the root directory and all subdirectory. The *show_slide *method

Re: New picture_viewer.py plugin in devel

2021-10-22 Thread tbp1...@gmail.com
What are the slides? Image files? HTML bullet files? On Thursday, October 21, 2021 at 10:46:20 PM UTC-4 Edward K. Ream wrote: > On Thursday, October 21, 2021 at 9:42:16 PM UTC-5 Edward K. Ream wrote: > >> See PR #2280 , which >> contains the

Re: New picture_viewer.py plugin in devel

2021-10-21 Thread Edward K. Ream
On Thursday, October 21, 2021 at 9:42:16 PM UTC-5 Edward K. Ream wrote: > See PR #2280 , which > contains the docstring. > *Note*: there is no need to enable this plugin. The plugin exists only to support scripts. Edward -- You received

New picture_viewer.py plugin in devel

2021-10-21 Thread Edward K. Ream
See PR #2280 , which contains the docstring. My copy of myLeoSettings.leo contains @command nodes for slide shows. For example: *@command slides* from leo.plugins.picture_viewer import Slides Slides().run(full_screen = True, sort_kind =