-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom filename transformations (was: Filename: I want to restrict characters, but permit spaces) #5042
Comments
If you are using a modern GUI tool, why are you restricting characters in the first place? |
Because I want readable file names. The code of modern GUI programs may be 8-bit smart, but I want to be able to read filenames. And, as long as the only issue is spaces, most of what I want to do from the command line works -- bash escapes spaces. Just as long as it's either a real program, or a well-written script (and I've gotten quite good with the whole "$var" syntax all over everything ... yuck, why wasn't this in the shell design from day one?) |
Can you elaborate on why filenames would get more readable when you pass in
As it stands, this issue is lacking context, and without context, we usually close issues. So please do provide a more detailed example of why you'd wanna restrict filenames in the first place. |
Here is a directory listing keybounceMBP:Etho michael$ ls Modded minecraft episodes 13-15 were downloaded with youtube-dl, as 480p (thank you for decoding the dash data and fetching it); the rest were from a firefox extension ("Download YouTube Videos as MP4") that fetches the 360p feed. The name change is significant, and breaks programs like mplayer that auto-play the next one, or even the sorting of files in Finder or the command line. |
Other similar ideas:
In my opinion 2. is still a valid request even in 2017. Quite a few emojis are not in the basic multilingual plane (BMP) of Unicode. In other words, applications should support at least UCS-4 (UTF-32) to handle them correctly. Besides Android, Konsole/QTerminal don't work well, either. They use Qt's QString, which are UCS-2 internally. Update: iTerm2 goes crazy with some emojis, too 😆 |
On some videos I'm downloading, I encounter emojis (example), or UTF-8 accents (example). Because of these characters, I'm encountering the following issues:
So, I searched a bit and found the I suggest adding a |
Any update on this issue? |
Files are not downloaded if there is a # in the filename. Could it be possible to have an option just to restrict illegal characters ? |
Chipping in to also say that I'd love to see this feature to strip down emojis or add filters to output file names. Sometimes clips being downloaded have emojis in their titles and it tends to cause weird issues with other software, such as not detecting the file or crashing. |
How is this issue solvable? |
to strip most emojis from the final filename, add this --exec switch (it's one single line):
this was tested on the penguinean operating system. Credits: extra:
|
P.S.
the It's a simple substitution that can be done with tools like |
I appreciate the comprehensive scripts nestukh. Can this be easily replicated on Windows too, as in just replacing the appropriate syntaxes from the original script? |
Probably yes, also you will need no changes under WSL (GNU/Linux subsystem for Windows 10), MSYS2, Cygwin or others minimal GNU/Linux layer implementations on Windows. |
Right now, restricting filenames to reasonable characters also prevents spaces.
Yea, I know, most unix scripts/etc. can't handle spaces, but most modern GUI tools can.
The text was updated successfully, but these errors were encountered: