Guten Tag!
Wie kann ich mehrere Dateitypen von einem Lister- Plugin ausschließen?
Ich habe gefunden, daß z.B.
3_detect="EXT!="TXT""
Textdateien vom 3. Lister-Plugin ausschließt. Aber wie muß das für TXT und LOG- Dateien aussehen?
Die Variante analog zum Einschluß
3_detect="EXT!="TXT" | EXT!="LOG""
funktioniert leider gar nicht.
Gruß
Geigolino
mehrere Dateitypen von Lister- Plugin ausschließen
Moderators: Hacker, Stefan2, white
Hallo ZoSTeR,
ganz herzlichen Dank! So funktioniert es wunderbar.
Gibt es dafür eine Befehlssyntax? Im WIKI http://www.ghisler.ch/wikide/index.php/Ini-Einstellungen konnte ich das leider nicht entdecken.
Mit freundlichen Grüßen
Geigolino
ganz herzlichen Dank! So funktioniert es wunderbar.
Gibt es dafür eine Befehlssyntax? Im WIKI http://www.ghisler.ch/wikide/index.php/Ini-Einstellungen konnte ich das leider nicht entdecken.
Mit freundlichen Grüßen
Geigolino
Die dafür gedachte Anlaufstelle sind die Plugin-Dokus, hier zu finden ("LS-Plugin Guide").Geigolino wrote:Gibt es dafür eine Befehlssyntax? Im WIKI http://www.ghisler.ch/wikide/index.php/Ini-Einstellungen konnte ich das leider nicht entdecken.
(ist leider noch eine mittlerweile überholte, und auf Vista+ nicht mehr anzeigbare hlp-Datei)
Das Plugin soll aber eigentlich selbst festlegen welche Dateien es öffnet.
Bei Problemen solltest du die Plugin-Reihenfolge ändern, also z.B. diejenigen Plugins die Probleme machen nach unten in der Liste.
Last edited by milo1012 on 2015-06-11, 15:27 UTC, edited 1 time in total.
TC plugins: PCREsearch and RegXtract
Den Viewer für HLP-Dateien muß man nachinstallieren. Link
Hier der Text:
ListGetDetectString is called when the plugin is loaded for the first time. It should return a parse function which allows Lister to find out whether your plugin can probably handle the file or not. You can use this as a first test - more thorough tests may be performed in ListLoad(). It's very important to define a good test string, especially when there are dozens of plugins loaded! The test string allows lister to load only those plugins relevant for that specific file type.
XXX
Remarks:
The syntax of the detection string is as follows. There are operands, operators and functions.
Operands:
EXT The extension of the file to be loaded (always uppercase).
SIZE The size of the file to be loaded.
FORCE 1 if the user chose 'Image/Multimedia' from the menu, 0 otherwise.
MULTIMEDIA This detect string is special: It is always TRUE (also in older TC versions). If it is present in the string, this plugin overrides internal multimedia viewers in TC. If not, the internal viewers are used. Check the example below!
[5] The fifth byte in the file to be loaded. The first 8192 bytes can be checked for a match.
12345 The number 12345
"TEST" The string "TEST"
Operators
& AND. The left AND the right expression must be true (!=0).
| OR: Either the left OR the right expression needs to be true (!=0).
= EQUAL: The left and right expression need to be equal.
!= UNEQUAL: The left and right expression must not be equal.
< SMALLER: The left expression is smaller than the right expression. Comparing a number and a string returns false (0). Booleans are stored as 0 (false) and 1 (true).
> LARGER: The left expression is larger than the right expression.
Functions
() Braces: The expression inside the braces is evaluated as a whole.
!() NOT: The expression inside the braces will be inverted. Note that the braces are necessary!
FIND() The text inside the braces is searched in the first 8192 bytes of the file. Returns 1 for success and 0 for failure.
FINDI() The text inside the braces is searched in the first 8192 bytes of the file. Upper/lowercase is ignored.
Internal handling of variables
Varialbes can store numbers and strings. Operators can compare numbers with numbers and strings with strings, but not numbers with strings. Exception: A single char can also be compared with a number. Its value is its ANSI character code (e.g. "A"=65). Boolean values of comparisons are stored as 1 (true) and 0 (false).
Examples:
String Interpretation
EXT="WAV" | EXT="AVI" The file may be a Wave or AVI file.
EXT="WAV" & [0]="R" & [1]="I" & [2]="F" & [3]="F" & FIND("WAVEfmt")
Also checks for Wave header "RIFF" and string "WAVEfmt"
EXT="WAV" & (SIZE<1000000 | FORCE) Load wave files smaller than 1000000 bytes at startup/file change, and all wave files if the user explictly chooses 'Image/Multimedia' from the menu.
([0]="P" & [1]="K" & [2]=3 & [3]=4) | ([0]="P" & [1]="K" & [2]=7 & [3]=8)
Checks for the ZIP header PK#3#4 or PK#7#8 (the latter is used for multi-volume zip files).
EXT="TXT" & !(FINDI("<HEAD>") | FINDI("<BODY>")) This plugin handles text files which aren't HTML files. A first detection is done with the <HEAD> and <BODY> tags. If these are not found, a more thorough check may be done in the plugin itself.
MULTIMEDIA & (EXT="WAV" | EXT="MP3") Replace the internal player for WAV and MP3 files (which normally uses Windows Media Player as a plugin). Requires TC 6.0 or later!
Operator precedence:
The strongest operators are =, != < and >, then comes &, and finally |. What does this mean? Example:
expr1="a" & expr2 | expr3<5 & expr4!=b will be evaluated as ((expr1="a") & expr2) | ((expr3<5) & (expr4!="b"))
If in doubt, simply use braces to make the evaluation order clear.
Hier der Text:
ListGetDetectString is called when the plugin is loaded for the first time. It should return a parse function which allows Lister to find out whether your plugin can probably handle the file or not. You can use this as a first test - more thorough tests may be performed in ListLoad(). It's very important to define a good test string, especially when there are dozens of plugins loaded! The test string allows lister to load only those plugins relevant for that specific file type.
XXX
Remarks:
The syntax of the detection string is as follows. There are operands, operators and functions.
Operands:
EXT The extension of the file to be loaded (always uppercase).
SIZE The size of the file to be loaded.
FORCE 1 if the user chose 'Image/Multimedia' from the menu, 0 otherwise.
MULTIMEDIA This detect string is special: It is always TRUE (also in older TC versions). If it is present in the string, this plugin overrides internal multimedia viewers in TC. If not, the internal viewers are used. Check the example below!
[5] The fifth byte in the file to be loaded. The first 8192 bytes can be checked for a match.
12345 The number 12345
"TEST" The string "TEST"
Operators
& AND. The left AND the right expression must be true (!=0).
| OR: Either the left OR the right expression needs to be true (!=0).
= EQUAL: The left and right expression need to be equal.
!= UNEQUAL: The left and right expression must not be equal.
< SMALLER: The left expression is smaller than the right expression. Comparing a number and a string returns false (0). Booleans are stored as 0 (false) and 1 (true).
> LARGER: The left expression is larger than the right expression.
Functions
() Braces: The expression inside the braces is evaluated as a whole.
!() NOT: The expression inside the braces will be inverted. Note that the braces are necessary!
FIND() The text inside the braces is searched in the first 8192 bytes of the file. Returns 1 for success and 0 for failure.
FINDI() The text inside the braces is searched in the first 8192 bytes of the file. Upper/lowercase is ignored.
Internal handling of variables
Varialbes can store numbers and strings. Operators can compare numbers with numbers and strings with strings, but not numbers with strings. Exception: A single char can also be compared with a number. Its value is its ANSI character code (e.g. "A"=65). Boolean values of comparisons are stored as 1 (true) and 0 (false).
Examples:
String Interpretation
EXT="WAV" | EXT="AVI" The file may be a Wave or AVI file.
EXT="WAV" & [0]="R" & [1]="I" & [2]="F" & [3]="F" & FIND("WAVEfmt")
Also checks for Wave header "RIFF" and string "WAVEfmt"
EXT="WAV" & (SIZE<1000000 | FORCE) Load wave files smaller than 1000000 bytes at startup/file change, and all wave files if the user explictly chooses 'Image/Multimedia' from the menu.
([0]="P" & [1]="K" & [2]=3 & [3]=4) | ([0]="P" & [1]="K" & [2]=7 & [3]=8)
Checks for the ZIP header PK#3#4 or PK#7#8 (the latter is used for multi-volume zip files).
EXT="TXT" & !(FINDI("<HEAD>") | FINDI("<BODY>")) This plugin handles text files which aren't HTML files. A first detection is done with the <HEAD> and <BODY> tags. If these are not found, a more thorough check may be done in the plugin itself.
MULTIMEDIA & (EXT="WAV" | EXT="MP3") Replace the internal player for WAV and MP3 files (which normally uses Windows Media Player as a plugin). Requires TC 6.0 or later!
Operator precedence:
The strongest operators are =, != < and >, then comes &, and finally |. What does this mean? Example:
expr1="a" & expr2 | expr3<5 & expr4!=b will be evaluated as ((expr1="a") & expr2) | ((expr3<5) & (expr4!="b"))
If in doubt, simply use braces to make the evaluation order clear.