AMC collapses explicit whitespace
Posted: 25 Aug 2017, 01:23
Description: the AMC script collapses whitespace to single spaces.
Expected Behavior: explicitly typed characters are all included in the filename with none omitted.
Note: even your forum eats white space so forgive the poor formatting below.
You (correctly) don't eat adjacent "_" characters or "z" characters or "." characters, why eat whitespace?
If I wanted a single space, I would've typed it that way.
If I wanted my input whitespace trimmed I'd use a groovy pattern to do exactly that.
---------
Expected Behavior: explicitly typed characters are all included in the filename with none omitted.
Note: even your forum eats white space so forgive the poor formatting below.
Code: Select all
Example:
movieformat = foo bar results in files named "foo bar" not "foo bar"
Counterexample:
movieformat = foo__bar results in files named "foo__bar" as expected
Example:
movieformat = foo{"".pad(10," ")}bar results in files named "foo bar" not "foo bar"
Counterexample:
movieformat = foo{"".pad(10,"-")}bar results in files named "foo----------bar" as expected
If I wanted a single space, I would've typed it that way.
If I wanted my input whitespace trimmed I'd use a groovy pattern to do exactly that.
---------
Code: Select all
FileBot 4.7.11 (r5162)
JNA Native: 5.1.0
MediaInfo: 0.7.97
Apache Commons VFS: [zip, rar]
Chromaprint: 1.4.2
Extended Attributes: java.io.IOException: UserDefinedFileAttributeView is not supported
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_131
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 2 Core / 3 GB Max Memory / 17 MB Used Memory
OS: FreeBSD (amd64)
Package: PORTABLE