Quote:
Originally Posted by Doitsu
The new code appears to be working, but I still don't understand why writer2latex apparently has problems with additional periods in file names.
|
See my earlier post. The Application.java is invoked first and it calls removeExtension to create the target name from the source file name if none is provided on the command line. Then it invokes the Converter which since the target mime is an epub invokes EpubWriter.java which again calls removeExtension. This hacks off the second "extension".
The epub converter is the only mimetype converter that hacks off the second extension if one exists that I could find.
One way to workaround this issue that might work is according to Application.java, you can pass the full path/name of the target file immediately after the source file in the command line.
Code:
System.out.println();
System.out.println("Usage:");
System.out.println(" java -jar <path>/writer2xhtml.jar <options> <source file/directory> [<target file/directory>]");
System.out.println("where the available options are:");
System.out.println(" -xhtml");
System.out.println(" -xhtml11");
System.out.println(" -xhtml+mathml");
System.out.println(" -html5");
System.out.println(" -epub");
System.out.println(" -epub3");
System.out.println(" -template[=]<template file>");
System.out.println(" -stylesheet[=]<style sheet file>");
System.out.println(" -resource[=]<resource file>[::<media type>]");
System.out.println(" -cleanxhtml");
System.out.println(" -config[=]<configuration file>");
System.out.println(" -<configuration option>[=]<value>");
System.out.println("See the documentation for the available configuration options");
If you pass in that target full path on the command line, then Application.java will not remove the extension which will get passed to EpubWriter where the ".epub" extension will be removed and a new ".epub" should be added.