updated history, notice
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
2.1.1
|
||||
=======
|
||||
2020-02-02
|
||||
|
||||
- PR #217 seller order referenced document
|
||||
- PR #217 seller order referenced document thanks to weclapp-dev
|
||||
- PR #218 allow recipient contact in XRechnung thanks to seeeeew
|
||||
- RE #221 remove outdated dependency thanks to heisej
|
||||
- only deploy library and validator to maven central, not core nor cli
|
||||
- a correction should reference the original invoice via invoiceReferencedDocument, not buyerOrderReferencedDocument
|
||||
- upgraded CEN Schematron validation (codes 24) to v1.3.4
|
||||
- added unit tests for ubl conversion and visualization
|
||||
|
||||
2.1.0
|
||||
=======
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>LICENSE</exclude>
|
||||
<exclude>NOTICE</exclude>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
|
||||
@@ -26,6 +26,8 @@ import org.mustangproject.validator.Validator;
|
||||
import org.mustangproject.validator.ZUGFeRDValidator;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
@@ -48,6 +50,7 @@ public class Main {
|
||||
|
||||
private static String getUsage() {
|
||||
return "Usage: --action metrics|combine|extract|a3only|ubl|validate|visualize [-d,--directory] [-l,--listfromstdin] [-i,--ignore fileextension, PDF/A errors] | [-h,--help] \r\n"
|
||||
+ " --action=license display open source license and notice\n"
|
||||
+ " --action=metrics\n"
|
||||
+ " -d, --directory count ZUGFeRD files in directory to be scanned\n"
|
||||
+ " If it is a directory, it will recurse.\n"
|
||||
@@ -288,6 +291,37 @@ public class Main {
|
||||
c2u.convert(new File(xmlName), new File(outName));
|
||||
System.out.println("Written to " + outName);
|
||||
|
||||
}
|
||||
|
||||
public static void printLicense() {
|
||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("LICENSE");
|
||||
System.out.println(convertInputStreamToString(is));
|
||||
is = Thread.currentThread().getContextClassLoader().getResourceAsStream("NOTICE");
|
||||
System.out.println(convertInputStreamToString(is));
|
||||
|
||||
}
|
||||
|
||||
// Plain Java
|
||||
// based on https://mkyong.com/java/how-to-convert-inputstream-to-string-in-java/
|
||||
private static String convertInputStreamToString(InputStream is) {
|
||||
int DEFAULT_BUFFER_SIZE = 8192;
|
||||
ByteArrayOutputStream result = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
|
||||
int length;
|
||||
try {
|
||||
while ((length = is.read(buffer)) != -1) {
|
||||
result.write(buffer, 0, length);
|
||||
}
|
||||
|
||||
// Java 1.1
|
||||
return result.toString(StandardCharsets.UTF_8.name());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
// Java 10
|
||||
// return result.toString(StandardCharsets.UTF_8);
|
||||
|
||||
}
|
||||
/***
|
||||
* the main function of the commandline tool...
|
||||
@@ -295,9 +329,9 @@ public class Main {
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
|
||||
CmdLineParser parser = new CmdLineParser();
|
||||
|
||||
|
||||
// Option: Help
|
||||
Option<Boolean> helpOption = parser.addBooleanOption('h', "help");
|
||||
// Option: Action
|
||||
@@ -344,8 +378,9 @@ public class Main {
|
||||
String action = parser.getOptionValue(actionOption);
|
||||
String directoryName = parser.getOptionValue(dirnameOption);
|
||||
Boolean filesFromStdIn = parser.getOptionValue(filesFromStdInOption, Boolean.FALSE);
|
||||
Boolean helpRequested = parser.getOptionValue(helpOption, Boolean.FALSE) || ((action!=null)&&(action.equals("help")));
|
||||
Boolean ignoreFileExt = parser.getOptionValue(ignoreFileExtOption, Boolean.FALSE);
|
||||
Boolean helpRequested = parser.getOptionValue(helpOption, Boolean.FALSE) || ((action!=null)&&(action.equals("help")));
|
||||
|
||||
String sourceName = parser.getOptionValue(sourceOption);
|
||||
String sourceXMLName = parser.getOptionValue(sourceXmlOption);
|
||||
String outName = parser.getOptionValue(outOption);
|
||||
@@ -358,7 +393,10 @@ public class Main {
|
||||
if (helpRequested) {
|
||||
printHelp();
|
||||
optionsRecognized=true;
|
||||
} else if ((action!=null)&&(action.equals("metrics"))) {
|
||||
} /* else if ((action!=null)&&(action.equals("license"))) {
|
||||
printLicense();
|
||||
optionsRecognized=true;
|
||||
} */ else if ((action!=null)&&(action.equals("metrics"))) {
|
||||
performMetrics(directoryName, filesFromStdIn, ignoreFileExt);
|
||||
optionsRecognized=true;
|
||||
} else if ((action!=null)&&(action.equals("combine"))) {
|
||||
|
||||
1
NOTICE
1
NOTICE
@@ -31,3 +31,4 @@ Based on https://github.com/itplr-kosit/xrechnung-schematron licensed under the
|
||||
Based on https://github.com/itplr-kosit/xrechnung-visualization licensed under the APL2.0
|
||||
Based on Saxon-HE https://sourceforge.net/projects/saxon/ licensed under the MPL 2.0
|
||||
Based on DOM4j https://dom4j.github.io/ licensed under the BSD license
|
||||
Based on EN16931 validation artefacts https://github.com/ConnectingEurope/eInvoicing-EN16931 licensed under the EUPL 2.0
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>LICENSE</exclude>
|
||||
<exclude>NOTICE</exclude>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
|
||||
Reference in New Issue
Block a user