docs: def entry_line_to_text(self, entry):
          """
          Return the textual representation of an :class:`~taxi.timesheet.lines.Entry` instance. This method is a bit
          convoluted since we don't want to completely mess up the original formatting of the entry.
          """
          line = []
  
          # The entry is new, it didn't come from an existing line, so let's just return a simple text representation of
          # it
          if not entry._text:
              flags_text = self.flags_to_text(entry.flags)
              duration_text = self.duration_to_text(entry.duration)
  
              return ''.join(
                  (flags_text, ' ' if flags_text else '', entry.alias, ' ', duration_text, ' ', entry.description)
              )
  
          for i, text in enumerate(entry._text):
              # If this field is mapped to an attribute, check if it has changed
              # and, if so, regenerate its text. The only fields that are not
              # mapped to attributes are spacing fields
              if i in self.ENTRY_ATTRS_POSITION:
                  if self.ENTRY_ATTRS_POSITION[i] in entry._changed_attrs:
                      attr_name = self.ENTRY_ATTRS_POSITION[i]
                      attr_value = getattr(entry, self.ENTRY_ATTRS_POSITION[i])
  
                      # Some attributes need to be transformed to their textual representation, such as flags or duration
                      if attr_name in self.ENTRY_ATTRS_TRANSFORMERS:
                          attr_value = getattr(self, self.ENTRY_ATTRS_TRANSFORMERS[attr_name])(attr_value)
                  else:
                      attr_value = text
  
                  line.append(attr_value)
              else:
                  # If the length of the field has changed, do whatever we can to keep the current formatting (ie. number
                  # of whitespaces)
                  if len(line[i-1]) != len(entry._text[i-1]):
                      text = ' ' * max(1, (len(text) - (len(line[i-1]) - len(entry._text[i-1]))))
  
                  line.append(text)
  
          return ''.join(line).strip()