One final (I hope) problem with command line options. BBeBook lowercases the input filename when deriving the output filename, for e.g.
Code:
java -jar /home/kovid/download/BBeBook-0.2.jar Test.html && ls *.lrf
test.html.lrf
Is this intentional? Or will it be fixed in a future version. I'm asking all these questions because I'm planning to integrate BBeBook into libprs500 and I need a stable commandline interface.
Thanks,
Kovid.
EDIT: Here's a modified makeBook function that fixes the lowercasing
Code:
// Process command line arguments
for (int i=0; i < args.length; i++) {
String oarg = args[i].trim();
String arg = oarg.toLowerCase();
if ("-t".equals(arg) || "--title".equals(arg)) {
bookTitle.setLength(0);
bookTitle.append(args[i+1]);
} else if ("-a".equals(arg) || "--author".equals(arg)) {
bookAuthor.setLength(0);
bookAuthor.append(args[i+1]);
} else if ("-r".equals(arg) || "--raster".equals(arg)) {
rasterize = true;
} else if ("--thumbnail".equals(arg)) {
bookIconName.setLength(0);
bookIconName.append(args[i+1]);
} else {
if (arg.endsWith(".pdf")) {
makeBookFromPdf(oarg, rasterize);
break;
} else if (arg.endsWith(".html") || arg.endsWith(".htm")) {
makeBookFromHtml(oarg);
break;
} else if (arg.endsWith(".xml")) {
makeBookFromXmlConfig(oarg);
break;
}
}
}