Skip to content

A Rust IPC client crate for tev, the exf image viewer!

Notifications You must be signed in to change notification settings

KarelPeeters/tev_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tev-client

crates.io docs.rs

This Rust crate implements a IPC TCP client for tev. It enables programmatic control of the images displayed by tev using a convenient and safe Rust api.

Supports all existing tev commands:

Example code:

use tev_client::{TevClient, TevError, PacketCreateImage};

fn main() -> Result<(), TevError> {
    // Spawn a tev instance, this command assumes tev is on the PATH.
    // There are other constructors available too, see TevClient::spawn and TevClient::wrap.
    let mut client = TevClient::spawn_path_default()?;

    // Create a new image
    client.send(PacketCreateImage {
        image_name: "test",
        grab_focus: false,
        width: 1920,
        height: 1080,
        channel_names: &["R", "G", "B"],
    })?;

    Ok(())
}

About

A Rust IPC client crate for tev, the exf image viewer!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages