X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/61d7dd11d4a450a64f2817ee4db0ec7fa5880b42..b9e4a0c3af29391c27e9a020693541b9a86c4d14:/bin/old/ninja2avi?ds=inline diff --git a/bin/old/ninja2avi b/bin/old/ninja2avi index cf7e0ed..6cd4c9e 100755 --- a/bin/old/ninja2avi +++ b/bin/old/ninja2avi @@ -6,35 +6,33 @@ # It will change all files with a divx extension. ## -while(<*.divx>){ +while(<*.divx>){ $old=$_; - # remove the Series name at beginning - s/.*(\dx\d{2}.*)/\1/; - - # remove (HD xxxp/i) on HD Series - s/\+%28HD\+\d+[pi]%29//; - - # remove the + if at beginning of line else replace with space + # remove the Series name at beginning + s/.*(\dx\d{2}.*)/\1/; + + # remove (HD xxxp/i) on HD Series + s/\+%28HD\+\d+[pi]%29//; + + # remove the + if at beginning of line else replace with space s/^\+//; s/\+{1,2}/ /g; - + # Change URL encodings s/%26/&/gi; - s/%2C/,/gi; - s/%3F/?/gi; - s/%3A/ -/gi; - s/%27/\'/gi; - s/%28/\(/gi; - s/%29/\)/gi; - s/%3D/=/gi; - s/%21/!/gi; - - # remove any duplicate spaces - s/ {2,}/ /; - - # change to avi - s/divx$/avi/; - + s/%2C/,/gi; + s/%3F/?/gi; + s/%3A/ -/gi; + s/%27/\'/gi; + s/%28/\(/gi; + s/%29/\)/gi; + s/%3D/=/gi; + s/%21/!/gi; + + # change to avi + s/divx$/avi/; + rename $old ,"$_"; } +