docs: def main():
      """This is the mainline.
  
      It first invokes the pipermail archiver to add the message to the archive,
      then calls the function above to do whatever with the archived message
      after it's URL and path are known.
      """
  
      listname = sys.argv[2]
      hostname = sys.argv[1]
  
      # We must get the list unlocked here because it is already locked in
      # ArchRunner. This is safe because we aren't actually changing our list
      # object. ArchRunner's lock plus pipermail's archive lock will prevent
      # any race conditions.
      mlist = MailList.MailList(listname, lock=False)
  
      # We need a seekable file for processUnixMailbox()
      f = StringIO(sys.stdin.read())
  
      # If we don't need a Message.Message instance, we can skip the next and
      # the imports of email and Message above.
      msg = email.message_from_file(f, Message.Message)
  
      h = HyperArch.HyperArchive(mlist)
      # Get the message number for the next message
      sequence = h.sequence
      # and add the message.
      h.processUnixMailbox(f)
      f.close()
  
      # Get the archive name, etc.
      archive = h.archive
      msgno = '%06d' % sequence
      filename = msgno + '.html'
      filepath = os.path.join(h.basedir, archive, filename)
      h.close()
  
      url = '%s%s/%s' % (mlist.GetBaseArchiveURL(), archive, filename)
  
      ext_process(listname, hostname, url, filepath, msg)