X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FMain.java;h=46eb0b5ab9fc08becb2b55924aa9ef2bb6b9f092;hp=406e8a2fb4b9fb0ae1ebfa1a3adbc9203f419888;hb=a6395bef99a8e917f67341ef1906917b87df24a4;hpb=948637bc8cc1dcf76f783870cf46f71794a9805d diff --git a/src/be/nikiroo/fanfix/Main.java b/src/be/nikiroo/fanfix/Main.java index 406e8a2..46eb0b5 100644 --- a/src/be/nikiroo/fanfix/Main.java +++ b/src/be/nikiroo/fanfix/Main.java @@ -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; @@ -381,6 +379,7 @@ public class Main { } else { try { BasicSupport support = BasicSupport.getSupport(source); + if (support != null) { Story story = support.process(source);