Metadata-Version: 2.4
Name: screenshot-framer
Version: 0.1.0
Summary: A robust, Pillow-based alternative to fastlane frameit for composing premium mobile marketing screenshots.
Home-page: https://github.com/ahmedtikiwa/screenshot-framer
Author: Ahmed Tikiwa
Author-email: hello@ahmedtikiwa.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: Pillow>=9.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# screenshot-framer

A robust, Python-based CLI tool to composite premium marketing screenshots for iOS and Android applications. 

`screenshot-framer` was built as a lightweight, flexible alternative to `fastlane frameit`. It bypasses the common system-level ImageMagick/FreeType font rendering failures by relying entirely on Python's self-contained `Pillow` library for image composition, device rounding, drop shadows, and responsive text overlay.

## Features

- **No ImageMagick Required**: Pure Python image manipulation using `Pillow`.
- **Dynamic Text Scaling**: Automatically scales down long titles so they never clip off the edge of your marketing canvas.
- **Modern Device Styling**: Instead of forcing clunky hardware bezels onto your UI, it elegantly rounds the corners of your raw screenshots and applies a premium Gaussian drop-shadow, floating it over your chosen background.
- **Fastlane Compatible**: Can parse your existing `title.strings` and `keyword.strings` files directly.

## Installation

```bash
pip install screenshot-framer
```

## Usage

Create a configuration JSON file (e.g. `framer_config.json`) in your project:

```json
{
  "base_dir": "./fastlane/metadata/android/en-US",
  "background": "./fastlane/metadata/android/en-US/background.png",
  "title_font": "/System/Library/Fonts/SFCompact.ttf",
  "keyword_font": "/System/Library/Fonts/SFCompact.ttf",
  "title_color": "#ffffff",
  "keyword_color": "#c8c8c8",
  "device_radius_phone": 80,
  "device_radius_tablet": 60,
  "shadow_radius": 50,
  "shadow_opacity": 150,
  "fallback_title": "Upnext",
  "default_disclaimer": "TV SHOW METADATA PROVIDED BY TVMAZE.COM"
}
```

Then run the tool from your terminal:

```bash
screenshot-framer --config framer_config.json
```

## How It Works

1. **Discovery**: The script scans the `base_dir/images/phoneScreenshots` and `tenInchScreenshots` directories.
2. **Matching**: It maps your raw screenshots to the translated strings in `title.strings`.
3. **Compositing**: It scales your background, frames your screenshot with rounded corners, adds a premium drop shadow, and responsively fits your Title and Keyword text.
4. **Export**: It outputs `_framed.png` files ready for the App Store and Google Play.

## Automating PyPI Deployment via GitHub Actions

This library uses GitHub Actions for CI/CD. To deploy updates automatically:
1. Make sure you have created an account on [PyPI.org](https://pypi.org).
2. Set up [Trusted Publishers](https://docs.pypi.org/trusted-publishers/) on PyPI for your GitHub repository (this means you don't need any passwords/secrets).
3. Push a new GitHub Release (e.g., `v0.1.1`), and the `.github/workflows/publish.yml` action will automatically build and publish the wheel to PyPI.
