Metadata-Version: 2.4
Name: social-card
Version: 0.2.1
Summary: Generate beautiful social card images (OG, Twitter, GitHub) with a builder API
Author-email: Humanjava Enterprises <hello@humanjava.com>
License-Expression: MIT
Project-URL: Homepage, https://huje.tools
Project-URL: Repository, https://github.com/HumanjavaEnterprises/huje.socialcard.OC-python.src
Project-URL: Documentation, https://huje.tools
Keywords: og-image,social-card,opengraph,twitter-card,image-generation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0
Dynamic: license-file

# social-card

Generate beautiful social card images with a builder API. One dependency: Pillow.

Built by [humanjava.com](https://humanjava.com) — find this and other tools for the agentic age at [huje.tools](https://huje.tools).

## Install

```bash
pip install social-card
```

## Quick Start

```python
from social_card import SocialCard

SocialCard("og").title("My Project").subtitle("A cool tool").render("card.png")
```

## Full Example

```python
(SocialCard("og", theme="midnight")
    .badge("Open Source")
    .title("My Project")
    .subtitle("Deploy in seconds")
    .cards(["Python", "Pillow", "MIT"])
    .footer("myproject.dev")
    .accent("#f97316")
    .grid()
    .glow()
    .render("card.png"))
```

## Presets

| Preset   | Size      | Use Case          |
|----------|-----------|-------------------|
| `og`     | 1200×630  | Open Graph / link previews |
| `twitter`| 800×418   | Twitter/X cards   |
| `github` | 1280×640  | GitHub social preview |
| `square` | 1080×1080 | Instagram / social |

## Themes

- `dark` — Navy background, blue accent
- `light` — White background, blue accent
- `midnight` — Near-black, purple accent

## API

```python
card = SocialCard(preset, theme)   # preset: str or Preset, theme: str or Theme
card.badge("text")                 # Small pill at top
card.title("text")                 # Main heading
card.subtitle("text")              # Subheading
card.cards(["a", "b", "c"])        # Tag chips
card.footer("text")                # Bottom text
card.accent("#hex")                # Override accent color
card.grid()                        # Subtle grid overlay
card.glow()                        # Radial glow effect
card.render("path.png")            # Save to file, returns Image
card.render_bytes()                # Returns PNG bytes
```

## ClawHub

```bash
clawhub install social-card
```

## License

MIT
