Open Office has an automatic table of contents maker. However, you have to have set up your text in a certain way for it to recognize your headings, which I didn’t do. It’d be quite a bit of work to go back and adjust my headings.
So instead I went through and just wrote down all the headings I wanted in the table, and the page numbers there were on, and made a lovingly handcrafted table of contents. I even managed to get it to fit on one page, which might have been difficult if using an automatic template.
All that’s left is the index and back cover text.