Page 1 of 1

renaming a movie name that is prefixed with ellipses

Posted: 15 Oct 2020, 23:54
by cheaters
I am trying to process a movie that has ellipses at the beginning of its name and Apple Finder is treating the file as a dot file or invisible file.

It's probably a very rare situation but maybe should be hardcoded for MacOS?

…And Justice for All (1979)

In system.properties I had set

Code: Select all

unixfs=true
Flipping that switch on and off (commenting out that line) didn't change the way the file was renamed when pulling info TVDB.

Re: renaming a movie name that is prefixed with ellipses

Posted: 16 Oct 2020, 03:09
by rednoah
There's a difference between ... (3 dots) and … (1 ellipsis) but since both . and … are perfectly valid in Windows file names the -unixfx switch is expected to have no effect.


:idea: Presumably, the movie name has been entered into the database using ... (3 dots) and not … (1 ellipsis) but you can of course fix that up as desired via the format:

Code: Select all

n.replace('...', '…')

Image

Re: renaming a movie name that is prefixed with ellipses

Posted: 16 Oct 2020, 16:52
by cheaters
The -unixfx switch is for Windows users only then? Sorry, I tried to do a search for that term and get zero results.

You guessed correctly TVDB had it as three periods and not an ellipses. I changed the title on TVDB to use an ellipses.

:?: Now how do I get FileBot to stop using the cached version of the movie name from TVDB? Using the Shift key doesn't seem to fetch the new name

Re: renaming a movie name that is prefixed with ellipses

Posted: 16 Oct 2020, 17:09
by rednoah
1.
FileBot will make file names Windows-compatible by default on all platforms. The -unixfs switch can be used to disable this behaviour. As such, specifying -unixfs on Windows makes no sense because Windows file system operations will not accept Windows-incompatible file names.


2.
You can try clearing the cache:
viewtopic.php?t=1996

Re: renaming a movie name that is prefixed with ellipses

Posted: 16 Oct 2020, 17:30
by cheaters
I don't really care about Windows-compatible file names I need Unix-compatible filenames. I am a bit insulted that Windows gets preferential treatment :lol:

But since this terminology hasn't been well defined I have no idea what it really does and without that information can't really make proper choices. I guess I will add unixfs=true back inside system.properties. Again, having no clue what it really affects since I am still getting incompatible characters in my filenames.

Instead of re-hashing this on a case by case basis why not hardcode the GUI depending on the OS.

There is a character that will substitute for a colon on Unix or Windows. When FileBot validates a file why not just replace the colon that is found with this character - hardcoded?
I found a very similar character to a colon, "꞉" it is a unicode character called a Modifier Letter Colon. This has no space like the fullwidth colon and is pretty much exactly the same as a regular colon but the symbol works. You can either copy and paste it from above or you can use the code point, U+A789
Link

:?: Can we use code points instead of characters in FileBot renaming?

Re: renaming a movie name that is prefixed with ellipses

Posted: 16 Oct 2020, 18:39
by kim
not everyone wants it like you...

Code: Select all

{n.colon(' - ')}
.. BUT I cant see why not to have option to convert a invalid character with system.properties "look alike"

btw:

Code: Select all

{':'.replace(':','\uA789')}

Code: Select all

{':abc'.replace(':','\u02D0')}
https://www.w3schools.com/charsets/ref_ ... ifiers.asp

Code: Select all

{'abc-abc'.replace('-','\u2012')}
https://www.w3schools.com/charsets/ref_ ... uation.asp

Re: renaming a movie name that is prefixed with ellipses

Posted: 17 Oct 2020, 03:24
by rednoah
jprokos wrote: 16 Oct 2020, 17:30 I don't really care about Windows-compatible file names I need Unix-compatible filenames. I am a bit insulted that Windows gets preferential treatment :lol:
Any sequence of characters is Unix-compatible. There is no such thing as a Unix-incompatible file path.

jprokos wrote: 16 Oct 2020, 17:30 I am still getting incompatible characters in my filenames.
That just proofs that it's not an incompatible character in the first place. The . dot character is entirely legal as far as the operating system and file system are concerned.

jprokos wrote: 16 Oct 2020, 17:30 Instead of re-hashing this on a case by case basis why not hardcode the GUI depending on the OS.
We want consistent behaviour on all operating systems. Additionally, running FileBot on a Linux machine (e.g. NAS) and then accessing the files from a Windows machine via SMB is an extremely common use case.

jprokos wrote: 16 Oct 2020, 17:30 There is a character that will substitute for a colon on Unix or Windows. When FileBot validates a file why not just replace the colon that is found with this character - hardcoded?
Replacing . : / ? etc with similar looking Unicode code points is generally a bad idea. Perhaps it'll work well for you and your specific requirements though.

e.g. replace : with ∶ in your custom format:

Code: Select all

n.replace(':','∶')
:idea: https://unicode-table.com/en/2236/


:arrow: If this is the path you choose for yourself, please create a new thread so that we can collect all the character mappings and format code in one place, so others can easily copy and paste your solution if desired.