- # def ledger_as_html(self, db):
- # lines = []
- # line_sep = '<br />'
- # for comment in db.comments:
- # line = f' ; {comment}' if comment != '' else ''
- # lines += [line + line_sep]
- # for booking in db.bookings:
- # i = booking.start_line
- # suffix = lines[i]
- # lines[i] = f'<p>{booking.date_string} {booking.description}{suffix}'
- # for booking_line in booking.lines[1:]:
- # i += 1
- # if booking_line == '':
- # continue
- # suffix = f' {lines[i]}' if len(lines[i]) > 0 else ''
- # value = f' {booking_line[1]} {booking_line[2]}' if booking_line[1] else ''
- # lines[i] = f'{booking_line[0]}{value}{suffix}'
- # lines[i] = lines[i][:-len(line_sep)] + f"""</p>
-# edit :
-# <a h ref="/add_structured?start={booking.start_line}&end={i+1}">structured</a>
-# / <a href="/add_free?start={booking.start_line}&end={i+1}">free</a>
-# | co py:
-# <a h ref="/copy_structured?start={booking.start_line}&end={i+1}">structured</a>
-# / <a href="/copy_free?start={booking.start_line}&end={i+1}">free</a>
-# <br />"""
-# return '\n'.join(lines)
-