pytr
pytr copied to clipboard
Filenames - Windows compatible
Description of the bug I have been using pytr for a few days. I load the PDF's into a folder that is shared via SMB. Unfortunately I can't open some files under Windows, because they are named with characters that Windows doesn't support.
To Reproduce Steps to reproduce the behavior:
- Run the command
pytr dl_docs <smb_dir>
- Open the SMB Share
- Try to open a file
Expected behavior The files should be saved Windows compliant.
Error log N/A
Environment
- OS: RaspberryPiOS armv7
- pytr version: 0.0.15
Additional context I access the SMB share with multiple Windows 10 (21H2) devices.
pytr uses pathvalidate to sanitize the file path. It is currently set to auto, which means that the validation depends on the platform pytr is running on. I will make an option to use universal filepaths. The Windows/Universal characterset is pretty limited that's why I don't want to enforce it on Linux/MacOS users
If there was a parameter, that would be great. So everyone could decide for himself what to use.