Close
Well I'm not sure how the site does it, but if you could just mimic its behavior for replacing invalid characters and shortening overly long tags in file names automatically that would probably be the best solution.

I already finished renaming everything with that csv based python script you posted so I don't even need it anymore (I just had to run it multiple times for every error it ran into that I forgot to fix) but it would be helpful for anybody else that needs to run it.

I also noticed another bug which I'm not sure of the cause.

For example the following which is outputted to the rename.txt:

02bcd4a0fd0ce3c30888a0267e2e838e.jpg | moe 4979 fate/stay_night koyama_hirokazu matou_sakura see_through stick_poster.jpg

The / is invalid so I changed it to the followed and saved the rename.txt:
02bcd4a0fd0ce3c30888a0267e2e838e.jpg | moe 4979 fate_stay_night koyama_hirokazu matou_sakura see_through stick_poster.jpg

If I then press enter, it crashes (I'm not sure if it even throws an error) even though everything should be fine. Now if I make the change directly in the csv and then run the python script it works correctly. Any idea why that happens?

A separate python script to just run off the rename.txt without parsing the csv might also be nice.