- File txt = new File(tmpDir, basename + ".txt");
- if (!txt.exists()) {
- basename = null;
- }
- if (basename != null) {
- try {
- BasicSupport support = BasicSupport.getSupport(txt.toURI()
- .toURL());
- Story origStory = support.process(null);
- story.setChapters(origStory.getChapters());
- story.setMeta(origStory.getMeta());
- } catch (Exception e) {
- basename = null;
- }
- }
-
- if (basename == null) {
+ // include original story
+ Story origStory = getStoryFromTxt(tmpDir, basename);
+ if (origStory != null) {
+ story.setChapters(origStory.getChapters());
+ story.setMeta(origStory.getMeta());
+ } else {