story.getMeta().setType("" + getType());
}
- if (writeCover) {
+ if (isWriteCover()) {
InfoCover.writeCover(targetDir, targetName, story.getMeta());
}
- if (writeInfo) {
+ if (isWriteInfo()) {
InfoCover.writeInfo(targetDir, targetName, story.getMeta());
}
.setType(OutputType.TEXT, isWriteInfo(), false)
.process(story, dir, targetNameOrig);
+ try {
+ super.process(story, targetDir, targetNameOrig);
+ } finally {
+ }
+
InfoCover.writeInfo(dir, targetNameOrig, story.getMeta());
if (story.getMeta() != null && !story.getMeta().isFakeCover()) {
InfoCover.writeCover(dir, targetNameOrig, story.getMeta());
IOUtils.writeSmallFile(dir, "version", "3.0");
- try {
- super.process(story, targetDir, targetNameOrig);
- } finally {
- }
-
IOUtils.zip(dir, target, true);
} finally {
IOUtils.deltree(dir);
"Cannot create a temporary directory: no space left on device?");
}
+ super.process(story, targetDir, targetNameOrig);
+
// "Originals"
File data = new File(tmpDir, "DATA");
data.mkdir();
InfoCover.writeInfo(data, targetNameOrig, story.getMeta());
IOUtils.writeSmallFile(data, "version", "3.0");
- super.process(story, targetDir, targetNameOrig);
-
// zip/epub
File epub = new File(targetDir, targetName);
IOUtils.zip(tmpDir, epub, true);
target.mkdir();
dir = target;
- // write a copy of the originals inside
- InfoCover.writeInfo(dir, targetName, story.getMeta());
- InfoCover.writeCover(dir, targetName, story.getMeta());
- BasicOutput.getOutput(OutputType.TEXT, isWriteInfo(), isWriteCover())
- .process(story, dir, targetNameOrig);
-
target = new File(targetDir, targetName + getDefaultExtension(true));
writer = new BufferedWriter(new OutputStreamWriter(
writer = null;
}
+ // write a copy of the originals inside
+ InfoCover.writeInfo(dir, targetName, story.getMeta());
+ InfoCover.writeCover(dir, targetName, story.getMeta());
+ BasicOutput.getOutput(OutputType.TEXT, isWriteInfo(), isWriteCover())
+ .process(story, dir, targetNameOrig);
+
if (story.getMeta().getCover() != null) {
Instance.getCache().saveAsImage(story.getMeta().getCover(),
new File(dir, "cover"), true);
meta.setPublisher(getSourceName());
meta.setUuid(source.toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en");
meta.setSubject("Furry");
meta.setType(getType().toString());
meta.setImageDocument(true);
if (langLine != null) {
langLine = StringUtils.unhtml(langLine).trim();
if (langLine.equalsIgnoreCase("English")) {
- lang = "EN";
+ lang = "en";
} else if (langLine.equalsIgnoreCase("Japanese")) {
- lang = "JP";
+ lang = "jp";
} else if (langLine.equalsIgnoreCase("French")) {
- lang = "FR";
+ lang = "fr";
} else {
// TODO find the code?
lang = langLine;
}
meta = new MetaData();
- meta.setLang("EN");
+ meta.setLang("en");
meta.setTags(new ArrayList<String>());
meta.setSource(getSourceName());
meta.setUuid(url);
meta.setPublisher(getSourceName());
meta.setUuid(source.toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en"); //TODO!
meta.setSubject(getSubject(reset(in)));
meta.setType(getType().toString());
meta.setImageDocument(false);
meta.setPublisher(getSourceName());
meta.setUuid(source.toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en");
meta.setSubject("MLP");
meta.setType(getType().toString());
meta.setImageDocument(false);
meta.setPublisher(getSourceName());
meta.setUuid(source.toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en");
meta.setSubject("MLP");
meta.setType(getType().toString());
meta.setImageDocument(false);
meta.setPublisher(getSourceName());
meta.setUuid(getSource().toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en");
meta.setSubject("manga");
meta.setType(getType().toString());
meta.setImageDocument(true);
}
if (lang == null) {
- lang = "EN";
+ lang = "en";
} else {
- lang = lang.toUpperCase();
+ lang = lang.toLowerCase();
}
return lang;
meta.setPublisher(getSourceName());
meta.setUuid(source.toString());
meta.setLuid("");
- meta.setLang("EN");
+ meta.setLang("en");
meta.setSubject("Furry");
meta.setType(getType().toString());
meta.setImageDocument(false);