pub enum Commands {
Match(MatchArgs),
Convert(ConvertArgs),
DetectEncoding(DetectEncodingArgs),
Sync(SyncArgs),
Config(ConfigArgs),
GenerateCompletion(GenerateCompletionArgs),
Cache(CacheArgs),
}Expand description
Available subcommands for the SubX CLI application.
Each variant represents a specific operation that can be performed by the SubX tool, with associated argument structures that define the parameters and options for that operation.
§Command Categories
§Core Processing Commands
Match- AI-powered subtitle matching and renamingConvert- Format conversion between subtitle standardsSync- Audio-subtitle synchronization and timing adjustment
§Utility Commands
DetectEncoding- Character encoding detection and conversionConfig- Configuration management and inspectionCache- Cache management and dry-run inspectionGenerateCompletion- Shell completion script generation
§Examples
use subx_cli::cli::{Commands, MatchArgs};
use std::path::PathBuf;
let match_command = Commands::Match(MatchArgs {
path: PathBuf::from("videos/"),
dry_run: true,
confidence: 80,
recursive: false,
backup: false,
copy: false,
move_files: false,
});Variants§
Match(MatchArgs)
AI-powered subtitle file matching and intelligent renaming.
Uses artificial intelligence to analyze video and subtitle files, matching them based on content similarity and automatically renaming subtitle files to match their corresponding videos.
Convert(ConvertArgs)
Convert subtitle files between different formats.
Supports conversion between popular subtitle formats including SRT, ASS, VTT, and others with format-specific options.
DetectEncoding(DetectEncodingArgs)
Detect and convert character encoding of subtitle files.
Automatically detects the character encoding of subtitle files and optionally converts them to UTF-8 for better compatibility.
Sync(SyncArgs)
Synchronize subtitle timing with audio tracks.
Analyzes audio content and adjusts subtitle timing to match dialogue and speech patterns in the audio track.
Config(ConfigArgs)
Manage and inspect application configuration.
Provides tools for viewing, validating, and managing SubX configuration settings from various sources.
GenerateCompletion(GenerateCompletionArgs)
Generate shell completion scripts.
Creates completion scripts for various shells (bash, zsh, fish) to enable tab completion for SubX commands and arguments.
Cache(CacheArgs)
Manage cache and inspect dry-run results.
Provides utilities for examining cached results, clearing cache data, and inspecting the effects of dry-run operations.
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.