"""Share card renderer.""" from __future__ import annotations from html import escape from src.models.schema import DiaryEntry, PersonaEnvelope from src.renderer.html_templates import CARD_WRAPPER_CLASS def render_share_card(persona: PersonaEnvelope, diary: DiaryEntry) -> str: p = persona.persona tags = "".join(f"{escape(tag)}" for tag in p.tags) return f"""
Objectverse Diary 万物日记

{escape(p.character_name)}

OBJECT FILE

{escape(p.object_name)} · {escape(p.mood)}

{escape(diary.english)}

{escape(diary.chinese)}

{tags}
"""