How can I set the maximum size of the file that the lister plugin can take over?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
helloiac
Junior Member
Junior Member
Posts: 11
Joined: 2018-05-03, 13:45 UTC

How can I set the maximum size of the file that the lister plugin can take over?

Post by *helloiac »

From time to time, I face the situation where TC and lister get stuck because I preview a large file with a certain lister plugin, such as accidentally opening an xml file of more than 10M with xmlviewer, or opening a json file of more than 10M with jsonviewer. The reason why I say this is a misoperation is that I know that due to execution efficiency, they will not respond for a long time. My original intention was to quickly look at the general structure of the file, and I did not need xmlviewer or jsonviewer to do structural processing and syntax rendering. And I installed this kind of plug-in to preview most small xml or json files with better visual effects, so I don’t plan to simply disable or uninstall it.

I want to know how to set the lister (such as using plugman to modify the corresponding configuration items) to call this plug-in only when the submission of a certain type of file is less than a certain size? For example, how to call jsonviewr for preview only when the json file is less than 100KB?

Looking forward to your advice, thank you in advance!
User avatar
Dalai
Power Member
Power Member
Posts: 9945
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: How can I set the maximum size of the file that the lister plugin can take over?

Post by *Dalai »

helloiac wrote: 2024-09-23, 13:40 UTCFor example, how to call jsonviewr for preview only when the json file is less than 100KB?

Code: Select all

25=%COMMANDER_PATH%\Plugins\JSONViewer\JSONViewer.wlx
25_detect="MULTIMEDIA & (EXT="JSON" | EXT="JSONLZ4" | EXT="LZ4" | EXT="MOZLZ4") & (SIZE<100000)"
TC can also be told to load a plugin only when called specifically by pressing the 4 key:

Code: Select all

5=%COMMANDER_PATH%\Plugins\Syn2\Syn2.wlx
5_detect="FORCE & (EXT="CONF" | EXT=...)"
Though this Wiki article is about content plugins the syntax and rules are the same for Lister plugins: https://www.ghisler.ch/wiki/index.php?title=ContentGetDetectString
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
helloiac
Junior Member
Junior Member
Posts: 11
Joined: 2018-05-03, 13:45 UTC

Re: How can I set the maximum size of the file that the lister plugin can take over?

Post by *helloiac »

Thanks, I solve the problem, you helps a lot!
Post Reply