awacke1 commited on
Commit
1a70ad2
·
verified ·
1 Parent(s): 9e86e0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +129 -162
app.py CHANGED
@@ -1,51 +1,126 @@
1
  import streamlit as st
 
 
2
 
3
  def main():
4
  st.set_page_config(page_title="Storytelling Mastery", page_icon="📚", layout="wide")
5
 
6
  st.title("🎭 The Art of Storytelling: Master Guide 🎭")
7
 
8
- # Define the storytelling points data structure
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  storytelling_points = [
10
- {"number": 1, "emoji": "🏠", "keyword": "location", "description": "Start by establishing a clear location to help listeners visualize the scene."},
11
- {"number": 2, "emoji": "🏃", "keyword": "actions", "description": "Describe specific actions to create momentum and pull listeners into the moment."},
12
- {"number": 3, "emoji": "🧠", "keyword": "thoughts", "description": "Share raw, unfiltered thoughts instead of sanitized summaries to add authenticity."},
13
- {"number": 4, "emoji": "😲", "keyword": "emotions", "description": "Show rather than tell your emotions through physical descriptions of feelings."},
14
- {"number": 5, "emoji": "💬", "keyword": "dialogue", "description": "Use exact dialogue to bring characters to life instead of summarizing conversations."},
15
- {"number": 6, "emoji": "🔍", "keyword": "zoom", "description": "Zoom into specific moments rather than giving bird's-eye summaries of events."},
16
- {"number": 7, "emoji": "🎬", "keyword": "transport", "description": "Transport your audience into the trenches of your story's crucial moments."},
17
- {"number": 8, "emoji": "🏞️", "keyword": "detail", "description": "Avoid excessive detail in setting descriptions—listeners will fill in their own versions."},
18
- {"number": 9, "emoji": "⏩", "keyword": "momentum", "description": "Create forward momentum by stating actions that move the story along."},
19
- {"number": 10, "emoji": "👁️", "keyword": "visual", "description": "Make your stories visual by showing emotions through physical manifestations."},
20
- {"number": 11, "emoji": "👂", "keyword": "listen", "description": "Listen to great storytellers like John Krasinski to learn effective techniques."},
21
- {"number": 12, "emoji": "🗣️", "keyword": "juicy", "description": "Keep dialogue juicy and conversational rather than formal or stilted."},
22
- {"number": 13, "emoji": "🤸", "keyword": "simplify", "description": "Simplify your storytelling approach—it doesn't need to be complicated."},
23
- {"number": 14, "emoji": "🧩", "keyword": "essentials", "description": "Focus on the essentials that make stories compelling rather than unnecessary details."},
24
- {"number": 15, "emoji": "🚶", "keyword": "walk", "description": "Walk listeners through your experience step by step rather than jumping around."},
25
- {"number": 16, "emoji": "🌊", "keyword": "journey", "description": "Create an emotional journey that takes listeners through various feelings."},
26
- {"number": 17, "emoji": "🎯", "keyword": "focused", "description": "Stay focused on the core elements that drive your narrative forward."},
27
- {"number": 18, "emoji": "🤔", "keyword": "neurotic", "description": "Share neurotic thoughts that reveal your humanity and create connection."},
28
- {"number": 19, "emoji": "⚡", "keyword": "crucial", "description": "Capture those crucial moments that define the heart of your story."},
29
- {"number": 20, "emoji": "🧠", "keyword": "master", "description": "Master these five key elements: location, action, thoughts, emotions, and dialogue."}
30
  ]
31
 
32
- # Define the quotes
33
- quotes = [
34
- {"text": "Stories are a communal currency of humanity.", "author": "Tahir Shah, in Arabian Nights"},
35
- {"text": "The universe is made of stories, not of atoms.", "author": "Muriel Rukeyser"},
36
- {"text": "There is no greater agony than bearing an untold story inside you.", "author": "Maya Angelou"}
 
 
 
 
 
 
 
 
 
37
  ]
38
 
39
- # Create the outline
40
- st.markdown("## 📚 The Art of Storytelling: 20 Essential Techniques 📚")
41
- st.markdown(f"> \"{quotes[0]['text']}\" — {quotes[0]['author']}")
42
 
43
- for point in storytelling_points:
44
- st.markdown(f"{point['number']}. {point['emoji']} Start by establishing a clear **{point['keyword']}** to help listeners visualize the scene.")
 
 
45
 
46
- st.markdown(f"> \"{quotes[1]['text']}\" — {quotes[1]['author']}")
47
 
48
- # Create tabs for different visualizations
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  tab1, tab2, tab3 = st.tabs(["Vertical Flow", "Circular Layout", "Categorical Groups"])
50
 
51
  with tab1:
@@ -63,196 +138,88 @@ def main():
63
  mermaid_categories = generate_categorical_diagram(storytelling_points)
64
  st.markdown(mermaid_categories, unsafe_allow_html=True)
65
 
66
- # Interactive element selector
67
  st.markdown("## 🔍 Explore Individual Storytelling Elements")
68
-
69
  col1, col2 = st.columns([1, 3])
70
 
71
  with col1:
72
- # Create options for the dropdown - combine emoji, number and keyword
73
  options = [f"{point['number']}. {point['emoji']} {point['keyword'].capitalize()}" for point in storytelling_points]
74
  selected_option = st.selectbox("Select an element to explore:", options)
75
-
76
- # Get the selected point number
77
  selected_number = int(selected_option.split('.')[0])
78
  selected_point = next(point for point in storytelling_points if point['number'] == selected_number)
79
 
80
  with col2:
81
  st.markdown(f"### {selected_option}")
82
  st.markdown(f"**Description:** {selected_point['description']}")
83
-
84
- # Add examples based on the selected point
85
  examples = {
86
- 1: "'Two weeks ago, I'm sitting on my couch in my living room taking a deep breath...'",
87
- 2: "'I'm in my office. I open my laptop and start reading a message from my manager...'",
88
- 3: "Instead of saying 'I was excited', say 'I thought: ah, this will be so cool! Finally, I can see her after all that time.'",
89
- 4: "Instead of saying 'I was relieved', say 'In that moment, I leaned backward and let out this big sigh.'",
90
- 5: "Instead of saying 'My manager was very happy with my work', say 'In that moment, my manager looked at me and said: Wow, that was really the best presentation you've ever given.'",
91
- 6: "John Krasinski didn't just say 'I met a customs agent who was surprised about my wife.' He zoomed into the specific exchange of dialogue.",
92
- 7: "'The moment I walked through those doors, the music stopped, all eyes turned to me, and I could feel my heart pounding against my chest.'",
93
- 8: "Simply saying 'conference room' is better than listing every piece of furniture and decor.",
94
- 9: "Use active verbs like 'I grabbed my phone, texted her quickly, and rushed out the door' instead of static descriptions.",
95
- 10: "'He kept tapping his pen on the table and glancing up at the clock every few seconds' creates a clear image of anxiety.",
96
- 11: "Notice how comedians like John Krasinski use timing, facial expressions, and precise dialogue to enhance their stories.",
97
- 12: "Use 'Yeah, that's crazy!' instead of 'Yes, that's quite extraordinary.'",
98
- 13: "Cut out unnecessary backstory and context that doesn't serve the core narrative.",
99
- 14: "Focus on the surprise revelation, the key decision moment, or the unexpected twist.",
100
- 15: "Walk through events chronologically or in a way that builds tension effectively.",
101
- 16: "Start with anticipation, build to frustration, then release with relief or humor.",
102
- 17: "If a detail doesn't serve the story's purpose or emotional impact, leave it out.",
103
- 18: "'I thought: Oh no, everyone's going to think I'm an absolute fraud now!'",
104
- 19: "Sarah Willingham's story focused on the moment the lawyer realized his mistake—the color draining from his face.",
105
- 20: "A complete story incorporates all five elements to create an immersive experience."
106
  }
107
-
108
- st.markdown(f"**Example:** {examples[selected_number]}")
109
 
110
- # Five pillars section
111
- st.markdown("## 🧠 The Five Pillars of Storytelling")
112
-
113
- pillars = storytelling_points[:5] # First 5 points are the pillars
114
-
115
- cols = st.columns(5)
116
- for i, pillar in enumerate(pillars):
117
- with cols[i]:
118
- st.markdown(f"### {pillar['emoji']} {pillar['keyword'].capitalize()}")
119
- st.markdown(f"{pillar['description']}")
120
-
121
- st.markdown(f"> \"{quotes[2]['text']}\" — {quotes[2]['author']}")
122
 
123
  def generate_vertical_diagram(points):
124
  """Generate a vertical flow Mermaid diagram"""
125
-
126
  nodes = []
127
  connections = []
128
  styles = []
129
 
130
- # Create nodes and connections
131
  for i, point in enumerate(points):
132
  node_id = point['number']
133
  node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
134
  nodes.append(f" {node_id}(\"{node_label}\")")
135
-
136
- # Add connection to next node (or back to first if last)
137
  if i < len(points) - 1:
138
  connections.append(f" {node_id} --> {points[i+1]['number']}")
139
  else:
140
  connections.append(f" {node_id} --> {points[0]['number']}")
141
 
142
- # Add style classes
143
  styles.extend([
144
  " %% Style definitions",
145
  " classDef foundation fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
146
  " classDef technique fill:#66cc99,stroke:#333,stroke-width:2px,color:#000;",
147
  " classDef learning fill:#6699cc,stroke:#333,stroke-width:2px,color:#000;",
148
  " classDef mastery fill:#cc6699,stroke:#333,stroke-width:2px,color:#000;",
149
- "",
150
- " %% Apply styles",
151
- " class 1,2,3,4,5 foundation;",
152
- " class 6,7,8,9,10 technique;",
153
- " class 11,12,13,14,15 learning;",
154
- " class 16,17,18,19,20 mastery;"
155
  ])
156
 
157
- # Assemble diagram
158
  diagram = ["```mermaid", "graph TD"]
159
  diagram.extend(nodes)
160
  diagram.extend(connections)
161
  diagram.extend(styles)
162
  diagram.append("```")
163
-
164
  return "\n".join(diagram)
165
 
166
  def generate_circular_diagram(points):
167
  """Generate a circular flow Mermaid diagram"""
168
-
169
- # Calculate positions in a circle
170
- import math
171
-
172
  diagram = ["```mermaid", "graph TD"]
173
-
174
- # Create nodes in circular positions using subgraphs
175
- diagram.append(" %% Nodes")
176
-
177
- # Create all nodes first
178
  for point in points:
179
  node_id = point['number']
180
  node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
181
  diagram.append(f" {node_id}[\"{node_label}\"]")
182
-
183
- # Group nodes into four quarters
184
  diagram.extend([
185
- " %% Connections - circular flow",
186
- " 1 --> 2 --> 3 --> 4 --> 5 --> 6 --> 7 --> 8 --> 9 --> 10",
187
- " 10 --> 11 --> 12 --> 13 --> 14 --> 15 --> 16 --> 17 --> 18 --> 19 --> 20",
188
- " 20 -.-> 1",
189
- "",
190
  " %% Style definitions",
191
  " classDef q1 fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
192
- " classDef q2 fill:#66cc99,stroke:#333,stroke-width:2px,color:#000;",
193
- " classDef q3 fill:#6699cc,stroke:#333,stroke-width:2px,color:#000;",
194
- " classDef q4 fill:#cc6699,stroke:#333,stroke-width:2px,color:#000;",
195
- "",
196
- " %% Apply styles by quarters",
197
- " class 1,2,3,4,5 q1;",
198
- " class 6,7,8,9,10 q2;",
199
- " class 11,12,13,14,15 q3;",
200
- " class 16,17,18,19,20 q4;"
201
  ])
202
-
203
  diagram.append("```")
204
-
205
  return "\n".join(diagram)
206
 
207
  def generate_categorical_diagram(points):
208
- """Generate a categorical Mermaid diagram with storytelling elements grouped by category"""
209
-
210
- diagram = ["```mermaid", "graph TB"]
211
-
212
- # Create category subgraphs
213
- diagram.extend([
214
- " subgraph Foundation[\"🏛️ Foundation Elements\"]",
215
- " 1(\"`1. 🏠 Location`\")",
216
- " 2(\"`2. 🏃 Action`\")",
217
- " 3(\"`3. 🧠 Thoughts`\")",
218
- " 4(\"`4. 😲 Emotions`\")",
219
- " 5(\"`5. 💬 Dialogue`\")",
220
- " end",
221
- "",
222
- " subgraph Techniques[\"🔧 Storytelling Techniques\"]",
223
- " 6(\"`6. 🔍 Zoom In`\")",
224
- " 7(\"`7. 🎬 Transport`\")",
225
- " 8(\"`8. 🏞️ Simple Details`\")",
226
- " 9(\"`9. ⏩ Momentum`\")",
227
- " 10(\"`10. 👁️ Visualization`\")",
228
- " end",
229
- "",
230
- " subgraph Development[\"📈 Story Development\"]",
231
- " 11(\"`11. 👂 Study Masters`\")",
232
- " 12(\"`12. 🗣️ Natural Speech`\")",
233
- " 13(\"`13. 🤸 Simplify`\")",
234
- " 14(\"`14. 🧩 Core Elements`\")",
235
- " 15(\"`15. 🚶 Step by Step`\")",
236
- " end",
237
- "",
238
- " subgraph Mastery[\"🏆 Storytelling Mastery\"]",
239
- " 16(\"`16. 🌊 Emotional Arc`\")",
240
- " 17(\"`17. 🎯 Stay Focused`\")",
241
- " 18(\"`18. 🤔 Be Human`\")",
242
- " 19(\"`19. ⚡ Key Moments`\")",
243
- " 20(\"`20. 🧠 Five Pillars`\")",
244
- " end",
245
- "",
246
- " %% Connections between categories",
247
- " Foundation --> Techniques",
248
- " Techniques --> Development",
249
- " Development --> Mastery",
250
- " Mastery -.-> Foundation",
251
- ])
252
-
253
- diagram.append("```")
254
-
255
  return "\n".join(diagram)
256
 
257
  if __name__ == "__main__":
258
- main()
 
1
  import streamlit as st
2
+ import streamlit.components.v1 as components
3
+ import math
4
 
5
  def main():
6
  st.set_page_config(page_title="Storytelling Mastery", page_icon="📚", layout="wide")
7
 
8
  st.title("🎭 The Art of Storytelling: Master Guide 🎭")
9
 
10
+ # -----------------------------
11
+ # 1. The Storyteller's Song
12
+ # -----------------------------
13
+ st.markdown("## 🎵 The Storyteller's Journey Song 🎵")
14
+ st.markdown("""
15
+ **Verse 1 – Location**
16
+ *I'm in a quiet town, where twilight meets the dawn,*
17
+ *A simple street and weathered walls, where whispered dreams are drawn.*
18
+
19
+ **Verse 2 – Actions**
20
+ *I lace my worn-out sneakers, stepping into a new day’s light,*
21
+ *I pedal through cobbled memories, heart racing with each flight.*
22
+
23
+ **Verse 3 – Thoughts**
24
+ *In every echo of my footsteps, a raw, unfiltered thought appears,*
25
+ *I muse, “Am I chasing shadows, or the brilliance of my years?”*
26
+
27
+ **Verse 4 – Emotions**
28
+ *My eyes reflect a storm of joy and pain—a silent, candid art,*
29
+ *A trembling smile, a furrowed brow, emotions painted on my heart.*
30
+
31
+ **Verse 5 – Dialogue**
32
+ *Then comes a gentle, piercing voice: “Keep moving, dare to feel;”*
33
+ *Those words ignite the darkened skies—my destiny is real.*
34
+
35
+ **Chorus**
36
+ *Let each moment unfold its magic, in places, moves, and minds so bold,*
37
+ *For every whispered thought and burst of feeling tells a story yet untold.*
38
+ """)
39
+
40
+ st.markdown("---")
41
+
42
+ # -----------------------------
43
+ # 2. The Storytelling Points Outline
44
+ # -----------------------------
45
  storytelling_points = [
46
+ {"number": 1, "emoji": "🏠", "keyword": "location", "description": "Set a scene that sparks the imagination: a place that's simply stated but vividly felt."},
47
+ {"number": 2, "emoji": "🏃", "keyword": "actions", "description": "Show the kinetic energy—whether it’s walking, biking, or a spontaneous burst of movement."},
48
+ {"number": 3, "emoji": "🧠", "keyword": "thoughts", "description": "Reveal those raw, neurotic inner monologues that make you real and relatable."},
49
+ {"number": 4, "emoji": "😲", "keyword": "emotions", "description": "Let your body speak the language of your feelings—every twitch and tear is a story."},
50
+ {"number": 5, "emoji": "💬", "keyword": "dialogue", "description": "Capture crisp, memorable dialogue that slices through the moment like lightning."},
51
+ # Additional points can be used for further storytelling techniques…
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  ]
53
 
54
+ # -----------------------------
55
+ # 3. Random Literary Wit – Ten Poetic Lines
56
+ # -----------------------------
57
+ random_poetry = [
58
+ "🌅 Location: Where the horizon kisses the edge of dreams. 🌌",
59
+ "🚴 Action: Pedaling through the city's heartbeat, every turn a burst of rhythm. 🎶",
60
+ "💭 Thoughts: Whispering secrets of a chaotic mind under a tranquil sky. 🌒",
61
+ "😊 Emotions: A smile that trembles like morning dew on a rose. 🌈",
62
+ "🗣 Dialogue: Words crackling like fire in the midnight hush. 🔥",
63
+ "🌲 Nature: The forest murmurs ancient tales to those who dare to listen. 🍃",
64
+ "🌊 Waves: Dancing to the eternal hymn of the deep blue. 🐚",
65
+ "🌟 Dreams: Starlight scattered over the canvas of restless nights. ✨",
66
+ "🔥 Passion: A flame burning fierce in the silence of despair. ❤️",
67
+ "🍂 Reflection: Leaves falling like whispered memories in autumn’s embrace. 🕊️"
68
  ]
69
 
70
+ st.markdown("## Random Literary Wit")
71
+ st.code("\n".join(random_poetry), language="python")
 
72
 
73
+ # -----------------------------
74
+ # 4. Interactive Story Element Explorer (Vertical Flow and Tabs)
75
+ # -----------------------------
76
+ st.markdown("## 📚 The Art of Storytelling: 5 Essential Elements")
77
 
78
+ st.markdown("> \"The universe is made of stories, not of atoms.\" — Muriel Rukeyser")
79
 
80
+ for point in storytelling_points:
81
+ st.markdown(f"{point['number']}. {point['emoji']} **{point['keyword'].capitalize()}** - {point['description']}")
82
+
83
+ # -----------------------------
84
+ # 5. Star Layout for the Five Pillars
85
+ # -----------------------------
86
+ st.markdown("## ⭐ Five Pillars in a Star Layout ⭐")
87
+
88
+ # Using absolute positioning in a relative container to arrange five points on a circle
89
+ # Calculated using basic trigonometry (center = 200, radius = 150)
90
+ star_html = """
91
+ <div style="position: relative; width: 400px; height: 400px; margin: auto; border: 1px dashed #aaa; border-radius: 50%;">
92
+ <!-- Point 1: Location at angle 90° -->
93
+ <div style="position: absolute; top: 50px; left: 200px; transform: translate(-50%, -50%); text-align: center;">
94
+ <div style="font-size: 2em;">🏠</div>
95
+ <div><b>Location</b></div>
96
+ </div>
97
+ <!-- Point 2: Actions at angle ~162° -->
98
+ <div style="position: absolute; top: 154px; left: 57px; transform: translate(-50%, -50%); text-align: center;">
99
+ <div style="font-size: 2em;">🏃</div>
100
+ <div><b>Actions</b></div>
101
+ </div>
102
+ <!-- Point 3: Thoughts at angle ~234° -->
103
+ <div style="position: absolute; top: 321px; left: 112px; transform: translate(-50%, -50%); text-align: center;">
104
+ <div style="font-size: 2em;">🧠</div>
105
+ <div><b>Thoughts</b></div>
106
+ </div>
107
+ <!-- Point 4: Emotions at angle ~306° -->
108
+ <div style="position: absolute; top: 321px; left: 288px; transform: translate(-50%, -50%); text-align: center;">
109
+ <div style="font-size: 2em;">😲</div>
110
+ <div><b>Emotions</b></div>
111
+ </div>
112
+ <!-- Point 5: Dialogue at angle ~18° -->
113
+ <div style="position: absolute; top: 154px; left: 343px; transform: translate(-50%, -50%); text-align: center;">
114
+ <div style="font-size: 2em;">💬</div>
115
+ <div><b>Dialogue</b></div>
116
+ </div>
117
+ </div>
118
+ """
119
+ components.html(star_html, height=450)
120
+
121
+ # -----------------------------
122
+ # 6. Additional Interactive Elements (Tabs & Dropdown)
123
+ # -----------------------------
124
  tab1, tab2, tab3 = st.tabs(["Vertical Flow", "Circular Layout", "Categorical Groups"])
125
 
126
  with tab1:
 
138
  mermaid_categories = generate_categorical_diagram(storytelling_points)
139
  st.markdown(mermaid_categories, unsafe_allow_html=True)
140
 
 
141
  st.markdown("## 🔍 Explore Individual Storytelling Elements")
 
142
  col1, col2 = st.columns([1, 3])
143
 
144
  with col1:
 
145
  options = [f"{point['number']}. {point['emoji']} {point['keyword'].capitalize()}" for point in storytelling_points]
146
  selected_option = st.selectbox("Select an element to explore:", options)
 
 
147
  selected_number = int(selected_option.split('.')[0])
148
  selected_point = next(point for point in storytelling_points if point['number'] == selected_number)
149
 
150
  with col2:
151
  st.markdown(f"### {selected_option}")
152
  st.markdown(f"**Description:** {selected_point['description']}")
 
 
153
  examples = {
154
+ 1: "'In the stillness of a small town, I take in the crisp air...'",
155
+ 2: "'I lace up my sneakers and step boldly into the unknown, each stride a heartbeat.'",
156
+ 3: "'I muse: What if these fleeting moments are the stitches of my very soul?'",
157
+ 4: "'My eyes shimmer with unspoken stories, my face a canvas of turbulent joy.'",
158
+ 5: "'Then, a voice cuts through the silence: ‘Keep pushing, the dawn awaits!’'"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
+ st.markdown(f"**Example:** {examples.get(selected_number, 'No example available.')}")
 
161
 
162
+ st.markdown("> \"There is no greater agony than bearing an untold story inside you.\" — Maya Angelou")
 
 
 
 
 
 
 
 
 
 
 
163
 
164
  def generate_vertical_diagram(points):
165
  """Generate a vertical flow Mermaid diagram"""
 
166
  nodes = []
167
  connections = []
168
  styles = []
169
 
 
170
  for i, point in enumerate(points):
171
  node_id = point['number']
172
  node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
173
  nodes.append(f" {node_id}(\"{node_label}\")")
 
 
174
  if i < len(points) - 1:
175
  connections.append(f" {node_id} --> {points[i+1]['number']}")
176
  else:
177
  connections.append(f" {node_id} --> {points[0]['number']}")
178
 
 
179
  styles.extend([
180
  " %% Style definitions",
181
  " classDef foundation fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
182
  " classDef technique fill:#66cc99,stroke:#333,stroke-width:2px,color:#000;",
183
  " classDef learning fill:#6699cc,stroke:#333,stroke-width:2px,color:#000;",
184
  " classDef mastery fill:#cc6699,stroke:#333,stroke-width:2px,color:#000;",
185
+ " class 1,2,3,4,5 foundation;"
 
 
 
 
 
186
  ])
187
 
 
188
  diagram = ["```mermaid", "graph TD"]
189
  diagram.extend(nodes)
190
  diagram.extend(connections)
191
  diagram.extend(styles)
192
  diagram.append("```")
 
193
  return "\n".join(diagram)
194
 
195
  def generate_circular_diagram(points):
196
  """Generate a circular flow Mermaid diagram"""
 
 
 
 
197
  diagram = ["```mermaid", "graph TD"]
 
 
 
 
 
198
  for point in points:
199
  node_id = point['number']
200
  node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
201
  diagram.append(f" {node_id}[\"{node_label}\"]")
 
 
202
  diagram.extend([
203
+ " 1 --> 2 --> 3 --> 4 --> 5 --> 1",
 
 
 
 
204
  " %% Style definitions",
205
  " classDef q1 fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
206
+ " class 1,2,3,4,5 q1;"
 
 
 
 
 
 
 
 
207
  ])
 
208
  diagram.append("```")
 
209
  return "\n".join(diagram)
210
 
211
  def generate_categorical_diagram(points):
212
+ """Generate a categorical Mermaid diagram grouping the storytelling elements"""
213
+ diagram = ["```mermaid", "graph TB",
214
+ " subgraph Foundation[\"Foundation Elements\"]",
215
+ " 1(\"`1. 🏠 Location`\")",
216
+ " 2(\"`2. 🏃 Actions`\")",
217
+ " 3(\"`3. 🧠 Thoughts`\")",
218
+ " 4(\"`4. 😲 Emotions`\")",
219
+ " 5(\"`5. 💬 Dialogue`\")",
220
+ " end",
221
+ "```"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  return "\n".join(diagram)
223
 
224
  if __name__ == "__main__":
225
+ main()