updated doc
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
- #465 cli version should also be able to combine PDF/A-3 source
|
||||
- #487 update to zugferd 2.3.0
|
||||
- #472 Fix logging implementation missing in CLI
|
||||
- #479 Re-Formatted and re-organized POMs - Part 2
|
||||
|
||||
|
||||
2.13.0
|
||||
=======
|
||||
|
||||
@@ -34,14 +34,11 @@ If you set up a Maven project, you can reference the mustang artifact like this:
|
||||
<dependency>
|
||||
<groupId>org.mustangproject</groupId>
|
||||
<artifactId>library</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.14.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
Further docs on how to develop **with** mustang:
|
||||
|
||||
- [ZugferdDev.en.pdf](https://github.com/ZUGFeRD/mustangproject/blob/master/doc/ZugferdDev.en.pdf?raw=true): The English mustang user documentation.
|
||||
- [ZugferdDev.de.pdf](https://github.com/ZUGFeRD/mustangproject/blob/master/doc/ZugferdDev.de.pdf?raw=true): The German mustang user documentation.
|
||||
- [Usage examples](https://www.mustangproject.org/use/): Read and write electronic invoices.
|
||||
- [Mustang classes](https://www.mustangproject.org/invoice-class/): Using the mustang classes.
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ Additionally, the Mustang validator now also supports XRechnung 2, can now also
|
||||
|
||||
|
||||
### Use on command line
|
||||
`java -jar Mustang-CLI-2.0.0-alpha3.jar --action=combine` embeds a XML into a PDF (A-1) file and exports as PDF/A-3
|
||||
`java -jar Mustang-CLI-2.14.0.jar --action=combine` embeds a XML into a PDF (A-1) file and exports as PDF/A-3
|
||||
|
||||
`java -jar mustang-cli.jar --action=extract` extracts XML from a ZUGFeRD file and
|
||||
`java -jar Mustang-CLI-2.14.0.jar --action=extract` extracts XML from a ZUGFeRD file and
|
||||
|
||||
`java -jar mustang-cli.jar --action=validate` validates XML or PDF files.
|
||||
`java -jar Mustang-CLI-2.14.0.jar --action=validate` validates XML or PDF files.
|
||||
|
||||
`java -jar mustang-cli.jar --help` still outputs the parameters which can be used
|
||||
`java -jar Mustang-CLI-2.14.0.jar --help` still outputs the parameters which can be used
|
||||
to for non-interactive (i.e., batch) processing.
|
||||
|
||||
|
||||
@@ -38,11 +38,12 @@ from `-f` (ZUV) to the usual `--source`.
|
||||
We're now on maven central, please remove the old github repository. Additionally, the following changed
|
||||
|
||||
| What | old value | new value |
|
||||
|---|---|---|
|
||||
|---|---|--------------------|
|
||||
| Group id | org.mustangproject.zugferd | org.mustangproject |
|
||||
| Artifact ID | mustang | library |
|
||||
| Version | 1.7.8 | 2.0.0-alpha3 |
|
||||
| Version | 1.7.8 | 2.14.0 |
|
||||
|
||||
And please use the shaded classifier.
|
||||
If you want you can also embed the validator in your software using validator
|
||||
as artifact ID. "validator" includes the library functionality but is >20 MB
|
||||
bigger due to its dependencies.
|
||||
@@ -200,7 +201,7 @@ read/write ZUGFeRD-invoices like the (smaller) library module.
|
||||
<dependency>
|
||||
<groupId>org.mustangproject</groupId>
|
||||
<artifactId>validator</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.14.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ to validate the XML part of the invoices.
|
||||
|
||||
## New build
|
||||
|
||||
Target platform is java 1.11
|
||||
Target platform is java 1.17
|
||||
|
||||
## Build
|
||||
|
||||
@@ -229,3 +229,47 @@ extract, rename xsl file to xslt, move to new version dir and add a if where the
|
||||
* freshcode.club
|
||||
* Submit on openpr.de/.com, https://www.einpresswire.com/
|
||||
|
||||
## Tips&Inspriration
|
||||
|
||||
|
||||
NodeList from a XPath https://github.com/ZUGFeRD/mustangproject/pull/476/files
|
||||
```
|
||||
xpr = xpath.compile("//*[local-name()=\"PrepaidAmount\"]");
|
||||
NodeList prepaidNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
nodeMap.getNode("GlobalID").ifPresent(idNode -> {
|
||||
if (idNode.hasAttributes()
|
||||
&& idNode.getAttributes().getNamedItem("schemeID") != null) {
|
||||
globalId = new SchemedID()
|
||||
.setScheme(idNode.getAttributes().getNamedItem("schemeID").getNodeValue())
|
||||
.setId(idNode.getTextContent());
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
nodeMap.getAsNodeMap and nodeMap.getAsString
|
||||
```
|
||||
|
||||
nodeMap.getAsString("SellerAssignedID").ifPresent(this::setSellerAssignedID);
|
||||
nodeMap.getAsString("BuyerAssignedID").ifPresent(this::setBuyerAssignedID);
|
||||
nodeMap.getAsString("Name").ifPresent(this::setName);
|
||||
nodeMap.getAsString("Description").ifPresent(this::setDescription);
|
||||
|
||||
nodeMap.getAsNodeMap("ApplicableProductCharacteristic").ifPresent(apcNodes -> {
|
||||
String key = apcNodes.getAsStringOrNull("Description");
|
||||
String value = apcNodes.getAsStringOrNull("Value");
|
||||
if (key != null && value != null) {
|
||||
if (attributes == null) {
|
||||
attributes = new HashMap<>();
|
||||
}
|
||||
attributes.put(key, value);
|
||||
}
|
||||
});
|
||||
|
||||
nodeMap.getAsNodeMap("DesignatedProductClassification").ifPresent(dpcNodes -> {
|
||||
String className = dpcNodes.getAsStringOrNull("ClassName");
|
||||
dpcNodes.getNode("ClassCode").map(ClassCode::fromNode).ifPresent(classCode ->
|
||||
classifications.add(new DesignatedProductClassification(classCode, className)));
|
||||
});
|
||||
|
||||
nodeMap.getAsString("OriginTradeCounty").ifPresent(this::setCountryOfOrigin);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user