Struct sublercli::Subler [−][src]
pub struct Subler { pub source: String, pub dest: Option<String>, pub optimize: bool, pub atoms: Atoms, pub media_kind: Option<MediaKind>, }
Fields
source: String
The path to the source file
dest: Option<String>
The path to the destination file
optimize: bool
The Subler optimization flag
atoms: Atoms
The atoms that should be written to the file
media_kind: Option<MediaKind>
The Mediakind of the file
Methods
impl Subler
[src]
impl Subler
pub fn new(source: &str, atoms: Atoms) -> Self
[src]
pub fn new(source: &str, atoms: Atoms) -> Self
creates a new SublerCli Interface with a set of Atoms that
should be set to the the file at the source
By default MediaKind is set to MediaKind::Movie
and
optimization level is set to true
pub fn cli_executeable() -> String
[src]
pub fn cli_executeable() -> String
returns the path to the sublercli executeable
Assumes a homebrew installtion by default under /usr/local/bin/SublerCli
,
can be overwritten setting the SUBLER_CLI_PATH
env variable
pub fn spawn_tag(&mut self) -> Result<Child>
[src]
pub fn spawn_tag(&mut self) -> Result<Child>
Executes the tagging command as a child process, returning a handle to it.
pub fn build_tag_command(&mut self) -> Result<Command>
[src]
pub fn build_tag_command(&mut self) -> Result<Command>
create the subler process command
pub fn tag(&mut self) -> Result<Output>
[src]
pub fn tag(&mut self) -> Result<Output>
Apply the specified metadata to the source file and output it to the specified destination file
pub fn optimize(&mut self, val: bool) -> &mut Self
[src]
pub fn optimize(&mut self, val: bool) -> &mut Self
sets the optimization flag
pub fn media_kind(&mut self, kind: Option<MediaKind>) -> &mut Self
[src]
pub fn media_kind(&mut self, kind: Option<MediaKind>) -> &mut Self
pub fn dest(&mut self, dest: &str) -> &mut Self
[src]
pub fn dest(&mut self, dest: &str) -> &mut Self
sets the destination of the output file