Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions makeabx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
.classpath
.project
.settings/
23 changes: 23 additions & 0 deletions makeabx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# makeabx
java module for compiling XML files to the abx format

## Command line usage

`java -jar makeabx.jar <input.xml> <optional output.xml>`

```
Converts an XML file to an ABX file (the output will have the same path as the input if none was specified
with an '.abx' extension added).

If one of the following suffixes are found on an attribute's name, they will be
treated as typed values:
-int, -inthex -long -longhex -float -double -bool -byteshex -base64
eg. <element myvalue-inthex='4a7f'>Attribute will be parsed as hex</element>

```

## Building
`mvn clean install

## Already built version
available at the "dist" directory
Binary file added makeabx/dist/makeabx.jar
Binary file not shown.
25 changes: 25 additions & 0 deletions makeabx/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>makeabx</groupId>
<artifactId>makeabx</artifactId>
<version>0.0.1-SNAPSHOT</version>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.ccl.abxmaker.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
3 changes: 0 additions & 3 deletions makeabx/src/META-INF/MANIFEST.MF

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public static void main(String[] args) throws IOException, URISyntaxException {
String me = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getName();

System.out.println();
System.out.printf("USAGE: %s <input.xml>\n", me);
System.out.printf("USAGE: %s <input.xml> <optional output.xml>\n", me);
System.out.println();
System.out.println("Converts an XML file to an ABX file (the output will have the same path as the input");
System.out.println("Converts an XML file to an ABX file (the output will have the same path as the input if none was specified");
System.out.println("with an '.abx' extension added).");
System.out.println();
System.out.println("If one of the following suffixes are found on an attribute's name, they will be");
Expand All @@ -32,6 +32,9 @@ public static void main(String[] args) throws IOException, URISyntaxException {
return;
}
String outputPath = inputPath + ".abx";
if(args.length>1) {
outputPath = args[1];
}
if(new File(outputPath).exists()){
System.out.printf("ERROR: '%s' already exists\n", outputPath);
}
Expand Down