Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
Added logger and options to start the program.
Browse files Browse the repository at this point in the history
  • Loading branch information
svbergmann committed Mar 31, 2022
1 parent 9e52147 commit 9ccf9e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions Script/execute_gro_pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@
LOG_STRING = '-log'
outputfolder = 'output'
inputfolder = 'input'
logoption = 'false'
logoption = 'true'

if len(sys.argv) > 0:
for i in range(len(sys.argv)):
i = 0
while i < len(sys.argv):
if i < len(sys.argv) - 1:
if sys.argv[i] == INPUT_FOLDER_STRING:
inputfolder = sys.argv[i + 1]
i += 1
elif sys.argv[i] == OUTPUT_FOLDER_STRING:
outputfolder = sys.argv[i + 1]
i += 1
elif sys.argv[i] == LOG_STRING:
logoption = sys.argv[i + 1]
i += 1
i += 1

subprocess.call(['java', '-jar', 'IHK_Abschlusspruefung.jar',
INPUT_FOLDER_STRING, inputfolder,
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ tasks.named('jar') {
'Main-Class': 'com.cae.de.Main',
'archivesBaseName': 'IHK_Abschlusspruefung')
}
delete "$buildDir/libs/execute_gro_pro.py"
doLast {
delete "$buildDir/libs/execute_gro_pro.py"
copy {
from("Script/execute_gro_pro.py")
into("$buildDir/libs")
Expand Down
4 changes: 2 additions & 2 deletions docs/IHK_Abschlussprüfung_Sven_Bergmann.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,11 @@ output
\begin_inset Quotes gld
\end_inset

false
true
\begin_inset Quotes grd
\end_inset

, also kein Loggingoutput.
, also ein Loggingoutput in der Konsole.
Falls die Option
\begin_inset Quotes gld
\end_inset
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/cae/de/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.cae.de.utils.LogOption;
import com.cae.de.utils.io.ExternalStringFileReader;
import com.cae.de.utils.io.ExternalStringFileWriter;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand All @@ -27,7 +28,7 @@ public class Main {
public static void main(String[] args) {
var inputFolder = "input";
var outputFolder = "output";
var logOption = LogOption.FALSE;
var logOption = LogOption.TRUE;
for (var i = 0; i < args.length; i++) {
if (i + 1 < args.length) {
switch (args[i]) {
Expand Down

0 comments on commit 9ccf9e3

Please sign in to comment.