def _read_from_folder(self, dirname):
templates = _par_read(dirname=dirname, compressed=False)<EOL>t_files = glob.glob(dirname + os.sep + '<STR_LIT>')<EOL>tribe_cat_file = glob.glob(os.path.join(dirname, "<STR_LIT>"))<EOL>if len(tribe_cat_file) != <NUM_LIT:0>:<EOL><INDENT>tribe_cat = read_events(tribe_cat_file[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>tribe_cat = Catalog()<EOL><DEDENT>previous_template_names = [t.name for t in self.templates]<EOL>for template in templates:<EOL><INDENT>if template.name in previous_template_names:<EOL><INDENT>continue<EOL><DEDENT>for event in tribe_cat:<EOL><INDENT>for comment in event.comments:<EOL><INDENT>if comment.text == '<STR_LIT>' + template.name:<EOL><INDENT>template.event = event<EOL><DEDENT><DEDENT><DEDENT>t_file = [t for t in t_files<EOL>if t.split(os.sep)[-<NUM_LIT:1>] == template.name + '<STR_LIT>']<EOL>if len(t_file) == <NUM_LIT:0>:<EOL><INDENT>print('<STR_LIT>' + template.name)<EOL>templates.remove(template)<EOL>continue<EOL><DEDENT>elif len(t_file) > <NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>' + t_file[<NUM_LIT:0>])<EOL><DEDENT>template.st = read(t_file[<NUM_LIT:0>])<EOL><DEDENT>self.templates.extend(templates)<EOL>return<EOL>
Internal folder reader.

:type dirname: str
:param dirname: Folder to read from.