2 # replace spaces with underscores, lowercase everything, ditch multiple underscores, and ditch _.foo.
3 # should probably try to avoid overwriting existing files, but c'est la vie!
5 TEMP="$(getopt --longoptions 'anime' -- '' "$@")"
12 while [ $1 != '--' ]; do
27 if [ "$ANIME_CUT" == 0 ]; then
28 rename 's/\s+/\_/g; s/[^\w\d.]/\_/g; s/^_+//g; s/_$//g; $_ = lc($_); s/\_+/\_/g; s/\_\././' "$@"
30 rename 's/\[[^\]]+\]//g; s/^_+//; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././' "$@"