soundforge 0.1.0

License-aware discovery and verified archival of reusable music and sound effects
Documentation

SoundForge

SoundForge discovers and archives reusable music and game-oriented sound effects through official provider APIs. Version 0.1 uses Wikimedia Commons because it exposes original audio URLs, exact sizes, durations, MIME types, SHA-1 checksums, categories, creator attribution, and current per-file license metadata without requiring shared credentials.

SoundForge accepts only commercial-capable licenses by default: CC0, verified public domain, CC BY, and CC BY-SA. Unknown, noncommercial, no-derivatives, and legacy sampling licenses are rejected. Copyright status does not remove trademark, privacy, publicity, cultural, or personality-right restrictions; review each source page for your use case.

use soundforge::{ArchiveOptions, SoundForge, SoundKind, SoundTarget};

let forge = SoundForge::with_user_agent(
    "my-audio-tool/1.0 (contact@example.com)",
)?
.with_discovery_limit(20);

let sounds = forge.discover(
    &SoundTarget::Search("laser".into()),
    SoundKind::GameAudio,
)?;

let summary = forge.archive(&sounds[..1], &ArchiveOptions::default())?;
assert!(summary.is_success());
# Ok::<(), soundforge::SoundForgeError>(())

Targets include search:<query>, category:<Commons category>, file:<Commons file title>, a Commons file URL, top, and latest. Bare text is treated as a search. Music and game-audio kinds tune category searches and relevance scoring without pretending that a tag proves game provenance.

Search results are ranked by direct title/category relevance before cross-wiki usage count. Downloads are HTTPS-only from upload.wikimedia.org, streamed through staged files with a configurable byte cap, verified against Commons SHA-1, and recorded with a local BLAKE3 digest. soundforge-audio.json retains the source page, creator, exact license, attribution requirement, MIME type, duration, categories, and integrity evidence.

SoundForge does not scrape Commons pages or mirror its catalog. It uses batched Action API requests, a descriptive User-Agent, bounded result counts, and maxlag=5.

Development

cargo fmt
cargo test
cargo clippy --all-targets -- -D warnings