Zip release files in maven package

This commit is contained in:
2022-04-19 23:04:48 +02:00
parent bfb6cab62c
commit f70d1649a0
4 changed files with 85 additions and 31 deletions

View File

@@ -2,11 +2,12 @@
- Introduction
- Requirements
- Running
- config.yml example
- Configuration
- Additional parameters
### Introduction
This program helps changing audio and subtitle lines of mkv files.
This program helps to change audio and subtitle lines of mkv files.
### Requirements
@@ -15,32 +16,22 @@ This program helps changing audio and subtitle lines of mkv files.
### Running
Opening terminal / cmd in the directory of the jar and the config file and execute following command:
1. Extract downloaded archive
2. Copy `config-template.yaml` to `config.yaml`
3. Update `config.yaml` to fit your needs
4. Open terminal / cmd in the directory of the jar and the config file
5. Execute following commands:
1. (Optional) `java -jar mkvaudiosubtitleschanger.jar -l [path to mkv or dir with mkv] --safe-mode`
2. To permanently apply changes: `java -jar mkvaudiosubtitleschanger.jar -l [path to mkv or dir with mkv]`
`java -jar mkvaudiosubtitleschanger.jar -l [path to mkv or dir with mkv]`
### Configuration
### Additional arameters
These properties overwrite already existing values in the config file.
```properties
-c,--config path to config
-e,--exclude-directories <arg> Directories to exclude
-h,--help "for help this is" - Yoda
-i,--include-pattern <arg> Include files matching pattern
-k,--forcedKeywords <arg> Additional keywords to identify forced tracks"
-l,--library <arg> path to library
-s,--safe-mode Test run (no files will be changes)
-t,--threads <arg> thread count
```
### config.yml example
Config file needs to be placed in the same directory as the jar or path to config has to be passed via command line
argument.
The list of language configurations can be expanded. Use `OFF` if you want to turn of the audio or subtitle lane.
Players probably will display forced subtitles nonetheless.
```yaml
mkvtoolnixPath: C:\Program Files\MKVToolNix
# Recommendations for data stored on HDDs, increase when using SSDs
threads: 2
#forcedKeywords: ["forced", "signs"]
config:
1:
audio: ger
@@ -50,3 +41,19 @@ config:
subtitle: ger
```
Subtitle lanes recognized as forced will be set as one. Already existing ones will not be overwritten or changed.
### Additional arameters
These properties overwrite already existing values in the config file.
```properties
-c,--config <arg> Path to config file
-e,--exclude-directories <arg> Directories to be excluded, combines with config file
-h,--help "for help this is" - Yoda
-i,--include-pattern <arg> Include files matching pattern
-k,--forcedKeywords <arg> Additional keywords to identify forced tracks, combines with config file
-l,--library <arg> Path to library
-m,--mkvtoolnix <arg> Path to mkv tool nix installation
-s,--safe-mode Test run (no files will be changes)
-t,--threads <arg> thread count (default: 2)
-v,--version Display version
```

View File

@@ -1,10 +1,5 @@
mkvtoolnix: C:\Program Files\MKVToolNix
# Recommendations for data stored on HDDs, increase when using SSDs
threads: 2
#forcedKeywords: ["forced", "signs"]
#exclude-directories:
# - "D:/Path/To/File.mkv"
# - "D:/Path/To/Directory"
config:
1:
audio: ger
@@ -12,3 +7,12 @@ config:
2:
audio: eng
subtitle: ger
# Recommendations for data stored on HDDs, increase when using SSDs
#threads: 2
#forcedKeywords: ["forced", "signs"]
#exclude-directories:
# - "D:/Path/To/File.mkv"
# - "D:/Path/To/Directory"
#include-pattern: "regex"

25
maven/assembly.xml Normal file
View File

@@ -0,0 +1,25 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>true</includeBaseDirectory>
<formats>
<format>zip</format>
<format>tar</format>
</formats>
<files>
<file>
<source> ${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
<destName>${project.artifactId}.jar</destName>
<outputDirectory>/</outputDirectory>
</file>
<file>
<source>${project.basedir}/config-template.yaml</source>
<outputDirectory>/</outputDirectory>
</file>
<file>
<source></source>
</file>
</files>
</assembly>

20
pom.xml
View File

@@ -40,7 +40,6 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -88,6 +87,25 @@
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>maven/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>