-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcreate_presentation.py
More file actions
402 lines (337 loc) · 10.7 KB
/
create_presentation.py
File metadata and controls
402 lines (337 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
"""
Create PowerPoint presentation for DVOACAP Ham Radio Club talk
"""
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
def create_dvoacap_presentation():
"""Create a complete PowerPoint presentation for DVOACAP."""
prs = Presentation()
prs.slide_width = Inches(10)
prs.slide_height = Inches(7.5)
# Define colors
BLUE = RGBColor(0, 102, 204)
GREEN = RGBColor(0, 153, 0)
DARK_GRAY = RGBColor(51, 51, 51)
# Slide 1: Title
slide = prs.slides.add_slide(prs.slide_layouts[6]) # Blank layout
# Title
title_box = slide.shapes.add_textbox(Inches(1), Inches(2), Inches(8), Inches(1))
title_frame = title_box.text_frame
title_frame.text = "DVOACAP-Python"
title_para = title_frame.paragraphs[0]
title_para.font.size = Pt(54)
title_para.font.bold = True
title_para.font.color.rgb = BLUE
title_para.alignment = PP_ALIGN.CENTER
# Subtitle
subtitle_box = slide.shapes.add_textbox(Inches(1), Inches(3.2), Inches(8), Inches(0.6))
subtitle_frame = subtitle_box.text_frame
subtitle_frame.text = "HF Propagation Prediction Made Easy"
subtitle_para = subtitle_frame.paragraphs[0]
subtitle_para.font.size = Pt(28)
subtitle_para.font.color.rgb = DARK_GRAY
subtitle_para.alignment = PP_ALIGN.CENTER
# Footer
footer_box = slide.shapes.add_textbox(Inches(1), Inches(6), Inches(8), Inches(0.5))
footer_frame = footer_box.text_frame
footer_frame.text = "Ham Radio Club Presentation"
footer_para = footer_frame.paragraphs[0]
footer_para.font.size = Pt(18)
footer_para.font.color.rgb = DARK_GRAY
footer_para.alignment = PP_ALIGN.CENTER
# Slide 2: The Problem
slide = prs.slides.add_slide(prs.slide_layouts[1]) # Title and Content
title = slide.shapes.title
title.text = "What Problem Does This Solve?"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "The Challenge:"
p = tf.add_paragraph()
p.text = '"Will 20 meters be open to Europe tonight?"'
p.level = 1
p = tf.add_paragraph()
p.text = '"What\'s the best time to work Japan?"'
p.level = 1
p = tf.add_paragraph()
p.text = '"Which band should I use for the contest?"'
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "The Solution:"
p.font.bold = True
p = tf.add_paragraph()
p.text = "DVOACAP predicts HF propagation by modeling the ionosphere"
p.level = 1
# Slide 3: How It Works
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "How It Works - The Ionosphere"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Three Ionospheric Layers:"
p = tf.add_paragraph()
p.text = "F2 Layer (300 km) - Best for long-distance (DX)"
p.level = 1
p = tf.add_paragraph()
p.text = "F1 Layer (200 km) - Daytime only"
p.level = 1
p = tf.add_paragraph()
p.text = "E Layer (110 km) - Regional contacts"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "What DVOACAP Tells You:"
p.font.bold = True
p = tf.add_paragraph()
p.text = "Critical frequencies for each layer"
p.level = 1
p = tf.add_paragraph()
p.text = "Maximum Usable Frequency (MUF)"
p.level = 1
p = tf.add_paragraph()
p.text = "Best operating frequencies"
p.level = 1
# Slide 4: Solar Activity
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Solar Activity Changes Everything"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Sunspot Number (SSN) Effects:"
p = tf.add_paragraph()
p.text = "Solar Min (SSN 0-30): 40m, 80m, 160m only"
p.level = 1
p = tf.add_paragraph()
p.text = "Low-Mid (SSN 50-100): 20m, 40m working"
p.level = 1
p = tf.add_paragraph()
p.text = "Mid-High (SSN 100-150): 15m, 20m worldwide"
p.level = 1
p = tf.add_paragraph()
p.text = "Solar Max (SSN 150-200+): 10m is HOT!"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Current Status:"
p.font.bold = True
p.font.color.rgb = GREEN
p = tf.add_paragraph()
p.text = "Solar Cycle 25, approaching maximum (2025-2026)"
p.level = 1
p.font.color.rgb = GREEN
# Slide 5: Live Example
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Example: Halifax to London"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Question: When can we work London on 20m?"
tf.paragraphs[0].font.bold = True
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Input:"
p = tf.add_paragraph()
p.text = "Location: Halifax, NS (44.65°N, 63.57°W)"
p.level = 1
p = tf.add_paragraph()
p.text = "Target: London, UK"
p.level = 1
p = tf.add_paragraph()
p.text = "Solar Activity: SSN 100 (moderate)"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Prediction:"
p.font.bold = True
p.font.color.rgb = GREEN
p = tf.add_paragraph()
p.text = "Best time: 21:00-01:00 UTC"
p.level = 1
p = tf.add_paragraph()
p.text = "20m band: EXCELLENT"
p.level = 1
p.font.color.rgb = GREEN
# Slide 6: Installation
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Installation - Super Easy!"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Three Simple Steps:"
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "1. Download two files:"
p = tf.add_paragraph()
p.text = "install_dvoacap.py"
p.level = 1
p = tf.add_paragraph()
p.text = "validate_dvoacap.py"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "2. Run installer:"
p = tf.add_paragraph()
p.text = "python install_dvoacap.py"
p.level = 1
p.font.name = "Courier New"
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "3. Validate it works:"
p = tf.add_paragraph()
p.text = "python validate_dvoacap.py"
p.level = 1
p.font.name = "Courier New"
# Slide 7: Results
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "What You Get - Real Results"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Halifax, NS Prediction:"
tf.paragraphs[0].font.bold = True
p = tf.add_paragraph()
p.text = "E Layer: 3.45 MHz at 110 km"
p.level = 1
p.font.name = "Courier New"
p = tf.add_paragraph()
p.text = "F1 Layer: 5.23 MHz at 200 km"
p.level = 1
p.font.name = "Courier New"
p = tf.add_paragraph()
p.text = "F2 Layer: 8.67 MHz at 300 km"
p.level = 1
p.font.name = "Courier New"
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Band Conditions:"
p.font.bold = True
p = tf.add_paragraph()
p.text = "20m (14 MHz) - EXCELLENT ✓"
p.level = 1
p.font.color.rgb = GREEN
p = tf.add_paragraph()
p.text = "17m (18 MHz) - EXCELLENT ✓"
p.level = 1
p.font.color.rgb = GREEN
p = tf.add_paragraph()
p.text = "15m (21 MHz) - GOOD ✓"
p.level = 1
p.font.color.rgb = GREEN
# Slide 8: Accuracy
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Accuracy & Trust"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "How Accurate Is It?"
tf.paragraphs[0].font.bold = True
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "86.6% accuracy vs. reference implementation"
p.level = 1
p = tf.add_paragraph()
p.text = "2.3x faster than previous version"
p.level = 1
p = tf.add_paragraph()
p.text = "Based on ITU-R recommendations"
p.level = 1
p = tf.add_paragraph()
p.text = "Decades of ionospheric measurements"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "The Bottom Line:"
p.font.bold = True
p.font.color.rgb = BLUE
p = tf.add_paragraph()
p.text = "Industry standard for HF planning used by governments and broadcasters worldwide"
p.level = 1
# Slide 9: Applications
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Ham Radio Applications"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Contest Planning"
p = tf.add_paragraph()
p.text = "Predict band openings by hour"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "DX Chasing"
p = tf.add_paragraph()
p.text = "Find best time to work rare entities"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Emergency Communications"
p = tf.add_paragraph()
p.text = "Plan EMCOMM frequencies in advance"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Antenna Projects"
p = tf.add_paragraph()
p.text = "Determine optimal antenna direction"
p.level = 1
# Slide 10: Get Started
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Get Started Today!"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "Free & Open Source"
tf.paragraphs[0].font.bold = True
tf.paragraphs[0].font.size = Pt(24)
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "GitHub: github.com/skyelaird/dvoacap-python"
p.level = 1
p = tf.add_paragraph()
p.text = "PyPI: pypi.org/project/dvoacap/"
p.level = 1
p = tf.add_paragraph()
p.text = "Docs: skyelaird.github.io/dvoacap-python/"
p.level = 1
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Try It Right Now:"
p.font.bold = True
p.font.size = Pt(20)
p = tf.add_paragraph()
p.text = "pip install dvoacap"
p.level = 1
p.font.name = "Courier New"
p.font.size = Pt(18)
p = tf.add_paragraph()
p.text = ""
p = tf.add_paragraph()
p.text = "Questions? Thank you!"
p.font.bold = True
p.font.size = Pt(24)
p.font.color.rgb = BLUE
# Save presentation
output_file = "/home/user/dvoacap-python/DVOACAP_Club_Presentation.pptx"
prs.save(output_file)
print(f"✓ Presentation created: {output_file}")
return output_file
if __name__ == "__main__":
create_dvoacap_presentation()