1
0

gen_presentation.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import markdown
  2. import os
  3. files_to_merge = ['AI_History/Client_Presentation.md', 'AI_History/status_report.md', 'AI_History/Retrospective.md']
  4. merged_md = ''
  5. for fName in files_to_merge:
  6. if os.path.exists(fName):
  7. with open(fName, 'r', encoding='utf-8') as f:
  8. merged_md += f.read() + '\n\n---\n\n'
  9. html_content = markdown.markdown(merged_md, extensions=['tables'])
  10. html_template = f'''
  11. <!DOCTYPE html>
  12. <html>
  13. <head>
  14. <meta charset="utf-8">
  15. <title>Customer Presentation</title>
  16. <style>
  17. body {{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; max-width: 900px; margin: 0 auto; padding: 2rem; }}
  18. h1 {{ color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; }}
  19. h2 {{ color: #2980b9; margin-top: 2rem; }}
  20. h3 {{ color: #16a085; }}
  21. table {{ border-collapse: collapse; width: 100%; margin-bottom: 2rem; }}
  22. th, td {{ border: 1px solid #ddd; padding: 12px; text-align: left; }}
  23. th {{ background-color: #f2f2f2; color: #333; }}
  24. @media print {{
  25. body {{ padding: 0; max-width: 100%; }}
  26. hr {{ page-break-after: always; border: 0; }}
  27. }}
  28. </style>
  29. </head>
  30. <body>
  31. <div style="text-align:center; margin-bottom: 3rem;">
  32. <h1 style="border: none;">Clinical Food AI Platform</h1>
  33. <p><strong>Master Deliverable Overview</strong></p>
  34. </div>
  35. {html_content}
  36. </body>
  37. </html>
  38. '''
  39. with open('Final_Presentation.html', 'w', encoding='utf-8') as f:
  40. f.write(html_template)
  41. print('Generated HTML!')