Files
vectorcraft/apps/vectorcraft-cli/tests/it/main.rs
T
dotCooCoo b12c27e518 Linux: file managers show thumbnails of VectorCraft documents
The deb, rpm and tar.gz packages install
share/thumbnailers/ai.storyteller.vectorcraft.thumbnailer for
application/x-vectorcraft and application/x-vectorcraft-template. It runs
the new `vectorcraft-cli thumbnail --size N IN OUT`, which opens the
document as the app does and writes an 8-bit RGBA PNG of the first
artboard, N pixels (1 to 1024, default 256) on its longer side.

A file larger than 256 MiB, one that can't be opened, a document that
shows nothing, or a run longer than 20 seconds writes no PNG and exits
non-zero, so the file manager keeps the file's icon. The Nightly deb and
rpm leave the entry out, as they leave out the MIME package.

The render moves into vectorcraft_render::encode::first_artboard, which
the embedded native preview also uses.
2026-11-28 02:39:17 -08:00

18 lines
680 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! Integration tests: one test binary for the crate, one module per area.
// Unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
mod cli;
mod fileio;
mod mcp_e2e;
mod script;
mod thumbnail;
/// Nextest relocates archived binaries; Cargo's compile-time path still names the build runner.
fn bin() -> std::path::PathBuf {
std::env::var_os("NEXTEST_BIN_EXE_vectorcraft_cli")
.or_else(|| std::env::var_os("CARGO_BIN_EXE_vectorcraft-cli"))
.map(std::path::PathBuf::from)
.unwrap_or_else(|| env!("CARGO_BIN_EXE_vectorcraft-cli").into())
}