|
@@ -11,8 +11,11 @@ import java.nio.file.Paths;
|
|
|
|
|
|
public class Application {
|
|
|
public static void main(String[] args) {
|
|
|
- System.out.println("halo");
|
|
|
-// getAllFiles("docx");
|
|
|
+ String dir = "";
|
|
|
+ if (args.length > 0) {
|
|
|
+ dir = args[0];
|
|
|
+ }
|
|
|
+ getAllFiles(dir);
|
|
|
}
|
|
|
|
|
|
public static void parseParams(String[] args) {
|
|
@@ -22,6 +25,9 @@ public class Application {
|
|
|
|
|
|
public static void merge(String dir, String filename) {
|
|
|
String ext = FilenameUtils.getExtension(filename);
|
|
|
+ if (!ext.equals("docx") && !ext.equals("dox")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String answerDoc = filename.replace( "." + ext, "-y."+ext);
|
|
|
String resultDoc = filename.replace( "." + ext, "-r."+ext);
|
|
|
|