code: def add_libravatar (generator, metadata):
      
      missing = generator.settings.get ('LIBRAVATAR_MISSING')
      size = generator.settings.get ('LIBRAVATAR_SIZE')
  
      ## Check the presence of the Email header
      if 'email' not in metadata.keys ():
          try:
              metadata ['email'] = generator.settings.get ('AUTHOR_EMAIL')
          except:
              pass
  
      ## Add the Libravatar URL
      if metadata ['email']:
  
          ## Compose URL using the MD5 hash
          ## (the ascii encoding is necessary for Python3)
          email = metadata ['email'].lower ().encode ('ascii')
          md5 = hashlib.md5 (email).hexdigest ()
          url = 'http://cdn.libravatar.org/avatar/' + md5
  
          ## Add eventual "missing picture" option
          if missing or size:
              url = url + '?'
              if missing:
                  url = url + 'd=' + missing
                  if size:
                      url = url + '&'
              if size:
                  url = url + 's=' + str (size)
  
          ## Add URL to the article's metadata
          metadata ['author_libravatar'] = url
docs: Article generator connector for the Libravatar plugin