From 5aeddfa968a0a39a1bc0b5f366d68b4775591f54 Mon Sep 17 00:00:00 2001 From: RatzzFatzz Date: Thu, 21 Nov 2019 23:44:31 +0100 Subject: [PATCH] [IMPL] mkvtoolproperties --- .gitignore | 36 +++++ pom.xml | 167 ++++++++++++++++++++ src/main/java/Main.java | 5 + src/main/java/config/MKVToolProperties.java | 29 ++++ 4 files changed, 237 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/Main.java create mode 100644 src/main/java/config/MKVToolProperties.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da3d67b --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +/target/ +/.idea/ + +*.iml \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..7128918 --- /dev/null +++ b/pom.xml @@ -0,0 +1,167 @@ + + + 4.0.0 + + MKVAudioSubtilesChanger + MKVAudioSubtitlesChanger + 1.0-SNAPSHOT + + + clean package + src/main/java + src/test/java + + + src/main/resources + + + + + test/resources + + + + + + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.1 + + + + Main + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + package + + shade + + + false + false + + + *:* + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + org.codehaus.mojo + ideauidesigner-maven-plugin + 1.0-beta-1 + + + + javac2 + + + + + + true + true + true + + + + + + + + + com.intellij + forms_rt + 7.0.3 + + + org.projectlombok + lombok + 1.18.8 + provided + + + + org.apache.logging.log4j + log4j-api + 2.12.0 + + + org.apache.logging.log4j + log4j-core + 2.12.0 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.12.0 + + + org.slf4j + slf4j-log4j12 + 1.7.28 + test + + + org.slf4j + jcl-over-slf4j + 1.7.28 + + + org.slf4j + jul-to-slf4j + 1.7.28 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.9.9 + + + com.fasterxml.jackson.core + jackson-databind + 2.9.9 + + + + + org.junit.jupiter + junit-jupiter-api + 5.4.2 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.4.2 + test + + + + \ No newline at end of file diff --git a/src/main/java/Main.java b/src/main/java/Main.java new file mode 100644 index 0000000..6054a64 --- /dev/null +++ b/src/main/java/Main.java @@ -0,0 +1,5 @@ +public class Main { + public static void main(String[] args) { + + } +} diff --git a/src/main/java/config/MKVToolProperties.java b/src/main/java/config/MKVToolProperties.java new file mode 100644 index 0000000..36722b3 --- /dev/null +++ b/src/main/java/config/MKVToolProperties.java @@ -0,0 +1,29 @@ +package config; + +import lombok.extern.log4j.Log4j2; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +@Log4j2 +public class MKVToolProperties { + private String directoryPath; + private Path mkvmergePath; + private Path mkvpropeditPath; + + public MKVToolProperties() { + try(Stream stream = Files.lines(Paths.get("mkvDirectoryPath"))) { + directoryPath = stream.collect(Collectors.joining("\n")); + }catch(IOException e) { + log.fatal(e.getMessage()); + } + + mkvmergePath = Paths.get(directoryPath + "mkvmerge.exe"); + mkvpropeditPath = Paths.get(directoryPath + "mkvpropedit.exe"); + } + +}