mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-27 02:57:53 +01:00
Move all doc generating tasks into docs package
This commit is contained in:
parent
dd9312f581
commit
a8d5b19807
@ -1,9 +1,9 @@
|
||||
package tools.docs;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import tools.commands.CommandPageCreater;
|
||||
import tools.hashmethods.HashAlgorithmsDescriptionTask;
|
||||
import tools.permissions.PermissionsListWriter;
|
||||
import tools.docs.commands.CommandPageCreater;
|
||||
import tools.docs.hashmethods.HashAlgorithmsDescriptionTask;
|
||||
import tools.docs.permissions.PermissionsListWriter;
|
||||
import tools.utils.AutoToolTask;
|
||||
import tools.utils.ToolTask;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package tools.commands;
|
||||
package tools.docs.commands;
|
||||
|
||||
import fr.xephi.authme.command.CommandArgumentDescription;
|
||||
import fr.xephi.authme.command.CommandDescription;
|
||||
@ -37,7 +37,7 @@ public class CommandPageCreater implements AutoToolTask {
|
||||
addCommandsInfo(commandTags, baseCommands);
|
||||
|
||||
FileUtils.generateFileFromTemplate(
|
||||
ToolsConstants.TOOLS_SOURCE_ROOT + "commands/commands.tpl.md",
|
||||
ToolsConstants.TOOLS_SOURCE_ROOT + "docs/commands/commands.tpl.md",
|
||||
OUTPUT_FILE,
|
||||
TagValueHolder.create().put("commands", commandTags));
|
||||
System.out.println("Wrote to '" + OUTPUT_FILE + "' with " + baseCommands.size() + " base commands.");
|
@ -1,4 +1,4 @@
|
||||
package tools.hashmethods;
|
||||
package tools.docs.hashmethods;
|
||||
|
||||
import ch.jalu.injector.Injector;
|
||||
import ch.jalu.injector.InjectorBuilder;
|
@ -1,4 +1,4 @@
|
||||
package tools.hashmethods;
|
||||
package tools.docs.hashmethods;
|
||||
|
||||
import fr.xephi.authme.security.HashAlgorithm;
|
||||
import tools.utils.AutoToolTask;
|
||||
@ -17,7 +17,7 @@ import java.util.Scanner;
|
||||
*/
|
||||
public class HashAlgorithmsDescriptionTask implements AutoToolTask {
|
||||
|
||||
private static final String CUR_FOLDER = ToolsConstants.TOOLS_SOURCE_ROOT + "hashmethods/";
|
||||
private static final String CUR_FOLDER = ToolsConstants.TOOLS_SOURCE_ROOT + "docs/hashmethods/";
|
||||
private static final String OUTPUT_FILE = ToolsConstants.DOCS_FOLDER + "hash_algorithms.md";
|
||||
|
||||
@Override
|
@ -1,4 +1,4 @@
|
||||
package tools.hashmethods;
|
||||
package tools.docs.hashmethods;
|
||||
|
||||
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
||||
import fr.xephi.authme.security.crypts.description.SaltType;
|
@ -1,4 +1,4 @@
|
||||
package tools.permissions;
|
||||
package tools.docs.permissions;
|
||||
|
||||
import fr.xephi.authme.ClassCollector;
|
||||
import fr.xephi.authme.permission.PermissionNode;
|
@ -1,4 +1,4 @@
|
||||
package tools.permissions;
|
||||
package tools.docs.permissions;
|
||||
|
||||
import tools.utils.AutoToolTask;
|
||||
import tools.utils.FileUtils;
|
||||
@ -15,6 +15,7 @@ import java.util.Scanner;
|
||||
*/
|
||||
public class PermissionsListWriter implements AutoToolTask {
|
||||
|
||||
private static final String TEMPLATE_FILE = ToolsConstants.TOOLS_SOURCE_ROOT + "docs/permissions/permission_nodes.tpl.md";
|
||||
private static final String PERMISSIONS_OUTPUT_FILE = ToolsConstants.DOCS_FOLDER + "permission_nodes.md";
|
||||
|
||||
@Override
|
||||
@ -36,8 +37,7 @@ public class PermissionsListWriter implements AutoToolTask {
|
||||
final NestedTagValue permissionsTagValue = generatePermissionsList();
|
||||
|
||||
TagValueHolder tags = TagValueHolder.create().put("nodes", permissionsTagValue);
|
||||
FileUtils.generateFileFromTemplate(
|
||||
ToolsConstants.TOOLS_SOURCE_ROOT + "permissions/permission_nodes.tpl.md", PERMISSIONS_OUTPUT_FILE, tags);
|
||||
FileUtils.generateFileFromTemplate(TEMPLATE_FILE, PERMISSIONS_OUTPUT_FILE, tags);
|
||||
System.out.println("Wrote to '" + PERMISSIONS_OUTPUT_FILE + "'");
|
||||
System.out.println("Before committing, please verify the output!");
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
# About
|
||||
Helper script to generate a page with an up-to-date list of permission nodes.
|
Loading…
Reference in New Issue
Block a user