sublercli-rs
A simple commandline interface for the sublerCLI tool on mac OSto write metadata to media files
Installation
Requires an additional SublerCLI Installation.
To install with homebrew: brew cask install sublercli
By default sublercli-rs
assumes a homebrew
installation under /usr/local/bin/SublerCli
You can check your installtion path with brew cask info sublercli
If the SublerCLI installation destination deviates from default, you can overwerite the path
by setting the SUBLER_CLI_PATH
environment variable to the valid destination.
Atoms
To store metadata, Atoms are used. An Atom has a specifc name and the value it stores.
The Atom
struct mimics this behavior. There is a predefined set of valid atoms.
To obtain a list of al valid metadata atom tag names:
use Atoms;
let valid_tags: = metadata_tags;
Support for the predefined set of known atoms is individually implemented. Atoms
functions as a wrapper to store a set of single Atom
values and is used to create Atoms like:
use *;
let atoms = new
.add
.genre
.artist
.title
.release_date
.build;
Tagging
To invoke the SublerCLI process:
If no dest path is supplied then the destination path is the existing file name suffixed, starting from 0: demo.mp4 -> demo.0.mp4
use *;
let file = "demo.mp4";
let subler = new
// by default, mediakind is already set to `Movie`
.media_kind
// set an optional destination path
.dest
// by default the optimization flag is set to true
.optimize
// execute prcess in sync,
// alternativly spawn the process: `.spawn_tag()`
.tag
.and_then;