- /**
- * Return an {@link URL} from this {@link String}, be it a file path or an
- * actual {@link URL}.
- *
- * @param sourceString
- * the source
- *
- * @return the corresponding {@link URL}
- *
- * @throws MalformedURLException
- * if this is neither a file nor a conventional {@link URL}
- */
- private static URL getUrl(String sourceString) throws MalformedURLException {
- if (sourceString == null || sourceString.isEmpty()) {
- throw new MalformedURLException("Empty url");
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < diff; i++) {
+ builder.append('.');
+ }
+
+ System.err.print(builder.toString());
+
+ if (progress.isDone()) {
+ System.err.println("");
+ }
+ }
+ });
+ Progress pg = new Progress();
+ mainProgress.addProgress(pg, mainProgress.getMax());
+
+ if (exitCode != 255) {
+ switch (action) {
+ case IMPORT:
+ exitCode = imprt(urlString, pg);
+ break;
+ case EXPORT:
+ exitCode = export(luid, typeString, target, pg);
+ break;
+ case CONVERT:
+ exitCode = convert(urlString, typeString, target,
+ plusInfo == null ? false : plusInfo, pg);
+ break;
+ case LIST:
+ exitCode = list(typeString);
+ break;
+ case READ:
+ exitCode = read(luid, chapString, true);
+ break;
+ case READ_URL:
+ exitCode = read(urlString, chapString, false);
+ break;
+ case HELP:
+ syntax(true);
+ exitCode = 0;
+ break;
+ case SET_READER:
+ break;
+ case START:
+ UIUtils.setLookAndFeel();
+ BasicReader.setDefaultReaderType(ReaderType.LOCAL);
+ BasicReader.getReader().start(null);
+ break;
+ }