Please add a switch to trim filename to specific character count
See original GitHub issueChecklist
- I’m reporting a feature request
- I’ve verified that I’m running youtube-dl version 2021.03.14
- I’ve searched the bugtracker for similar feature requests including closed ones
Description
WRITE DESCRIPTION HERE If you try to download a file that’s over 250 characters, the download will fail, so can you please add a switch that would trim the file name (excluding the extension) to a specific amount of characters to prevent this from happening? E.g., --trim-filename 7 to trim, e.g., this is the original filename.mp4 to this is.mp4 Certain forks have already done this (https://github.com/blackjack4494/youtube-dlc/issues/85), so maybe it can even be carried over, but it would mean a loooot.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Remove characters from specific length - Stack Overflow
I have tried sed -r command on Linux servers but it's not working on AIX servers. Linux command: sed -r 's/.(.{3}).*/\1/' filename.txt.
Read more >Remove Data Before or After a Specific Character in Excel
Your browser can't play this video. Learn more. Switch camera.
Read more >How to rename multiple files in Windows - YouTube
Switch camera. Share. Include playlist. An error occurred while retrieving sharing information. Please try again later. 0:00. 0:00 / 14:10•
Read more >Handy one-liners for SED
N; s/\n/ /' # count lines (emulates "wc -l") sed -n '$=' TEXT CONVERSION AND ... of file # delete BOTH leading and...
Read more >Get-ChildItem : The specified path, file name, or both are too ...
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://docs.python.org/3/library/stdtypes.html#old-string-formatting explains the dot as
I tested it in an IPython console:
So yeah, the
.7s
means the incoming value fortitle
is converted into string max 7 chars long.@garoto Thank you so so so much! I’ve always wanted this, but didn’t realize it was there all along.