Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import io
|
2 |
+
import re
|
3 |
+
import streamlit as st
|
4 |
+
import glob
|
5 |
+
import os
|
6 |
+
from PIL import Image
|
7 |
+
import fitz
|
8 |
+
from reportlab.lib.pagesizes import A4
|
9 |
+
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
|
10 |
+
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
11 |
+
from reportlab.lib import colors
|
12 |
+
from reportlab.pdfbase import pdfmetrics
|
13 |
+
from reportlab.pdfbase.ttfonts import TTFont
|
14 |
+
import unicodedata
|
15 |
+
|
16 |
+
st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
|
17 |
+
|
18 |
+
def create_pdf_tab(default_markdown):
|
19 |
+
font_files = glob.glob("*.ttf")
|
20 |
+
if not font_files:
|
21 |
+
st.error("No .ttf font files found in the current directory. Please add some, e.g., NotoColorEmoji-Regular.ttf and DejaVuSans.ttf.")
|
22 |
+
return
|
23 |
+
available_fonts = {os.path.splitext(os.path.basename(f))[0]: f for f in font_files}
|
24 |
+
|
25 |
+
md_files = [f for f in glob.glob("*.md") if os.path.basename(f) != "README.md"]
|
26 |
+
md_options = [os.path.splitext(os.path.basename(f))[0] for f in md_files]
|
27 |
+
|
28 |
+
with st.sidebar:
|
29 |
+
selected_md = st.selectbox("Select Markdown File", options=md_options, index=0 if md_options else -1)
|
30 |
+
selected_font_name = st.selectbox("Select Emoji Font", options=list(available_fonts.keys()), index=0 if "NotoColorEmoji-Regular" in available_fonts else 0)
|
31 |
+
selected_font_path = available_fonts[selected_font_name]
|
32 |
+
base_font_size = st.slider("Font Size (points)", min_value=6, max_value=16, value=9, step=1)
|
33 |
+
plain_text_mode = st.checkbox("Render as Plain Text (Preserve Bold Only)", value=False)
|
34 |
+
auto_bold_numbers = st.checkbox("Auto-Bold Numbered Lines", value=False)
|
35 |
+
num_columns = st.selectbox("Number of Columns", options=[1, 2, 3, 4, 5, 6], index=3)
|
36 |
+
|
37 |
+
if 'markdown_content' not in st.session_state or not md_options:
|
38 |
+
st.session_state.markdown_content = default_markdown
|
39 |
+
|
40 |
+
if md_options and selected_md:
|
41 |
+
with open(f"{selected_md}.md", "r", encoding="utf-8") as f:
|
42 |
+
st.session_state.markdown_content = f.read()
|
43 |
+
|
44 |
+
edited_markdown = st.text_area("Modify the markdown content below:", value=st.session_state.markdown_content, height=300, key=f"markdown_{selected_md}_{selected_font_name}_{num_columns}")
|
45 |
+
if st.button("Update PDF"):
|
46 |
+
st.session_state.markdown_content = edited_markdown
|
47 |
+
with open(f"{selected_md}.md", "w", encoding="utf-8") as f:
|
48 |
+
f.write(edited_markdown)
|
49 |
+
st.rerun()
|
50 |
+
|
51 |
+
st.download_button(label="Save Markdown", data=st.session_state.markdown_content, file_name=f"{selected_md}.md", mime="text/markdown")
|
52 |
+
|
53 |
+
if not md_options:
|
54 |
+
st.warning("No .md files found in the directory (excluding README.md). Using default content.")
|
55 |
+
return
|
56 |
+
|
57 |
+
try:
|
58 |
+
pdfmetrics.registerFont(TTFont(selected_font_name, selected_font_path))
|
59 |
+
pdfmetrics.registerFont(TTFont("DejaVuSans", "DejaVuSans.ttf"))
|
60 |
+
except Exception as e:
|
61 |
+
st.error(f"Failed to register fonts: {e}. Ensure both {selected_font_name}.ttf and DejaVuSans.ttf are in the directory.")
|
62 |
+
return
|
63 |
+
|
64 |
+
def apply_emoji_font(text, emoji_font):
|
65 |
+
emoji_pattern = re.compile(
|
66 |
+
r"([\U0001F300-\U0001F5FF"
|
67 |
+
r"\U0001F600-\U0001F64F"
|
68 |
+
r"\U0001F680-\U0001F6FF"
|
69 |
+
r"\U0001F700-\U0001F77F"
|
70 |
+
r"\U0001F780-\U0001F7FF"
|
71 |
+
r"\U0001F800-\U0001F8FF"
|
72 |
+
r"\U0001F900-\U0001F9FF"
|
73 |
+
r"\U0001FA00-\U0001FA6F"
|
74 |
+
r"\U0001FA70-\U0001FAFF"
|
75 |
+
r"\u2600-\u26FF"
|
76 |
+
r"\u2700-\u27BF]+)"
|
77 |
+
)
|
78 |
+
|
79 |
+
def replace_emoji(match):
|
80 |
+
emoji = match.group(1)
|
81 |
+
emoji = unicodedata.normalize('NFC', emoji)
|
82 |
+
return f'<font face="{emoji_font}">{emoji}</font>'
|
83 |
+
|
84 |
+
segments = []
|
85 |
+
last_pos = 0
|
86 |
+
for match in emoji_pattern.finditer(text):
|
87 |
+
start, end = match.span()
|
88 |
+
if last_pos < start:
|
89 |
+
segments.append(f'<font face="DejaVuSans">{text[last_pos:start]}</font>')
|
90 |
+
segments.append(replace_emoji(match))
|
91 |
+
last_pos = end
|
92 |
+
if last_pos < len(text):
|
93 |
+
segments.append(f'<font face="DejaVuSans">{text[last_pos:]}</font>')
|
94 |
+
return ''.join(segments)
|
95 |
+
|
96 |
+
def markdown_to_pdf_content(markdown_text, plain_text_mode, auto_bold_numbers):
|
97 |
+
lines = markdown_text.strip().split('\n')
|
98 |
+
pdf_content = []
|
99 |
+
number_pattern = re.compile(r'^\d+\.\s')
|
100 |
+
|
101 |
+
if plain_text_mode:
|
102 |
+
for line in lines:
|
103 |
+
line = line.strip()
|
104 |
+
if not line or line.startswith('# '):
|
105 |
+
continue
|
106 |
+
bold_pattern = re.compile(r'\*\*(.*?)\*\*')
|
107 |
+
line = bold_pattern.sub(r'<b>\1</b>', line)
|
108 |
+
pdf_content.append(line)
|
109 |
+
else:
|
110 |
+
for line in lines:
|
111 |
+
line = line.strip()
|
112 |
+
if not line or line.startswith('# '):
|
113 |
+
continue
|
114 |
+
if line.startswith('## ') or line.startswith('### '):
|
115 |
+
text = line.replace('## ', '').replace('### ', '').strip()
|
116 |
+
pdf_content.append(f"<b>{text}</b>")
|
117 |
+
elif auto_bold_numbers and number_pattern.match(line):
|
118 |
+
pdf_content.append(f"<b>{line}</b>")
|
119 |
+
else:
|
120 |
+
pdf_content.append(line.strip())
|
121 |
+
|
122 |
+
total_lines = len(pdf_content)
|
123 |
+
return pdf_content, total_lines
|
124 |
+
|
125 |
+
def create_pdf(markdown_text, base_font_size, plain_text_mode, num_columns, auto_bold_numbers):
|
126 |
+
buffer = io.BytesIO()
|
127 |
+
page_width = A4[0] * 2
|
128 |
+
page_height = A4[1]
|
129 |
+
doc = SimpleDocTemplate(buffer, pagesize=(page_width, page_height), leftMargin=36, rightMargin=36, topMargin=36, bottomMargin=36)
|
130 |
+
styles = getSampleStyleSheet()
|
131 |
+
story = []
|
132 |
+
spacer_height = 10
|
133 |
+
section_spacer_height = 15
|
134 |
+
pdf_content, total_lines = markdown_to_pdf_content(markdown_text, plain_text_mode, auto_bold_numbers)
|
135 |
+
|
136 |
+
item_font_size = base_font_size
|
137 |
+
section_font_size = base_font_size * 1.1
|
138 |
+
|
139 |
+
section_style = ParagraphStyle(
|
140 |
+
'SectionStyle', parent=styles['Heading2'], fontName="DejaVuSans",
|
141 |
+
textColor=colors.darkblue, fontSize=section_font_size, leading=section_font_size * 1.2, spaceAfter=2
|
142 |
+
)
|
143 |
+
item_style = ParagraphStyle(
|
144 |
+
'ItemStyle', parent=styles['Normal'], fontName="DejaVuSans",
|
145 |
+
fontSize=item_font_size, leading=item_font_size * 1.15, spaceAfter=1
|
146 |
+
)
|
147 |
+
|
148 |
+
story.append(Spacer(1, spacer_height))
|
149 |
+
columns = [[] for _ in range(num_columns)]
|
150 |
+
lines_per_column = total_lines / num_columns if num_columns > 0 else total_lines
|
151 |
+
current_line_count = 0
|
152 |
+
current_column = 0
|
153 |
+
|
154 |
+
number_pattern = re.compile(r'^\d+\.\s')
|
155 |
+
for i, item in enumerate(pdf_content):
|
156 |
+
if i > 0 and number_pattern.match(item.replace('<b>', '').replace('</b>', '')):
|
157 |
+
columns[current_column].append(Spacer(1, section_spacer_height))
|
158 |
+
|
159 |
+
if current_line_count >= lines_per_column and current_column < num_columns - 1:
|
160 |
+
current_column += 1
|
161 |
+
current_line_count = 0
|
162 |
+
columns[current_column].append(item)
|
163 |
+
current_line_count += 1
|
164 |
+
|
165 |
+
column_cells = [[] for _ in range(num_columns)]
|
166 |
+
for col_idx, column in enumerate(columns):
|
167 |
+
for item in column:
|
168 |
+
if isinstance(item, Spacer):
|
169 |
+
column_cells[col_idx].append(item)
|
170 |
+
elif isinstance(item, str) and item.startswith('<b>'):
|
171 |
+
text = item.replace('<b>', '').replace('</b>', '')
|
172 |
+
column_cells[col_idx].append(Paragraph(apply_emoji_font(text, selected_font_name), section_style))
|
173 |
+
else:
|
174 |
+
column_cells[col_idx].append(Paragraph(apply_emojiJsfont(item, selected_font_name), item_style))
|
175 |
+
|
176 |
+
max_cells = max(len(cells) for cells in column_cells) if column_cells else 0
|
177 |
+
for cells in column_cells:
|
178 |
+
cells.extend([Paragraph("", item_style)] * (max_cells - len(cells)))
|
179 |
+
|
180 |
+
col_width = (page_width - 72) / num_columns if num_columns > 0 else page_width - 72
|
181 |
+
table_data = list(zip(*column_cells)) if column_cells else [[]]
|
182 |
+
table = Table(table_data, colWidths=[col_width] * num_columns, hAlign='CENTER')
|
183 |
+
table.setStyle(TableStyle([
|
184 |
+
('VALIGN', (0, 0), (-1, -1), 'TOP'), ('ALIGN', (0, 0), (-1, -1), 'LEFT'),
|
185 |
+
('BACKGROUND', (0, 0), (-1, -1), colors.white), ('GRID', (0, 0), (-1, -1), 0, colors.white),
|
186 |
+
('LINEAFTER', (0, 0), (num_columns-1, -1), 0.5, colors.grey),
|
187 |
+
('LEFTPADDING', (0, 0), (-1, -1), 2), ('RIGHTPADDING', (0, 0), (-1, -1), 2),
|
188 |
+
('TOPPADDING', (0, 0), (-1, -1), 1), ('BOTTOMPADDING', (0, 0), (-1, -1), 1),
|
189 |
+
]))
|
190 |
+
|
191 |
+
story.append(table)
|
192 |
+
doc.build(story)
|
193 |
+
buffer.seek(0)
|
194 |
+
return buffer.getvalue()
|
195 |
+
|
196 |
+
def pdf_to_image(pdf_bytes):
|
197 |
+
try:
|
198 |
+
doc = fitz.open(stream=pdf_bytes, filetype="pdf")
|
199 |
+
images = []
|
200 |
+
for page in doc:
|
201 |
+
pix = page.get_pixmap(matrix=fitz.Matrix(2.0, 2.0))
|
202 |
+
img = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)
|
203 |
+
images.append(img)
|
204 |
+
doc.close()
|
205 |
+
return images
|
206 |
+
except Exception as e:
|
207 |
+
st.error(f"Failed to render PDF preview: {e}")
|
208 |
+
return None
|
209 |
+
|
210 |
+
with st.spinner("Generating PDF..."):
|
211 |
+
pdf_bytes = create_pdf(st.session_state.markdown_content, base_font_size, plain_text_mode, num_columns, auto_bold_numbers)
|
212 |
+
|
213 |
+
with st.container():
|
214 |
+
pdf_images = pdf_to_image(pdf_bytes)
|
215 |
+
if pdf_images:
|
216 |
+
for img in pdf_images:
|
217 |
+
st.image(img, use_container_width=True)
|
218 |
+
else:
|
219 |
+
st.info("Download the PDF to view it locally.")
|
220 |
+
|
221 |
+
with st.sidebar:
|
222 |
+
st.download_button(label="Download PDF", data=pdf_bytes, file_name="deities_guide.pdf", mime="application/pdf")
|
223 |
+
|
224 |
+
default_markdown = """# Deities Guide: Mythology and Moral Lessons ๐โจ
|
225 |
+
|
226 |
+
1. ๐ **Introduction**
|
227 |
+
- **Purpose**: Explore deities, spirits, saints, and beings with their epic stories and morals! ๐๐
|
228 |
+
- **Usage**: A guide for learning and storytelling across traditions. ๐ญโ๏ธ
|
229 |
+
- **Themes**: Justice โ๏ธ, faith ๐, hubris ๐ค, redemption ๐, cosmic order ๐.
|
230 |
+
|
231 |
+
2. ๐ ๏ธ **Core Concepts of Divinity**
|
232 |
+
- **Powers**: Creation ๐, omniscience ๐๏ธโ๐จ๏ธ, shapeshifting ๐ฆ across entities.
|
233 |
+
- **Life Cycle**: Mortality ๐, immortality โจ, transitions like saints and avatars ๐.
|
234 |
+
- **Communication**: Omens ๐ฉ๏ธ, visions ๐๏ธ, miracles โจ from gods and spirits.
|
235 |
+
|
236 |
+
3. โก **Standard Abilities**
|
237 |
+
- **Creation**: Gods and spirits shape worlds, e.g., Allah ๐ and Vishnu ๐.
|
238 |
+
- **Influence**: Saints and prophets intercede, like Muhammad ๐ and Paul โ๏ธ.
|
239 |
+
- **Transformation**: Angels and avatars shift forms, e.g., Gabriel ๐ and Krishna ๐ฆ.
|
240 |
+
- **Knowledge**: Foresight ๐ฎ or revelation ๐, as with the Holy Spirit ๐๏ธ and Brahma ๐ง .
|
241 |
+
- **Judgment**: Divine authority ๐, e.g., Yahweh โ๏ธ and Yama ๐.
|
242 |
+
|
243 |
+
4. โณ **Mortality and Immortality**
|
244 |
+
- **Gods**: Eternal โฐ, like Allah ๐ and Shiva ๐๏ธ.
|
245 |
+
- **Spirits**: Realm-bound ๐ , e.g., jinn ๐ฅ and devas โจ.
|
246 |
+
- **Saints/Prophets**: Mortal to divine ๐โก๏ธ๐, e.g., Moses ๐ and Rama ๐น.
|
247 |
+
- **Beings**: Limbo states โ, like cherubim ๐ and rakshasas ๐น.
|
248 |
+
- **Lessons**: Faith ๐ and duty โ๏ธ define transitions.
|
249 |
+
|
250 |
+
5. ๐ **Ascension and Signs**
|
251 |
+
- **Paths**: Birth ๐ถ, deeds ๐ก๏ธ, revelation ๐, as with Jesus โ๏ธ and Arjuna ๐น.
|
252 |
+
- **Signs**: Miracles โจ and prophecies ๐ฎ, like those in the Quran ๐ and Gita ๐.
|
253 |
+
- **Morals**: Obedience ๐ง and devotion โค๏ธ shape destiny ๐.
|
254 |
+
|
255 |
+
6. ๐ฒ **Storytelling and Games**
|
256 |
+
- **Portrayal**: Gods, spirits, and saints in narratives or RPGs ๐ฎ๐.
|
257 |
+
- **Dynamics**: Clerics โช, imams ๐, and sadhus ๐ง serve higher powers.
|
258 |
+
- **Balance**: Power ๐ช vs. personality ๐ for depth.
|
259 |
+
|
260 |
+
7. ๐ฎ **Dungeon Mastering Beings**
|
261 |
+
- **Gods**: Epic scope ๐, e.g., Allah โจ and Vishnu ๐.
|
262 |
+
- **Spirits**: Local influence ๐๏ธ, like jinn ๐ฅ and apsaras ๐.
|
263 |
+
- **Saints**: Moral anchors โ, e.g., St. Francis ๐พ and Ali โ๏ธ.
|
264 |
+
|
265 |
+
8. ๐ **Devotee Relationships**
|
266 |
+
- **Clerics**: Serve gods, e.g., Krishnaโs priests ๐ฆ.
|
267 |
+
- **Mediums**: Channel spirits, like jinn whisperers ๐ฅ๐๏ธ.
|
268 |
+
- **Faithful**: Venerate saints and prophets, e.g., Fatimaโs followers ๐น.
|
269 |
+
|
270 |
+
9. ๐ฆ
**American Indian Traditions**
|
271 |
+
- **Coyote, Raven, White Buffalo Woman**: Trickster kin ๐ฆ๐ฆ and wise mother ๐.
|
272 |
+
- **Relation**: Siblings and guide teach balance โ๏ธ.
|
273 |
+
- **Lesson**: Chaos ๐ช๏ธ breeds wisdom ๐ง .
|
274 |
+
|
275 |
+
10. โ๏ธ **Arthurian Legends**
|
276 |
+
- **Merlin, Morgan le Fay, Arthur**: Mentor ๐ง, rival ๐งโโ๏ธ, son ๐.
|
277 |
+
- **Relation**: Family tests loyalty ๐ค.
|
278 |
+
- **Lesson**: Honor ๐ก๏ธ vs. betrayal ๐ก๏ธ.
|
279 |
+
|
280 |
+
11. ๐๏ธ **Babylonian Mythology**
|
281 |
+
- **Marduk, Tiamat, Ishtar**: Son โ๏ธ, mother ๐, lover โค๏ธ.
|
282 |
+
- **Relation**: Kinship drives order ๐ฐ.
|
283 |
+
- **Lesson**: Power ๐ช reshapes chaos ๐ช๏ธ.
|
284 |
+
|
285 |
+
12. โ๏ธ **Christian Trinity**
|
286 |
+
- **God (Yahweh), Jesus, Holy Spirit**: Father ๐, Son โ๏ธ, Spirit ๐๏ธ.
|
287 |
+
- **Relation**: Divine family redeems ๐.
|
288 |
+
- **Lesson**: Faith ๐ restores grace โจ.
|
289 |
+
|
290 |
+
13. ๐ **Christian Saints & Angels**
|
291 |
+
- **St. Michael, Gabriel, Mary**: Warrior โ๏ธ, messenger ๐, mother ๐น.
|
292 |
+
- **Relation**: Heavenly kin serve God ๐.
|
293 |
+
- **Lesson**: Duty โ๏ธ upholds divine will ๐.
|
294 |
+
|
295 |
+
14. ๐ **Celtic Mythology**
|
296 |
+
- **Lugh, Morrigan, Cernunnos**: Son โ๏ธ, mother ๐ฆ, father ๐ฆ.
|
297 |
+
- **Relation**: Family governs cycles ๐.
|
298 |
+
- **Lesson**: Courage ๐ช in fate ๐ฒ.
|
299 |
+
|
300 |
+
15. ๐ **Central American Traditions**
|
301 |
+
- **Quetzalcoatl, Tezcatlipoca, Huitzilopochtli**: Brothers ๐๐ and war son โ๏ธ.
|
302 |
+
- **Relation**: Sibling rivalry creates ๐.
|
303 |
+
- **Lesson**: Sacrifice ๐ฉธ builds worlds ๐ฐ.
|
304 |
+
|
305 |
+
16. ๐ **Chinese Mythology**
|
306 |
+
- **Jade Emperor, Nuwa, Sun Wukong**: Father ๐, mother ๐, rebel son ๐.
|
307 |
+
- **Relation**: Family enforces harmony ๐ถ.
|
308 |
+
- **Lesson**: Duty โ๏ธ curbs chaos ๐ช๏ธ.
|
309 |
+
|
310 |
+
17. ๐ **Cthulhu Mythos**
|
311 |
+
- **Cthulhu, Nyarlathotep, Yog-Sothoth**: Elder kin ๐๐๏ธโ๐จ๏ธ๐.
|
312 |
+
- **Relation**: Cosmic trio overwhelms ๐ฑ.
|
313 |
+
- **Lesson**: Insignificance ๐ humbles ๐.
|
314 |
+
|
315 |
+
18. โฅ **Egyptian Mythology**
|
316 |
+
- **Ra, Osiris, Isis**: Father โ๏ธ, son โฐ๏ธ, mother ๐.
|
317 |
+
- **Relation**: Family ensures renewal ๐.
|
318 |
+
- **Lesson**: Justice โ๏ธ prevails.
|
319 |
+
|
320 |
+
19. โ๏ธ **Finnish Mythology**
|
321 |
+
- **Vรคinรคmรถinen, Louhi, Ukko**: Son ๐ถ, mother โ๏ธ, father โก.
|
322 |
+
- **Relation**: Kinship tests wisdom ๐ง .
|
323 |
+
- **Lesson**: Perseverance ๐๏ธ wins.
|
324 |
+
|
325 |
+
20. ๐๏ธ **Greek Mythology**
|
326 |
+
- **Zeus, Hera, Athena**: Father โก, mother ๐, daughter ๐ฆ.
|
327 |
+
- **Relation**: Family rules with tension โ๏ธ.
|
328 |
+
- **Lesson**: Hubris ๐ค meets wisdom ๐ง .
|
329 |
+
|
330 |
+
21. ๐๏ธ **Hindu Trimurti**
|
331 |
+
- **Brahma, Vishnu, Shiva**: Creator ๐, preserver ๐ก๏ธ, destroyer ๐ฅ.
|
332 |
+
- **Relation**: Divine trio cycles existence ๐.
|
333 |
+
- **Lesson**: Balance โ๏ธ sustains life ๐.
|
334 |
+
|
335 |
+
22. ๐บ **Hindu Avatars & Devis**
|
336 |
+
- **Krishna, Rama, Durga**: Sons ๐ฆ๐น and fierce mother ๐ก๏ธ.
|
337 |
+
- **Relation**: Avatars and goddess protect dharma โ๏ธ.
|
338 |
+
- **Lesson**: Duty โ๏ธ defeats evil ๐น.
|
339 |
+
|
340 |
+
23. ๐ธ **Japanese Mythology**
|
341 |
+
- **Amaterasu, Susanoo, Tsukuyomi**: Sister โ๏ธ, brothers ๐๐.
|
342 |
+
- **Relation**: Siblings balance cosmos ๐.
|
343 |
+
- **Lesson**: Harmony ๐ถ vs. chaos ๐ช๏ธ.
|
344 |
+
|
345 |
+
24. ๐ก๏ธ **Melnibonean Legends**
|
346 |
+
- **Arioch, Xiombarg, Elric**: Lords ๐ and mortal son โ๏ธ.
|
347 |
+
- **Relation**: Pact binds chaos ๐ช๏ธ.
|
348 |
+
- **Lesson**: Power ๐ช corrupts ๐.
|
349 |
+
|
350 |
+
25. โช๏ธ **Muslim Divine & Messengers**
|
351 |
+
- **Allah, Muhammad, Gabriel**: God ๐, prophet ๐, angel ๐.
|
352 |
+
- **Relation**: Messenger reveals divine will ๐.
|
353 |
+
- **Lesson**: Submission ๐ brings peace โฎ๏ธ.
|
354 |
+
|
355 |
+
26. ๐ป **Muslim Spirits & Kin**
|
356 |
+
- **Jinn, Iblis, Khidr**: Spirits ๐ฅ๐ and guide ๐ฟ defy or aid.
|
357 |
+
- **Relation**: Supernatural kin test faith ๐.
|
358 |
+
- **Lesson**: Obedience ๐ง vs. rebellion ๐ก.
|
359 |
+
|
360 |
+
27. ๐ฐ **Nehwon Legends**
|
361 |
+
- **Death, Ningauble, Sheelba**: Fateful trio ๐๐๏ธโ๐จ๏ธ๐ฟ.
|
362 |
+
- **Relation**: Guides shape destiny ๐ฒ.
|
363 |
+
- **Lesson**: Cunning ๐ง defies fate โฐ๏ธ.
|
364 |
+
|
365 |
+
28. ๐ง **Nonhuman Traditions**
|
366 |
+
- **Corellon, Moradin, Gruumsh**: Elf ๐ง, dwarf โ๏ธ, orc ๐ก๏ธ fathers.
|
367 |
+
- **Relation**: Rivals define purpose โ๏ธ.
|
368 |
+
- **Lesson**: Community ๐ค endures.
|
369 |
+
|
370 |
+
29. แฑ **Norse Mythology**
|
371 |
+
- **Odin, Frigg, Loki**: Father ๐๏ธ, mother ๐, trickster son ๐ฆ.
|
372 |
+
- **Relation**: Family faces doom โก.
|
373 |
+
- **Lesson**: Sacrifice ๐ฉธ costs.
|
374 |
+
|
375 |
+
30. ๐ฟ **Sumerian Mythology**
|
376 |
+
- **Enki, Inanna, Anu**: Son ๐, daughter โค๏ธ, father ๐.
|
377 |
+
- **Relation**: Kin wield knowledge ๐ง .
|
378 |
+
- **Lesson**: Ambition ๐ shapes.
|
379 |
+
|
380 |
+
31. ๐ **Appendices**
|
381 |
+
- **Planes**: Realms of gods, spirits, saints, e.g., Paradise ๐ and Svarga โจ.
|
382 |
+
- **Symbols**: Rituals ๐๏ธ and artifacts ๐ฟ of faith.
|
383 |
+
- **Charts**: Domains and duties for devotees ๐.
|
384 |
+
|
385 |
+
32. ๐ **Planes of Existence**
|
386 |
+
- **Heaven/Paradise**: Christian/Muslim abode ๐.
|
387 |
+
- **Svarga**: Hindu divine realm โจ.
|
388 |
+
- **Underworld**: Spirits linger, e.g., Sheol โฐ๏ธ and Naraka ๐ฅ.
|
389 |
+
|
390 |
+
33. ๐ **Temple Trappings**
|
391 |
+
- **Cross/Crescent**: Christian/Muslim faith โ๏ธโช๏ธ.
|
392 |
+
- **Mandalas**: Hindu devotion ๐.
|
393 |
+
- **Relics**: Saintsโ and prophetsโ legacy ๐๏ธ.
|
394 |
+
|
395 |
+
34. ๐ **Clerical Chart**
|
396 |
+
- **Gods**: Domains, e.g., creation ๐ and mercy โค๏ธ.
|
397 |
+
- **Spirits**: Influence, like guidance ๐ฟ and mischief ๐.
|
398 |
+
- **Saints/Prophets**: Virtues, e.g., justice โ๏ธ and prophecy ๐ฎ.
|
399 |
+
"""
|
400 |
+
|
401 |
+
create_pdf_tab(default_markdown)
|