-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathPrepareMobileMdd.java
More file actions
45 lines (24 loc) · 998 Bytes
/
Copy pathPrepareMobileMdd.java
File metadata and controls
45 lines (24 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package test.Examples;
import com.knziha.plod.dictionaryBuilder.mdictResBuilder;
import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import static test.Examples.TiffMddConverter.ProcessAllFiles;
public class PrepareMobileMdd {
public static void main(String[] args) throws IOException {
HashSet<String> exemption = new HashSet<>();
exemption.add(".idea");
exemption.add("README.md");
mdictResBuilder builder = new mdictResBuilder("", "");
String InputPath = "D:\\Code\\tests\\recover_wrkst\\mdict-java\\src\\main\\java\\com\\knziha\\plod\\PlainDict\\Mdict-browser";
int basePathLen = InputPath.length();
File startPath = new File(InputPath);
ProcessAllFiles(startPath, exemption,
fI -> {
if (!exemption.contains(fI.getAbsolutePath().substring(basePathLen + 1)))
builder.insert(fI.getAbsolutePath().substring(basePathLen), fI);
});
builder.setCompressionType(2);
builder.write("D:\\MdbR.mdd");
}
}