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!
4 set - $(getopt -u --longoptions 'anime' -- '' "$@")
10 while [ $1 != '--' ]; do
25 if [ "$ANIME_CUT" == 0 ]; then
26 rename 's/\s+/\_/g; $_ = lc($_); s/\_+/\_/g; s/\_\././' "$@"
28 rename 's/\[[^\]]+\]//g; s/^_+//; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././' "$@"