Page 1 of 1

add param support for predefined search

Posted: 2020-01-12, 05:18 UTC
by dindog
it's useful to add predefined search some placeholder and input when it's called when selected (in dialog) or as a parameters in internal command internal loadsearch"

For example, I have a plugin name "AGE" which can calculate files created, modified, accessed time by now. It's really useful for backup file by searching files' created or modified since xx days ago.

But the time elapsed, e.g. xx days, is a variable depend on situation. I suggest a predefined search with params should be implemented, which mean only the placeholder params prompted for user input, or by command like

Code: Select all

 loadsearch ageInDays 10
With current tc, if I has a predefined search type like "7 days ago doc or txt", I want to filter "3 days ago doc or txt", I either set a new search, or load the "7 days ago doc or txt" and set the created & modified time to 3 days ago in plugin setting.

Re: add param support for predefined search

Posted: 2020-01-12, 12:10 UTC
by petermad
And what if several rules are used in the Plugins Tab - which one should the "10" value be used with?

Re: add param support for predefined search

Posted: 2020-01-12, 12:56 UTC
by nsp
petermad wrote:
2020-01-12, 12:10 UTC
And what if several rules are used in the Plugins Tab - which one should the "10" value be used with?
The proposal would be complete if a naming convention to number parameters and map to field is also in place !
%1 %2 %3 .... as unique parameter of a field could indicate which values goes where ...

Re: add param support for predefined search

Posted: 2020-01-12, 16:29 UTC
by dindog
petermad wrote:
2020-01-12, 12:10 UTC
And what if several rules are used in the Plugins Tab - which one should the "10" value be used with?
yes, placeholder as nsp said. In fact, the example show above mentioned plugin "Age", "created time" and "modified time" are two different fields, when I meant to backup new files, last 10 days "new files", may be new created or recent modified... two field, one placeholder, done. In the traditional way, I need to loadsearch, then change two fields.