update emojis

This commit is contained in:
2025-03-24 10:04:11 -05:00
parent 0f7bda0942
commit 1846dc1065
4 changed files with 76 additions and 59 deletions

46
docs/scripts/utils.py Normal file
View File

@@ -0,0 +1,46 @@
import numpy as np
from jinja2 import Environment, FileSystemLoader, select_autoescape
emojis = np.array([
"🍎", "🍏", "🍊", "🍋", "🍌", "🍉", "🍇", "🍓", "🍒", "🍑",
"🥭", "🍍", "🥥", "🥝", "🍅", "🍆", "🥑", "🥕", "🌽", "🥔",
"🍠", "🥐", "🥖", "🥨", "🥯", "🥞", "🧀", "🍖", "🍗", "🥚",
"🍔", "🍟", "🍕", "🌭", "🥪", "🌮", "🌯", "🍣", "🍤", "🍙",
"🍚", "🍜", "🍲", "🍛", "🍱", "🥟", "🍦", "🍧", "🍨", "🍩",
"🍪", "🎂", "🍰", "🧁", "🍫", "🍬", "🍭", "🍮", "", "🍵",
"🥤", "🧃", "🍷", "🍸", "🍹", "🍺", "🥂", "🥃", "🐶", "🐱",
"🐭", "🐹", "🐰", "🦊", "🐻", "🐼", "🐨", "🐯", "🦁", "🐮",
"🐷", "🐽", "🐴", "🦄", "🦓", "🦒", "🐘", "🦏", "🐪", "🐫",
"🐑", "🐐", "🐓", "🐔", "🐣", "🐤", "🐦", "🦅", "🦇", "🦉",
"🐺", "🐍", "🐢", "🦎", "🐙", "🦑", "🦐", "🦀", "🐡", "🐠",
"🐟", "🐬", "🐳", "🦈", "🐊", "🐅", "🐆", "🐾", "🦋", "🐞",
"🐝", "🐜", "🕷️", "🕸️", "🌸", "🌹", "🌺", "🌻", "🌼", "🌷",
"🌱", "🌲", "🌳", "🌴", "🌵", "🌾", "🌿", "🍀", "🍁", "🍂",
"🍃", "", "🌟", "", "⚡️", "☄️", "☀️", "🌤️", "", "🌥️",
"☁️", "🌦️", "🌧️", "⛈️", "🌩️", "❄️", "🌬️", "💨", "🌈", "",
"💧", "🌊", "🔥", "💥", "", "🌋", "⛰️", "🏔️", "🏕️", "🏖️",
"🏜️", "🏝️", "🏞️", "🏟️", "🏠", "🏡", "🏢", "🏣", "🏤", "🏥",
"🏦", "🏨", "🏩", "🏪", "🏫", "🏬", "🏭", "🏯", "🏰", "",
"⛩️", "🕌", "🕍", "🗿", "🎡", "🎢", "🎠", "🎪", "🎨", "🎬",
"🎤", "🎧", "🎼", "🎹", "🎺", "🎸", "🥁", "🎻", "🎮", "🎲"
])
def render_markdown_template(template_path, output_path, context: dict):
template_dir = template_path.parent
template_file = template_path.name
env = Environment(
loader=FileSystemLoader(template_dir),
autoescape=select_autoescape(['html', 'xml']),
trim_blocks=True,
lstrip_blocks=True
)
template = env.get_template(template_file)
rendered = template.render(**context)
with open(output_path, 'w') as f:
f.write(rendered)
print(f"Template rendered to {output_path}")