(self)
return os.path.join(*slug.split("."))
Sluggified path for filenames

        Slugs to a filename using the follow steps

        * Decode unicode to approximate ascii
        * Remove existing hypens
        * Substitute hyphens for non-word characters
        * Break up the string as paths
Sluggified path for filenames
Sluggified path for filenames
def pathname(self):
        """Sluggified path for filenames

        Slugs to a filename using the follow steps

        * Decode unicode to approximate ascii
        * Remove existing hypens
        * Substitute hyphens for non-word characters
        * Break up the string as paths
        """
        slug = self.name
        try:
            slug = self.name.split("(")[0]
        except IndexError:
            pass
        slug = unidecode.unidecode(slug)
        slug = slug.replace("-", "")
        slug = re.sub(r"[^\w\.]+", "-", slug).strip("-")
        return os.path.join(*slug.split("."))
def pathname ( self ) : slug = self . name try : slug = self . name . split ( "(" ) [ 0 ] except IndexError : pass slug = unidecode . unidecode ( slug ) slug = slug . replace ( "-" , "" ) slug = re . sub ( r"[^\w\.]+" , "-" , slug ) . strip ( "-" ) return os . path . join ( * slug . split ( "." ) )