code: def get_type(self):
          
          _, ext = zip_path.splitext(self.get_name())
          ext = ext.lower()
  
          for uid, ext_list in six.iteritems(ebooklib.EXTENSIONS):
              if ext in ext_list:
                  return uid
  
          return ebooklib.ITEM_UNKNOWN
docs: Guess type according to the file extension. Might not be the best way how to do it, but it works for now.
  
          Items can be of type:
            - ITEM_UNKNOWN = 0
            - ITEM_IMAGE = 1
            - ITEM_STYLE = 2
            - ITEM_SCRIPT = 3
            - ITEM_NAVIGATION = 4
            - ITEM_VECTOR = 5
            - ITEM_FONT = 6
            - ITEM_VIDEO = 7
            - ITEM_AUDIO = 8
            - ITEM_DOCUMENT = 9
            - ITEM_COVER = 10
  
          We map type according to the extensions which are defined in ebooklib.EXTENSIONS.
  
          :Returns:
            Returns type of the item as number.