-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subsume CodeTaylor's documentation system.
- Loading branch information
1 parent
107bb4e
commit a761721
Showing
9 changed files
with
438 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/aranaira/arcanearchives/ExportDocumentation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.aranaira.arcanearchives; | ||
|
||
import com.aranaira.arcanearchives.integration.crafttweaker.GCTTweaker; | ||
import epicsquid.roots.util.zen.ZenDocExporter; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
|
||
public class ExportDocumentation { | ||
|
||
public static void main (String[] args) { | ||
|
||
String targetPath = "docs/zs/"; | ||
Class[] classes = { | ||
GCTTweaker.class | ||
}; | ||
|
||
ZenDocExporter export = new ZenDocExporter(); | ||
Path path = Paths.get(targetPath); | ||
|
||
try { | ||
Files.createDirectories(path); | ||
export.export(path, classes); | ||
|
||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/com/aranaira/arcanearchives/util/StringHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package epicsquid.roots.util; | ||
|
||
// Copied with permission from Athenaeum by CodeTaylor, Apache License | ||
// https://github.com/codetaylor/athenaeum/blob/master/src/main/java/com/codetaylor/mc/athenaeum/util/StringHelper.java | ||
|
||
public class StringHelper { | ||
|
||
public static String capitalizeFirstLetter(String input) { | ||
|
||
return input.substring(0, 1).toUpperCase() + input.substring(1); | ||
} | ||
|
||
public static String lowercaseFirstLetter(String input) { | ||
|
||
return input.substring(0, 1).toLowerCase() + input.substring(1); | ||
} | ||
|
||
public static String ticksToHMS(int ticks) { | ||
|
||
int totalSecs = ticks / 20; | ||
int hours = totalSecs / 3600; | ||
int minutes = (totalSecs % 3600) / 60; | ||
int seconds = totalSecs % 60; | ||
|
||
if (hours > 0) { | ||
return String.format("%02d:%02d:%02d", hours, minutes, seconds); | ||
|
||
} else { | ||
return String.format("%02d:%02d", minutes, seconds); | ||
} | ||
} | ||
|
||
private StringHelper() { | ||
// | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/aranaira/arcanearchives/util/zen/ZenDocAppend.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.aranaira.arcanearchives.util.zen; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
// This file and all others in this directory taken from Athenaeeum by CodeTaylor | ||
// Licensed with the Apache License and used with permission | ||
// https://github.com/codetaylor/athenaeum/tree/master/src/main/java/com/codetaylor/mc/athenaeum/tools | ||
|
||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface ZenDocAppend { | ||
|
||
String[] value (); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/aranaira/arcanearchives/util/zen/ZenDocArg.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.aranaira.arcanearchives.util.zen; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target(ElementType.METHOD) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface ZenDocArg { | ||
|
||
String arg (); | ||
|
||
String info () default ""; | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/aranaira/arcanearchives/util/zen/ZenDocClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.aranaira.arcanearchives.util.zen; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface ZenDocClass { | ||
|
||
String value (); | ||
|
||
String[] description () default {}; | ||
} |
Oops, something went wrong.