move mkdir -p
parent
ffb2c2bd34
commit
2071499feb
|
|
@ -1,12 +1,12 @@
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use core::cmp::Ordering;
|
use core::cmp::Ordering;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
pub fn clipify(input: &String) -> Result<Vec<String>, String> {
|
pub fn clipify(input: &String) -> Result<Vec<String>, String> {
|
||||||
match inspect(input) {
|
match inspect(input) {
|
||||||
Ok(inspection) => {
|
Ok(inspection) => {
|
||||||
let output_d = format!("{}.d", input);
|
let output_d = format!("{}.d", input);
|
||||||
fs::create_dir_all(&output_d).unwrap();
|
|
||||||
let ext = input.split(".").last().unwrap();
|
let ext = input.split(".").last().unwrap();
|
||||||
let mut result = vec![];
|
let mut result = vec![];
|
||||||
for i in 0..inspection.len() {
|
for i in 0..inspection.len() {
|
||||||
|
|
@ -21,6 +21,7 @@ pub fn clipify(input: &String) -> Result<Vec<String>, String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clip(output: &String, input: &String, content_span: ContentSpan) -> Result<(), String> {
|
pub fn clip(output: &String, input: &String, content_span: ContentSpan) -> Result<(), String> {
|
||||||
|
fs::create_dir_all(Path::new(output).parent().unwrap()).unwrap();
|
||||||
match std::process::Command::new("ffmpeg")
|
match std::process::Command::new("ffmpeg")
|
||||||
.args([
|
.args([
|
||||||
"-y",
|
"-y",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue