Filters

Here you can discuss about your favorite plug-in.
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Filters

Post by HaRT »

Latest post of the previous page:

pepak wrote: Mon 08 May, 2023 07:27Version 0.10
Thanks for the fixes and for the URL decoding filter.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Filters

Post by HaRT »

Suggestion for the External filter: please add an option to insert the output at the current caret position rather than replace the selection. The caret position can be disjoint from the selection (e.g. via persistent blocks), and the selection (if any) should still be fed to the filter.
This option will be useful when invoking CLI chat clients (such as Bito) whereas a user will input a prompt, select it top-down, invoke the filter, and the reply will be placed below the request, not replace it, thus letting to keep multiple rounds easily.
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Filters

Post by pepak »

Technically, it shouldn't be too difficult to implement. I am rather worried about the UI, though: It's easy to add a checkbox to the filter specification, but I expect the user would want to decide whether they want to use insert or replace at the moment of invoking the filter, and that would be more difficult. Wouldn't this be better solved by modifying the supplied .lua script to cancel the selection and then execute the plugin?
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Filters

Post by HaRT »

pepak wrote: Tue 01 Aug, 2023 17:09 it shouldn't be too difficult to implement
That's what I expect because the plugin supposedly inserts the output anyway, yet after removing the selected text.
pepak wrote: Tue 01 Aug, 2023 17:09 user would want to decide whether they want to use insert or replace at the moment of invoking the filter
I imagine this another way. If a user creates a dedicated external filter (e.g. named ChatBot) for such CLI app, they would need the replies inserted every time, so this should be saved into the filter specification indeed. Or they might have (like I do) an ad-hoc external filter that is being edited for each invocation, so un-/ticking a checkbox would be no problem. (And the default checkbox state would be persisted when the filter is saved.)
pepak wrote: Tue 01 Aug, 2023 17:09 better solved by modifying the supplied .lua script to cancel the selection and then execute the plugin?
This is not quite clear to me. If the script clears the selection before calling into the plug-in, how will the plug-in know which part of text to use as the request? And if after, it's pointless since the selection has been replaced by the reply already.
Фар есть инструмент, а не нянька. © 2009 DrKnS
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Filters

Post by pepak »

Version 0.11
  • External filters now have a configuration option to keep the input data in editor and just place the output at the cursor location, rather than replace it. The default value is unchecked, which mimics the behavior from older versions: when the filter runs, the input data will get deleted and output data will be placed into the editor in its place.
  • Fixed incorrect positioning of the before-run filter configuration options for external filters if the "Edit before use" option was enabled.
Download
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Filters

Post by HaRT »

pepak wrote: Sat 02 Sep, 2023 14:13 PlugRing - cannot upload, receiving "Wrong file id" errors.
This is very unpleasant indeed (and out of my control), and other plug-in authors face it too. The workaround is to remove the id element from the upload form locally (via browser's Inspect | Elements, or the like), then post.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Post Reply

Return to “General Plug-In Discussions”