module_path = file_name.split('.')[:-1]
if dirs:
write_toc(fh, module_path, dirs)
for file in files:
module_name = file.split('.')[0]
write_module_title(fh, module_name)
module_path = file_name.split('.')[:-1]
if dirs:
write_toc(fh, module_path, dirs)
for file in files:
module_name = file.split('.')[0]
write_module_title(fh, module_name)