def rst_folders(self): self.rst = [] title_dec = pyp_to_rst.rst_section_level_1() if not self.title: self.title = self.name self.rst.extend(title_dec(self.title)) for folder in self.filtered_folders: folder.to_rst() self.rst.append(self.rst_link_one_folder(folder)) return self.rst
def to_rst(self): listout = [] if self.title: title_dec = pyp_to_rst.rst_section_level_1() listout.extend(title_dec(self.title)) if self.toplinks: listout.extend(self.rst_toplinks()) listout.append('') for folder in self.folders: listout.extend(folder.to_rst()) listout.append('') self.rst = listout