Script that automatically generates a table of contents in MarsEdit