diff --git a/examples/linkedin_carousel_v10.py b/examples/linkedin_carousel_v10.py new file mode 100644 index 0000000..f177d4f --- /dev/null +++ b/examples/linkedin_carousel_v10.py @@ -0,0 +1,818 @@ +#!/usr/bin/env python3 +""" +LinkedIn Carousel V10 - BOLD DESIGN +- Background elements at 20-25% opacity (actually visible) +- Hero visual element on each wrapper slide +- Confident, not subtle +- Remove clutter, keep impact +""" + +import sys +import base64 +sys.path.insert(0, '/home/tech_scaile_it/openfigma') + +from openfigma import PNGExporter + +WIDTH = 1080 +HEIGHT = 1350 + +def load_template_b64(name): + with open(f'/home/tech_scaile_it/openfigma/exports/premium/{name}.png', 'rb') as f: + return base64.b64encode(f.read()).decode() + +LOGO_SMALL = '''''' + +NOISE_SVG = "data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E" + +# ============================================ +# SLIDE 1: HOOK - Giant "?" as hero +# ============================================ +SLIDE_1 = f""" +
+
+
+
?
+
+ +
+
01 / 08
+
+
+ + Open Source +
+

+ My designer
+ quit
+ so I built this +

+

She got a full-time offer.
I needed a solution fast.

+
+ + Swipe to see what I made +
+
+ +
+""" + +# ============================================ +# SLIDE 2: PROBLEM - Big numbers on cards +# ============================================ +SLIDE_2 = f""" +
+
+
×
+ +
+
02 / 08
+
+
The Problem
+

Design tools
are broken

+
+
+
+
01
+

Steep learning curve

Weeks to learn Figma or Canva properly

+
+
+
02
+

Expensive templates

$20-50 per pack, subscriptions add up

+
+
+
03
+

Manual repetition

Copy, paste, tweak, export... every time

+
+
+
04
+

Designer dependency

Need someone for every visual asset

+
+
+ +
+""" + +# ============================================ +# SLIDE 3: SOLUTION - Giant logo as hero +# ============================================ +SLIDE_3 = f""" +
+
+
openfigma
+ +
+
03 / 08
+
+
+
+ +
+

Meet openfigma

+

Code-first design library.
Write Python → Get Figma-quality graphics.

+
+ 100% Open Source + No design skills needed + Python + HTML/CSS + Instant PNG export +
+
+ $ + pip install openfigma +
+
+ +
+""" + +# ============================================ +# SLIDE 7: CODE - Bold "4", clean window +# ============================================ +SLIDE_7 = f""" +
+
+
4
+ +
+
07 / 08
+
+
How It Works
+

4 lines of Python

+
+
+
+
+ create_post.py +
+
+
1from openfigma import html_to_png
+
2
+
3html = "<your template>"
+
4html_to_png(html, "post.png")
+
+
+
+
+

Ready to post

→ post.png

+
+ +
+""" + +# ============================================ +# SLIDE 8: CTA - Engagement box as hero, no rings +# ============================================ +SLIDE_8 = f""" +
+
+
+
+ +
+
08 / 08
+
+
+ +
+

Try it.
It's free.

+

No signup. No waitlist. No BS.

+
+ + github.com/federicodeponte/openfigma +
+ +
+
MIT License
+
Free forever
+
pip install
+
+
+ +
+""" + +# ============================================ +# Template slide generator +# ============================================ +def make_template_slide(num, total, img_b64, template_name, description): + return f""" +
+
+
+
{num:02d} / {total:02d}
+
+
Premium Template
+

{template_name}

+
+
+
{description}
+
+
+ +
+""" + +def main(): + import os + + output_dir = "/home/tech_scaile_it/openfigma/exports/linkedin_v10" + os.makedirs(output_dir, exist_ok=True) + + print("Loading premium templates...") + metric_b64 = load_template_b64('metric') + testimonial_b64 = load_template_b64('testimonial') + announcement_b64 = load_template_b64('announcement') + + print("Building V10 slides with BOLD design...") + + SLIDE_4 = make_template_slide(4, 8, metric_b64, "Metric Hero", "Big numbers that demand attention") + SLIDE_5 = make_template_slide(5, 8, testimonial_b64, "Social Proof", "Customer quotes that convert") + SLIDE_6 = make_template_slide(6, 8, announcement_b64, "Launch Announcement", "News that gets noticed") + + SLIDES = [ + ("01_hook", SLIDE_1), + ("02_problem", SLIDE_2), + ("03_solution", SLIDE_3), + ("04_metric", SLIDE_4), + ("05_testimonial", SLIDE_5), + ("06_announcement", SLIDE_6), + ("07_code", SLIDE_7), + ("08_cta", SLIDE_8), + ] + + print(f"Generating {len(SLIDES)} slides...") + print("-" * 40) + + with PNGExporter() as exporter: + for name, html in SLIDES: + output_path = f"{output_dir}/{name}.png" + exporter.export(html, output_path, width=WIDTH, height=HEIGHT) + print(f" ✓ {name}.png") + + print("-" * 40) + print("Done!") + +if __name__ == "__main__": + main() diff --git a/exports/linkedin_v10/01_hook.png b/exports/linkedin_v10/01_hook.png new file mode 100644 index 0000000..6990f23 Binary files /dev/null and b/exports/linkedin_v10/01_hook.png differ diff --git a/exports/linkedin_v10/02_problem.png b/exports/linkedin_v10/02_problem.png new file mode 100644 index 0000000..0a4f2bd Binary files /dev/null and b/exports/linkedin_v10/02_problem.png differ diff --git a/exports/linkedin_v10/03_solution.png b/exports/linkedin_v10/03_solution.png new file mode 100644 index 0000000..223b4e3 Binary files /dev/null and b/exports/linkedin_v10/03_solution.png differ diff --git a/exports/linkedin_v10/04_metric.png b/exports/linkedin_v10/04_metric.png new file mode 100644 index 0000000..d424f86 Binary files /dev/null and b/exports/linkedin_v10/04_metric.png differ diff --git a/exports/linkedin_v10/05_testimonial.png b/exports/linkedin_v10/05_testimonial.png new file mode 100644 index 0000000..ef7ee18 Binary files /dev/null and b/exports/linkedin_v10/05_testimonial.png differ diff --git a/exports/linkedin_v10/06_announcement.png b/exports/linkedin_v10/06_announcement.png new file mode 100644 index 0000000..c81119e Binary files /dev/null and b/exports/linkedin_v10/06_announcement.png differ diff --git a/exports/linkedin_v10/07_code.png b/exports/linkedin_v10/07_code.png new file mode 100644 index 0000000..e5d830e Binary files /dev/null and b/exports/linkedin_v10/07_code.png differ diff --git a/exports/linkedin_v10/08_cta.png b/exports/linkedin_v10/08_cta.png new file mode 100644 index 0000000..290c5f1 Binary files /dev/null and b/exports/linkedin_v10/08_cta.png differ