Metadata-Version: 2.4
Name: markforge
Version: 0.1.2
Summary: Text watermark/stamp tool (CLI-first, GUI-ready).
Project-URL: Homepage, https://github.com/remgrandt/markforge
Project-URL: Repository, https://github.com/remgrandt/markforge
Author: Grant
License: Markforge License
        
        Copyright (c) 2026 Remgrandt
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated source code (the "Software"), to use and
        redistribute the Software in unmodified form only.
        
        The following conditions apply:
        
        1. The Software may be redistributed only in its original, unmodified form.
        2. Modification, adaptation, or creation of derivative works is not permitted.
        3. Forking this repository or redistributing modified versions is not permitted.
        4. This license does not grant permission to claim authorship or ownership
           of the Software.
        5. This license does not grant any trademark rights.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
License-File: LICENSE
Keywords: cli,image,pillow,typer,watermark
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
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
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: pillow>=10.0.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Provides-Extra: gui
Description-Content-Type: text/markdown

![Markforge banner](https://raw.githubusercontent.com/remgrandt/markforge/main/assets/logo.webp)

[![CI](https://github.com/remgrandt/markforge/actions/workflows/ci.yml/badge.svg)](https://github.com/remgrandt/markforge/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/markforge.svg)](https://pypi.org/project/markforge/)
[![Python](https://img.shields.io/pypi/pyversions/markforge.svg)](https://pypi.org/project/markforge/)

# Markforge

Markforge is a small, sharp tool for stamping images with text watermarks. It is CLI-first
and ships with a local GUI for batch workflows.

## Features

- Tiled or centered marks
- Opacity, angle, padding, offset, and blend modes
- Auto-scale text to the image or set a fixed font size
- Local GUI with live preview, system fonts, and batch export
- Output format inferred from extension (PNG/JPEG/WEBP/TIFF/BMP)

## Requirements

- Python 3.10+ (tested on 3.10-3.13)

## Install

```bash
pip install markforge
```

For development:

```bash
pip install -e ".[dev]"
```

## Quickstart (CLI)

Stamp a tiled watermark:

```bash
markforge watermark input.jpg output.jpg --text "DRAFT" --opacity 0.15 --angle -30 --tile
```

Or a single centered mark:

```bash
markforge watermark input.jpg output.jpg --text "DRAFT" --center --no-tile --scale 0.35
```

Show full help:

```bash
markforge --help
markforge watermark --help
```

Common options:

- `--text/-t` watermark text (required for useful output)
- `--opacity` in the 0..1 range
- `--angle` rotation in degrees
- `--fill` color (hex or named, via Pillow ImageColor)
- `--font` path to a .ttf/.otf font
- `--font-size` fixed point size
- `--scale` auto size as a fraction of the smaller image dimension (overrides `--font-size`)
- `--tile/--no-tile` and `--padding` spacing between tiles
- `--center` center a single watermark (use with `--no-tile`)
- `--offset` pixel offset as `x,y`
- `--blend` one of `normal`, `multiply`, `overlay`, `soft_light`
- `--antialias/--no-antialias` for rotated text smoothing

Notes:

- Output format is inferred from the output extension. Unknown extensions default to PNG.
- JPEG output is flattened to white because JPEG does not support alpha.
- If no font is provided, Markforge tries `DejaVuSans.ttf` and falls back to Pillow's default.

## GUI

Launch the local GUI (opens a browser tab by default):

```bash
markforge gui
```

Details:

- Binds to `127.0.0.1` by default and chooses a free port.
- Exports default to `./exports` unless you pick a folder or type a path.
- You can serve a custom UI with `--html path/to/index.html`.
- The "Pick" buttons use Tkinter; on minimal Linux installs you may need to add it, or
  use the built-in file picker and manual paths instead.

## Development

```bash
pytest
pytest --cov --cov-report=term-missing
ruff check .
```

## License

Markforge is free to use and redistribute in unmodified form only. Modification, forking,
and derivative works are not permitted. This is a source-available license. See `LICENSE`
for full terms.
