i actually cleaning up my system. And as usual i am trying to do it the python way, so i am cleaning up duplicates in my Music library. And now i am trying to find a pattern for re module to escape all whitespace and special characters. But unfortunately i was unable to find something useable. This is some snipped of the duplicates list i generated with linux cli tool called "fdupes" :
./D/dominik eulberg/01 bionik/01 bionik (guy gerber remi.m4p
./D/dominik eulberg/05 dominik eulberg/01 bionik/01 bionik (guy gerber remi.m4p
./N/Nightmares On Wax/Smokers Delight/05 - Stars.mp3
./N/Nightmares On Wax/Smokers Delight/NOW - smokers delight_04.MP3
./N/Nightmares On Wax/Smokers Delight/13 - What I'm Feelin (Good).mp3
./N/Nightmares On Wax/Smokers Delight/NOW - smokers delight_13.MP3
./N/Nightmares On Wax/Smokers Delight/16 - Gambia Via Vagatorbeach.mp3
./N/Nightmares On Wax/Smokers Delight/NOW - smokers delight_16.MP3
./S/Stupidozid/Morast_Beatz/12. Morast Beatz - RAF - von TeeK.mp3
./S/stupidozid_12/Morast_Beatz-Startproblem_und_Endloesung_2012/12. Morast Beatz - RAF - von TeeK.mp3
./S/Slackers/Folder.jpg
./S/Slackers/AlbumArt_{4CC84D50-8EED-415A-9ED3-7144D9AE90F2}_Large.jpg
./S/Slackers/AlbumArtSmall.jpg
./S/Slackers/AlbumArt_{4CC84D50-8EED-415A-9ED3-7144D9AE90F2}_Small.jpg
./L/Led Zeppelin - Discography/Led Zeppelin - Led Zeppelin III/AlbumArt_{C9AAD432-BF70-4AFB-97C6-14734CD290B8}_Large.jpg
./L/Led Zeppelin - Discography/Led Zeppelin - Led Zeppelin III/Folder.jpg
Use the pipes.quote
function. In Python 3 this function was renamed to shlex.quote
. These functions quote a string so that it can safely be used as part of a shell command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With