See
Ereader2Html Post #53, which is for a Windows PC but should work similarly on a Mac (but Python should already be installed, so skip that step, and "command prompt" is the terminal). Note that this post recommends you put ereader2html.py in the same directory as the .pdb ebook, this isn't the only way to access the command but it is the easiest.