git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update conversion tests and test files
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
Main.java
diff --git
a/src/be/nikiroo/fanfix/Main.java
b/src/be/nikiroo/fanfix/Main.java
index 9d462c402f619246a8ae4854ed1ffe8c185e6250..e1b9c650c328b91a47c57d4b2e4f97c38262c265 100644
(file)
--- a/
src/be/nikiroo/fanfix/Main.java
+++ b/
src/be/nikiroo/fanfix/Main.java
@@
-21,7
+21,7
@@
import be.nikiroo.fanfix.reader.BasicReader;
import be.nikiroo.fanfix.reader.Reader;
import be.nikiroo.fanfix.reader.Reader.ReaderType;
import be.nikiroo.fanfix.supported.BasicSupport;
import be.nikiroo.fanfix.reader.Reader;
import be.nikiroo.fanfix.reader.Reader.ReaderType;
import be.nikiroo.fanfix.supported.BasicSupport;
-import be.nikiroo.fanfix.supported.
BasicSupport.
SupportType;
+import be.nikiroo.fanfix.supported.SupportType;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.Version;
import be.nikiroo.utils.serial.server.ServerObject;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.Version;
import be.nikiroo.utils.serial.server.ServerObject;
@@
-199,9
+199,8
@@
public class Main {
} else if (port == null) {
port = Integer.parseInt(args[i]);
} else if (port == null) {
port = Integer.parseInt(args[i]);
- File remoteCacheDir = Instance.getRemoteDir(host);
BasicLibrary lib = new RemoteLibrary(key, host, port);
BasicLibrary lib = new RemoteLibrary(key, host, port);
- lib = new CacheLibrary(
remoteCacheDir
, lib);
+ lib = new CacheLibrary(
Instance.getRemoteDir(host)
, lib);
BasicReader.setDefaultLibrary(lib);
BasicReader.setDefaultLibrary(lib);
@@
-310,8
+309,8
@@
public class Main {
case VERSION:
System.out
.println(String.format("Fanfix version %s"
case VERSION:
System.out
.println(String.format("Fanfix version %s"
- + "
\
nhttps://github.com/nikiroo/fanfix/"
- + "
\
n\tWritten by Nikiroo",
+ + "
%
nhttps://github.com/nikiroo/fanfix/"
+ + "
%
n\tWritten by Nikiroo",
Version.getCurrentVersion()));
updates.ok(); // we consider it read
break;
Version.getCurrentVersion()));
updates.ok(); // we consider it read
break;
@@
-333,7
+332,7
@@
public class Main {
try {
ServerObject server = new RemoteLibraryServer(key, port);
server.setTraceHandler(Instance.getTraceHandler());
try {
ServerObject server = new RemoteLibraryServer(key, port);
server.setTraceHandler(Instance.getTraceHandler());
- server.
start
();
+ server.
run
();
} catch (IOException e) {
Instance.getTraceHandler().error(e);
}
} catch (IOException e) {
Instance.getTraceHandler().error(e);
}
@@
-507,7
+506,7
@@
public class Main {
*
* @return the exit return code (0 = success)
*/
*
* @return the exit return code (0 = success)
*/
- p
rivate
static int convert(String urlString, String typeString,
+ p
ublic
static int convert(String urlString, String typeString,
String target, boolean infoCover, Progress pg) {
int exitCode = 0;
String target, boolean infoCover, Progress pg) {
int exitCode = 0;
@@
-539,11
+538,11
@@
public class Main {
pg.addProgress(pgOut, 1);
}
pg.addProgress(pgOut, 1);
}
- Story story = support.process(
source,
pgIn);
+ Story story = support.process(pgIn);
try {
target = new File(target).getAbsolutePath();
try {
target = new File(target).getAbsolutePath();
- BasicOutput.getOutput(type, infoCover
).process(
- story, target, pgOut);
+ BasicOutput.getOutput(type, infoCover
, infoCover)
+
.process(
story, target, pgOut);
} catch (IOException e) {
Instance.getTraceHandler().error(
new IOException(trans(StringId.ERR_SAVING,
} catch (IOException e) {
Instance.getTraceHandler().error(
new IOException(trans(StringId.ERR_SAVING,