def init_from_str(self, entries):
self.lines = self.parser.parse_text(entries)<EOL>for line in self.lines:<EOL><INDENT>if isinstance(line, DateLine):<EOL><INDENT>current_date = line.date<EOL>self[current_date] = self.default_factory(self, line.date)<EOL><DEDENT>elif isinstance(line, Entry):<EOL><INDENT>if len(self[current_date]) > <NUM_LIT:0>:<EOL><INDENT>line.previous_entry = self[current_date][-<NUM_LIT:1>]<EOL>self[current_date][-<NUM_LIT:1>].next_entry = line<EOL><DEDENT>self[current_date].append(line)<EOL><DEDENT><DEDENT>
Initialize the structured and textual data based on a string
representing the entries. For detailed information about the format of
this string, refer to the
:func:`~taxi.timesheet.parser.parse_text` function.