give a nicetemplate for ppt

Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/ppt-template && cat > /tmp/workspace/ppt-template/create_template.py << 'PYEOF' from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.oxml.ns import qn from lxml import etree from io import BytesIO # ── Palette ───────────────────────────────────────────────────────────────── DARK_BG = RGBColor(0x0F, 0x17, 0x2A) # very dark navy ACCENT = RGBColor(0x4F, 0x8E, 0xF8) # bright blue ACCENT2 = RGBColor(0x7C, 0x5C, 0xF5) # purple WHITE = RGBColor(0xFF, 0xFF, 0xFF) LIGHT_GREY = RGBColor(0xCC, 0xD6, 0xF1) MID_GREY = RGBColor(0x8B, 0x9A, 0xB8) CARD_BG = RGBColor(0x1A, 0x26, 0x42) # slightly lighter navy for cards W = Inches(13.333) H = Inches(7.5) prs = Presentation() prs.slide_width = W prs.slide_height = H blank = prs.slide_layouts[6] # ───────────────────────────────────────────────────────────────────────────── # HELPER FUNCTIONS # ───────────────────────────────────────────────────────────────────────────── def fill_slide(slide, color: RGBColor): """Solid background fill for a slide.""" bg = slide.background fill = bg.fill fill.solid() fill.fore_color.rgb = color def add_rect(slide, x, y, w, h, color: RGBColor, alpha=None): shape = slide.shapes.add_shape(1, x, y, w, h) shape.line.fill.background() shape.fill.solid() shape.fill.fore_color.rgb = color return shape def add_text(slide, text, x, y, w, h, font_name="Calibri", size=24, bold=False, color=WHITE, align=PP_ALIGN.LEFT, anchor=MSO_ANCHOR.TOP, italic=False): tb = slide.shapes.add_textbox(x, y, w, h) tf = tb.text_frame tf.word_wrap = True tf.vertical_anchor = anchor tf.margin_left = 0; tf.margin_right = 0 tf.margin_top = 0; tf.margin_bottom = 0 p = tf.paragraphs[0] p.alignment = align run = p.add_run() run.text = text run.font.name = font_name run.font.size = Pt(size) run.font.bold = bold run.font.italic = italic run.font.color.rgb = color return tb def gradient_rect_xml(slide, x, y, w, h, color1: RGBColor, color2: RGBColor): """Add a shape with a linear gradient (left→right).""" shape = slide.shapes.add_shape(1, x, y, w, h) shape.line.fill.background() fill = shape.fill fill.gradient() fill.gradient_angle = 90.0 # left → right in pptx degrees gs = fill.gradient_stops gs[0].position = 0.0 gs[0].color.rgb = color1 gs[1].position = 1.0 gs[1].color.rgb = color2 return shape # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 1 – TITLE SLIDE # ═════════════════════════════════════════════════════════════════════════════ s1 = prs.slides.add_slide(blank) fill_slide(s1, DARK_BG) # Big decorative circle (top-right) circle = s1.shapes.add_shape(9, Inches(9.8), Inches(-1.5), Inches(5.5), Inches(5.5)) circle.line.fill.background() circle.fill.solid(); circle.fill.fore_color.rgb = RGBColor(0x1A, 0x26, 0x42) # Smaller circle overlap circle2 = s1.shapes.add_shape(9, Inches(10.8), Inches(-0.6), Inches(3.5), Inches(3.5)) circle2.line.fill.background() circle2.fill.solid(); circle2.fill.fore_color.rgb = RGBColor(0x4F, 0x8E, 0xF8) # make it semi-transparent via XML sp_xml = circle2._element solidFill = sp_xml.find('.//' + qn('a:solidFill')) if solidFill is not None: alpha_elem = etree.SubElement(solidFill.find(qn('a:srgbClr')), qn('a:alpha')) alpha_elem.set('val', '20000') # 20% opacity # Accent gradient bar (left side) gradient_rect_xml(s1, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) # Bottom accent line gradient_rect_xml(s1, Inches(0), Inches(7.2), W, Inches(0.04), ACCENT, ACCENT2) # Eyebrow label add_text(s1, "PRESENTATION TEMPLATE", Inches(0.55), Inches(2.2), Inches(9), Inches(0.4), size=10, color=ACCENT, bold=True, italic=False) # Title add_text(s1, "Your Presentation Title", Inches(0.55), Inches(2.75), Inches(9.5), Inches(1.6), size=52, bold=True, color=WHITE, anchor=MSO_ANCHOR.MIDDLE) # Subtitle add_text(s1, "Subtitle · Author Name · Date", Inches(0.55), Inches(4.5), Inches(9), Inches(0.6), size=18, color=LIGHT_GREY) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 2 – AGENDA / TABLE OF CONTENTS # ═════════════════════════════════════════════════════════════════════════════ s2 = prs.slides.add_slide(blank) fill_slide(s2, DARK_BG) # Left panel add_rect(s2, Inches(0), Inches(0), Inches(4.2), H, CARD_BG) gradient_rect_xml(s2, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) add_text(s2, "AGENDA", Inches(0.3), Inches(0.4), Inches(3.5), Inches(0.5), size=11, color=ACCENT, bold=True) add_text(s2, "What we'll\ncover today", Inches(0.3), Inches(0.9), Inches(3.5), Inches(1.8), size=30, bold=True, color=WHITE) add_text(s2, "A brief overview of the\nkey topics in this deck.", Inches(0.3), Inches(2.9), Inches(3.4), Inches(1.2), size=13, color=MID_GREY) # Right panel – agenda items items = [ ("01", "Introduction", "Background and context"), ("02", "Key Findings", "Data, insights, and analysis"), ("03", "Recommendations", "Proposed next steps"), ("04", "Q & A", "Open discussion"), ] start_y = Inches(1.0) for num, title, sub in items: y = start_y # number pill pill = s2.shapes.add_shape(9, Inches(4.6), y + Inches(0.08), Inches(0.55), Inches(0.55)) pill.line.fill.background() pill.fill.solid(); pill.fill.fore_color.rgb = ACCENT add_text(s2, num, Inches(4.6), y + Inches(0.05), Inches(0.55), Inches(0.6), size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) add_text(s2, title, Inches(5.35), y, Inches(7.5), Inches(0.38), size=16, bold=True, color=WHITE) add_text(s2, sub, Inches(5.35), y + Inches(0.38), Inches(7.5), Inches(0.3), size=12, color=MID_GREY) # divider add_rect(s2, Inches(4.6), y + Inches(0.78), Inches(8.4), Inches(0.01), MID_GREY) start_y += Inches(1.4) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 3 – SECTION TITLE DIVIDER # ═════════════════════════════════════════════════════════════════════════════ s3 = prs.slides.add_slide(blank) fill_slide(s3, DARK_BG) gradient_rect_xml(s3, Inches(0), Inches(0), W, Inches(0.05), ACCENT, ACCENT2) gradient_rect_xml(s3, Inches(0), H - Inches(0.05), W, Inches(0.05), ACCENT, ACCENT2) add_text(s3, "01", Inches(1), Inches(1.5), Inches(11), Inches(2.2), size=110, bold=True, color=RGBColor(0x1A, 0x26, 0x42), align=PP_ALIGN.CENTER) add_text(s3, "SECTION TITLE", Inches(1), Inches(2.8), Inches(11), Inches(1.2), size=42, bold=True, color=WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) add_text(s3, "Short supporting description goes here", Inches(2), Inches(4.3), Inches(9), Inches(0.6), size=16, color=MID_GREY, align=PP_ALIGN.CENTER) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 4 – CONTENT SLIDE (bullet points) # ═════════════════════════════════════════════════════════════════════════════ s4 = prs.slides.add_slide(blank) fill_slide(s4, DARK_BG) # Top bar add_rect(s4, Inches(0), Inches(0), W, Inches(1.1), CARD_BG) gradient_rect_xml(s4, Inches(0), Inches(1.08), W, Inches(0.025), ACCENT, ACCENT2) gradient_rect_xml(s4, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) add_text(s4, "Slide Title Goes Here", Inches(0.35), Inches(0.15), Inches(10), Inches(0.75), size=28, bold=True, color=WHITE, anchor=MSO_ANCHOR.MIDDLE) add_text(s4, "SECTION 01", Inches(11.5), Inches(0.25), Inches(1.7), Inches(0.4), size=9, color=ACCENT, bold=True, align=PP_ALIGN.RIGHT) bullets = [ "Key point one – concise and impactful statement", "Key point two – supporting data or finding", "Key point three – actionable insight", "Key point four – conclusion or recommendation", ] tb = s4.shapes.add_textbox(Inches(0.55), Inches(1.35), Inches(8.5), Inches(5.5)) tf = tb.text_frame tf.word_wrap = True for i, b in enumerate(bullets): p = tf.paragraphs[0] if i == 0 else tf.add_paragraph() p.space_before = Pt(10) p.space_after = Pt(4) run = p.add_run() run.text = " • " + b run.font.name = "Calibri" run.font.size = Pt(17) run.font.color.rgb = LIGHT_GREY # Side accent card card = s4.shapes.add_shape(1, Inches(9.5), Inches(1.35), Inches(3.5), Inches(5.5)) card.line.fill.background() card.fill.solid(); card.fill.fore_color.rgb = CARD_BG add_text(s4, "Key Insight", Inches(9.65), Inches(1.55), Inches(3.2), Inches(0.5), size=13, bold=True, color=ACCENT) add_text(s4, "Place a supporting stat, quote, or visual description here to reinforce the main message.", Inches(9.65), Inches(2.1), Inches(3.1), Inches(3.0), size=13, color=LIGHT_GREY) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 5 – THREE-COLUMN CARDS # ═════════════════════════════════════════════════════════════════════════════ s5 = prs.slides.add_slide(blank) fill_slide(s5, DARK_BG) add_rect(s5, Inches(0), Inches(0), W, Inches(1.1), CARD_BG) gradient_rect_xml(s5, Inches(0), Inches(1.08), W, Inches(0.025), ACCENT, ACCENT2) gradient_rect_xml(s5, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) add_text(s5, "Three Column Layout", Inches(0.35), Inches(0.15), Inches(10), Inches(0.75), size=28, bold=True, color=WHITE, anchor=MSO_ANCHOR.MIDDLE) cols = [ ("💡", "Idea", ACCENT, "Describe your first concept, pillar, or category here clearly."), ("📊", "Data", RGBColor(0x7C,0x5C,0xF5), "Add supporting numbers, metrics, or evidence for this point."), ("🚀", "Action", RGBColor(0x2E,0xBD,0x9A), "State the next step or recommendation for this column."), ] card_w = Inches(3.8) card_h = Inches(5.2) start_x = Inches(0.5) gap = Inches(0.35) for i, (icon, title, clr, body) in enumerate(cols): cx = start_x + i * (card_w + gap) cy = Inches(1.35) card_shape = s5.shapes.add_shape(1, cx, cy, card_w, card_h) card_shape.line.fill.background() card_shape.fill.solid(); card_shape.fill.fore_color.rgb = CARD_BG # top accent stripe stripe = s5.shapes.add_shape(1, cx, cy, card_w, Inches(0.07)) stripe.line.fill.background(); stripe.fill.solid(); stripe.fill.fore_color.rgb = clr # icon add_text(s5, icon, cx + Inches(0.2), cy + Inches(0.2), card_w - Inches(0.3), Inches(0.7), size=28, color=WHITE) # title add_text(s5, title, cx + Inches(0.2), cy + Inches(1.0), card_w - Inches(0.3), Inches(0.5), size=20, bold=True, color=WHITE) # body add_text(s5, body, cx + Inches(0.2), cy + Inches(1.65), card_w - Inches(0.4), Inches(3.0), size=13, color=MID_GREY) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 6 – STATS / BIG NUMBERS # ═════════════════════════════════════════════════════════════════════════════ s6 = prs.slides.add_slide(blank) fill_slide(s6, DARK_BG) gradient_rect_xml(s6, Inches(0), Inches(0), W, Inches(0.06), ACCENT, ACCENT2) gradient_rect_xml(s6, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) add_text(s6, "By the Numbers", Inches(0.5), Inches(0.3), Inches(12), Inches(0.7), size=32, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_text(s6, "Key metrics and highlights at a glance", Inches(0.5), Inches(1.0), Inches(12), Inches(0.5), size=15, color=MID_GREY, align=PP_ALIGN.CENTER) stats = [ ("95%", "Satisfaction Rate", ACCENT), ("3×", "Faster Delivery", RGBColor(0x7C,0x5C,0xF5)), ("$2M+", "Revenue Generated", RGBColor(0x2E,0xBD,0x9A)), ] stat_w = Inches(3.6) for i, (val, label, clr) in enumerate(stats): sx = Inches(0.9) + i * Inches(4.2) sy = Inches(2.0) bg = s6.shapes.add_shape(1, sx, sy, stat_w, Inches(3.5)) bg.line.fill.background(); bg.fill.solid(); bg.fill.fore_color.rgb = CARD_BG # bottom accent stripe bs = s6.shapes.add_shape(1, sx, sy + Inches(3.43), stat_w, Inches(0.07)) bs.line.fill.background(); bs.fill.solid(); bs.fill.fore_color.rgb = clr add_text(s6, val, sx, sy + Inches(0.4), stat_w, Inches(1.6), size=54, bold=True, color=clr, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) add_text(s6, label, sx, sy + Inches(2.1), stat_w, Inches(1.0), size=16, color=LIGHT_GREY, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 7 – THANK YOU / END SLIDE # ═════════════════════════════════════════════════════════════════════════════ s7 = prs.slides.add_slide(blank) fill_slide(s7, DARK_BG) # Background decorative large number add_text(s7, "✦", Inches(0), Inches(-0.5), W, H + Inches(1), size=300, color=RGBColor(0x1A, 0x26, 0x42), align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) gradient_rect_xml(s7, Inches(0), Inches(0), Inches(0.06), H, ACCENT, ACCENT2) gradient_rect_xml(s7, Inches(0), H - Inches(0.05), W, Inches(0.05), ACCENT, ACCENT2) add_text(s7, "Thank You", Inches(0.5), Inches(2.3), Inches(12.3), Inches(1.8), size=64, bold=True, color=WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE) add_text(s7, "yourname@email.com · linkedin.com/in/yourprofile · +1 (000) 000-0000", Inches(0.5), Inches(4.4), Inches(12.3), Inches(0.6), size=14, color=MID_GREY, align=PP_ALIGN.CENTER) # Divider line add_rect(s7, Inches(4.5), Inches(4.2), Inches(4.3), Inches(0.015), ACCENT) # ───────────────────────────────────────────────────────────────────────────── # SAVE # ───────────────────────────────────────────────────────────────────────────── out = "/tmp/workspace/ppt-template/NiceTemplate.pptx" buf = BytesIO() prs.save(buf) with open(out, "wb") as f: f.write(buf.getvalue()) print(f"Saved to {out}") PYEOF python /tmp/workspace/ppt-template/create_template.py

Your template is ready! Here it is:

NiceTemplate

Presentation · PPTX


What's inside - 7 slides

#SlideDescription
1Title SlideDark navy background, large bold title, decorative circles, gradient accent bar
2AgendaLeft panel with intro text + 4 numbered agenda items on the right
3Section DividerFull-width divider with big section number and title - use between major sections
4Content SlideBullet list on the left + a "Key Insight" card on the right
5Three-Column CardsThree icon-led cards side by side, each with a color-coded top stripe
6Stats / Big NumbersThree large metric boxes with values and labels
7Thank You / EndClean closing slide with contact details

Color scheme: Deep navy (#0F172A) background with bright blue (#4F8EF8) and purple (#7C5CF5) accents, plus teal (#2EBD9A) for a third color.
To customize, just swap out the placeholder text (titles, bullets, stats, contact info) with your own content. Let me know if you'd like a different color scheme, more slides, or a specific topic filled in!
This is a shared conversation. Sign in to Orris to start your own chat.