(self,string,hashcount=11,ignoreext = True)
Creates our Robohasher
        Takes in the string to make a Robohash out of.
Creates our Robohasher
        Takes in the string to make a Robohash out of.
Creates our Robohasher Takes in the string to make a Robohash out of .
def __init__(self,string,hashcount=11,ignoreext = True):
        """
        Creates our Robohasher
        Takes in the string to make a Robohash out of.
        """

        # Optionally remove an images extension before hashing.
        if ignoreext is True:
            string = self._remove_exts(string)

        string = string.encode('utf-8')

        hash = hashlib.sha512()
        hash.update(string)
        self.hexdigest = hash.hexdigest()
        self.hasharray = []
        #Start this at 4, so earlier is reserved
        #0 = Color
        #1 = Set
        #2 = bgset
        #3 = BG
        self.iter = 4
        self._create_hashes(hashcount)

        self.resourcedir = os.path.dirname(__file__) + '/'
        # Get the list of backgrounds and RobotSets
        self.sets = self._listdirs(self.resourcedir + 'sets')
        self.bgsets = self._listdirs(self.resourcedir + 'backgrounds')

        # Get the colors in set1
        self.colors = self._listdirs(self.resourcedir + 'sets/set1')
        self.format = 'png'
def __init__ ( self , string , hashcount = 11 , ignoreext = True ) : # Optionally remove an images extension before hashing. if ignoreext is True : string = self . _remove_exts ( string ) string = string . encode ( 'utf-8' ) hash = hashlib . sha512 ( ) hash . update ( string ) self . hexdigest = hash . hexdigest ( ) self . hasharray = [ ] #Start this at 4, so earlier is reserved #0 = Color #1 = Set #2 = bgset #3 = BG self . iter = 4 self . _create_hashes ( hashcount ) self . resourcedir = os . path . dirname ( __file__ ) + '/' # Get the list of backgrounds and RobotSets self . sets = self . _listdirs ( self . resourcedir + 'sets' ) self . bgsets = self . _listdirs ( self . resourcedir + 'backgrounds' ) # Get the colors in set1 self . colors = self . _listdirs ( self . resourcedir + 'sets/set1' ) self . format = 'png'