def editPost(self, postid, username, password, struct, publish):
     """See IMetaWeblogAPI.
     """
     struct = CaselessDict(struct)
     entry = IUIDManager(self.context).getByUID(postid)
     entry = IWeblogEntry(entry)
     body  = struct.get('description')
     excerpt, text = self.extractExcerptFromBody(body)
     title = struct.get('title')
     topics = struct.get('categories')
     entry.edit(title, excerpt, text, topics)
     if publish:
         IWorkflowedWeblogEntry(entry).publish()
     return True