Permalink
Browse files

Uses dotify.common v4.3.0

  • Loading branch information...
joeha480 committed Sep 13, 2018
1 parent 6368299 commit 3170eff3a84eaa3263684ca388b5bc80ee18aadd
View
@@ -89,7 +89,7 @@ dependencies {
exclude module: 'Saxon-HE'
}
compile 'org.daisy.dotify:dotify.api:4.2.0'
compile 'org.daisy.dotify:dotify.common:4.2.0'
compile 'org.daisy.dotify:dotify.common:4.3.0'
compile ('org.daisy.streamline:streamline-engine:1.2.0') {
exclude module: 'streamline-api'
}
@@ -34,7 +34,7 @@ static Option dotifyApi() {
}
static Option dotifyCommon() {
return MavenRepo.CENTRAL.get("org.daisy.dotify", "dotify.common", "4.2.0");
return MavenRepo.CENTRAL.get("org.daisy.dotify", "dotify.common", "4.3.0");
}
public static Option dotifyText() {
@@ -10,8 +10,8 @@
import java.util.Map;
import java.util.logging.Logger;
import org.daisy.braille.utils.pef.FileTools;
import org.daisy.dotify.SystemProperties;
import org.daisy.dotify.common.io.FileIO;
import org.daisy.streamline.cli.Argument;
import org.daisy.streamline.cli.CommandDetails;
import org.daisy.streamline.cli.CommandParser;
@@ -114,7 +114,7 @@ protected void putCommand(String cmd, String desc, Class<? extends CommandDetail
*/
public void setPluginsDir(File dir) {
// list jars and convert to URL's
URL[] jars = FileTools.toURL(FileTools.listFiles(dir, ".jar"));
URL[] jars = FileIO.toURL(dir.listFiles((parent, name)->name.endsWith(".jar")));
for (URL u : jars) {
logger.info("Found jar " + u);
}
@@ -23,6 +23,7 @@
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -32,12 +33,12 @@
import org.daisy.braille.utils.pef.PEFBook;
import org.daisy.braille.utils.pef.PEFBookLoader;
import org.daisy.braille.utils.pef.PEFLibrary;
import org.daisy.braille.utils.pef.PEFSearchIndex;
import org.daisy.dotify.cli.pefinfo.Detail;
import org.daisy.dotify.cli.pefinfo.DetailSet;
import org.daisy.dotify.cli.pefinfo.PEFBookInfo;
import org.daisy.dotify.cli.pefinfo.URIDetail;
import org.daisy.dotify.common.io.FileIO;
import org.daisy.streamline.cli.Argument;
import org.daisy.streamline.cli.CommandDetails;
import org.daisy.streamline.cli.CommandParser;
@@ -96,7 +97,9 @@ public static void main(String[] args) throws FileNotFoundException {
System.out.println("Scanning books. Wait a while...");
PEFSearchIndex search = new PEFSearchIndex();
PEFBookLoader loader = new PEFBookLoader();
for (File f : PEFLibrary.listFiles(dir, recursive)) {
String ext = ".pef";
Collection<File> coll = recursive ? FileIO.listFilesRecursive(dir, ext) : Arrays.asList(dir.listFiles((parent, name)->name.endsWith(ext)));
for (File f : coll) {
try {
PEFBook p = loader.load(f);
if (p!=null) {

0 comments on commit 3170eff

Please sign in to comment.