def serialize(self) -> ContentLine: line = ContentLine(self.Meta.name, params=self.extra, value=escape_string('mailto:%s' % self.email)) for output in self.Meta.serializer.get_serializers(): output(self, line) return line
def serialize_cutype(attendee: "Attendee", line: ContentLine): if attendee.cutype: line.params["CUTYPE"] = [escape_string(attendee.cutype)]
def serialize_cn(person: "Person", line: ContentLine): if person.common_name: line.params["CN"] = [escape_string(person.common_name)]
def serialize_role(attendee: "Attendee", line: ContentLine): if attendee.role: line.params["ROLE"] = [escape_string(attendee.role)]
def serialize_partstat(attendee: "Attendee", line: ContentLine): if attendee.partstat: line.params["PARTSTAT"] = [escape_string(attendee.partstat)]
def serialize_dir(person: "Person", line: ContentLine): if person.dir: line.params["DIR"] = [escape_string(person.dir)]
def serialize_sent_by(person: "Person", line: ContentLine): if person.sent_by: line.params["SENT-BY"] = [escape_string(person.sent_by)]
def serialize_summary(todo: "Todo", container: Container): if todo.name: container.append(ContentLine("SUMMARY", value=escape_string(todo.name)))
def serialize_url(todo: "Todo", container: Container): if todo.url: container.append(ContentLine("URL", value=escape_string(todo.url)))
def serialize_location(todo: "Todo", container: Container): if todo.location: container.append( ContentLine("LOCATION", value=escape_string(todo.location)) )
def serialize_description(todo: "Todo", container: Container): if todo.description: container.append( ContentLine("DESCRIPTION", value=escape_string(todo.description)) )
def serialize_subject(alarm, container): container.append( ContentLine("SUMMARY", value=escape_string(alarm.subject or "")))
def serialize_body(alarm, container): container.append( ContentLine("DESCRIPTION", value=escape_string(alarm.body or "")))
def serialize_description(alarm, container): container.append( ContentLine("DESCRIPTION", value=escape_string(alarm.display_text or "")))