Social Screenshot Creator
Generates realistic, high-resolution (2x Retina) screenshots of social media posts for LinkedIn (light theme), Threads (dark theme), and X / Twitter (black theme).
All 3 platforms are rendered simultaneously via Playwright from a single post text input, with optional comment thread captures.
⚡ Quickstart
Prerequisites
pip install playwright pillow
playwright install chromium
Basic Generation
python3 scripts/generate_screenshot.py \
--text "Your post content goes here. Paragraph breaks are preserved.\n\nKey takeaways: ..."
Outputs 3 high-res images in ./screenshots/YYYY-MM-DD_slug/:
linkedin_post.png(LinkedIn Light card)threads_post.png(Threads Dark card)x_post.png(X.com Black card)
With Custom Persona & Avatar
python3 scripts/generate_screenshot.py \
--text "AI engineering is shifting from prompt-tuning to deterministic governance loops." \
--name "Sarah Connor" \
--handle "sarahconnor" \
--title "Robotics & AI Lead" \
--avatar "path/to/custom_avatar.jpg" \
--output-dir "./output"
With Attached Comment Variant
python3 scripts/generate_screenshot.py \
--text "Main post text..." \
--comment "First follow-up comment or link drop..."
This produces an additional 3 images capturing the post with its first threaded reply.
🛠️ CLI Flags & Options
| Argument | Default | Description |
|---|---|---|
--text |
(Required) | Full body text of the post. |
--comment |
None |
Optional follow-up comment text. |
--name |
Alex Rivers |
Author display name. |
--handle |
alexrivers |
Social handle (without @). |
--title |
AI Engineer & Systems Architect |
Author headline / bio title. |
--avatar |
assets/default_avatar.png |
Path to author avatar image. |
--output-dir |
./screenshots |
Destination directory. |
--li-time |
1d |
Timestamp displayed on LinkedIn card. |
--threads-time |
2h |
Timestamp displayed on Threads card. |
--x-time |
May 1 |
Timestamp displayed on X card. |
🎨 Rendering Engine
Uses headless Chromium via Playwright to snapshot semantic HTML/CSS templates at device_scale_factor=2 for crisp Retina display on mobile feeds and blogs.