python table of contents generator