nix: set up project-wide formatter

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4806c58aa0a17f504c9312723ad770166a6a6964
This commit is contained in:
raf 2026-03-22 23:42:02 +03:00
commit 9e5eb41d39
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
78 changed files with 7406 additions and 2504 deletions

View file

@ -1,18 +1,23 @@
# HEIF/HEIC Support Plugin
This example plugin adds support for HEIF (High Efficiency Image Format) and HEIC (HEIF Container) to Pinakes.
This example plugin adds support for HEIF (High Efficiency Image Format) and
HEIC (HEIF Container) to Pinakes.
## Overview
HEIF is a modern image format that provides better compression than JPEG while maintaining higher quality. This plugin enables Pinakes to:
HEIF is a modern image format that provides better compression than JPEG while
maintaining higher quality. This plugin enables Pinakes to:
- Recognize HEIF/HEIC files as a media type
- Extract metadata from HEIF images
- Generate thumbnails from HEIF images
## Features
- **Media Type Registration**: Registers `.heif`, `.heic`, `.hif` extensions as image media types
- **EXIF Extraction**: Extracts EXIF metadata including camera info, GPS coordinates, timestamps
- **Media Type Registration**: Registers `.heif`, `.heic`, `.hif` extensions as
image media types
- **EXIF Extraction**: Extracts EXIF metadata including camera info, GPS
coordinates, timestamps
- **Thumbnail Generation**: Generates thumbnails in JPEG, PNG, or WebP format
- **Resource Limits**: Configurable memory and CPU limits for safe processing
- **Large Image Support**: Handles images up to 8192x8192 pixels
@ -95,6 +100,7 @@ impl ThumbnailGenerator for HeifPlugin {
## Dependencies
The plugin uses the following Rust crates (compiled to WASM):
- `libheif-rs`: HEIF decoding and encoding
- `image`: Image processing and thumbnail generation
- `kamadak-exif`: EXIF metadata parsing
@ -159,15 +165,19 @@ pinakes plugin install /path/to/heif-support
The plugin can be configured through the `config` section in `plugin.toml`:
### EXIF Extraction
- `extract_exif`: Enable EXIF metadata extraction (default: true)
### Thumbnail Generation
- `generate_thumbnails`: Enable thumbnail generation (default: true)
- `thumbnail_quality`: JPEG quality for thumbnails, 1-100 (default: 85)
- `thumbnail_format`: Output format - "jpeg", "png", or "webp" (default: "jpeg")
### Resource Limits
- `max_memory_mb`: Maximum memory the plugin can use in megabytes (default: 256, set in `[capabilities]`)
- `max_memory_mb`: Maximum memory the plugin can use in megabytes (default: 256,
set in `[capabilities]`)
- `max_width`: Maximum image width to process (default: 8192)
- `max_height`: Maximum image height to process (default: 8192)
@ -188,6 +198,7 @@ The plugin can be configured through the `config` section in `plugin.toml`:
### Sandboxing
The plugin runs in a WASM sandbox with:
- No access to host filesystem beyond granted paths
- No network access
- No arbitrary code execution
@ -210,6 +221,7 @@ The plugin runs in a WASM sandbox with:
## Error Handling
The plugin handles:
- **Corrupted Files**: Returns descriptive error
- **Unsupported Variants**: Gracefully skips unsupported HEIF features
- **Memory Limits**: Fails safely if image too large

View file

@ -1,10 +1,12 @@
# Markdown Metadata Extractor Plugin
This example plugin demonstrates how to create a metadata extractor plugin for Pinakes.
This example plugin demonstrates how to create a metadata extractor plugin for
Pinakes.
## Overview
The Markdown Metadata Extractor enhances Pinakes' built-in markdown support by:
- Parsing YAML and TOML frontmatter
- Extracting metadata from frontmatter fields
- Converting frontmatter tags to Pinakes media tags
@ -12,8 +14,10 @@ The Markdown Metadata Extractor enhances Pinakes' built-in markdown support by:
## Features
- **Frontmatter Parsing**: Supports both YAML (`---`) and TOML (`+++`) frontmatter formats
- **Tag Extraction**: Automatically extracts tags from frontmatter and applies them to media items
- **Frontmatter Parsing**: Supports both YAML (`---`) and TOML (`+++`)
frontmatter formats
- **Tag Extraction**: Automatically extracts tags from frontmatter and applies
them to media items
- **Custom Fields**: Preserves all frontmatter fields as custom metadata
- **Configuration**: Configurable via `plugin.toml` config section
@ -88,6 +92,7 @@ The plugin can be configured through the `config` section in `plugin.toml`:
## Security
This plugin has minimal capabilities:
- **Filesystem**: No write access, read access only to files being processed
- **Network**: Disabled
- **Environment**: No access