X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FMain.java;h=d5669d56622750e754ae9a8288221a0f2c531872;hb=73ce17ef4569e43d24f8413ad6b59bc2906aec07;hp=bb9aee5a5bdd8e4bd1e99125b1c2424145e7a23d;hpb=7de079f11e29028d226132d84b4fef3870453599;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/Main.java b/src/be/nikiroo/fanfix/Main.java index bb9aee5..d5669d5 100644 --- a/src/be/nikiroo/fanfix/Main.java +++ b/src/be/nikiroo/fanfix/Main.java @@ -62,7 +62,7 @@ public class Main { String typeString = null; String chapString = null; String target = null; - MainAction action = null; + MainAction action = MainAction.HELP; Boolean plusInfo = null; boolean noMoreActions = false; @@ -163,7 +163,7 @@ public class Main { exitCode = imprt(urlString); break; case EXPORT: - exitCode = export(urlString, typeString, target); + exitCode = export(luid, typeString, target); break; case CONVERT: exitCode = convert(urlString, typeString, target, @@ -248,7 +248,7 @@ public class Main { /** * Export the {@link Story} from the {@link Library} to the given target. * - * @param urlString + * @param luid * the story LUID * @param typeString * the {@link OutputType} to use @@ -257,7 +257,7 @@ public class Main { * * @return the exit return code (0 = success) */ - private static int export(String urlString, String typeString, String target) { + private static int export(String luid, String typeString, String target) { OutputType type = OutputType.valueOfNullOkUC(typeString); if (type == null) { Instance.syserr(new Exception(trans(StringId.OUTPUT_DESC, @@ -266,9 +266,7 @@ public class Main { } try { - Story story = Instance.getLibrary().imprt(new URL(urlString)); - Instance.getLibrary().export(story.getMeta().getLuid(), type, - target); + Instance.getLibrary().export(luid, type, target); } catch (IOException e) { Instance.syserr(e); return 4;