create a table of contents markdown file from a plain text file