diff options
author | Mattes D <github@xoft.cz> | 2014-03-06 10:38:45 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-06 10:38:45 +0100 |
commit | 2def1b40e13d14c972296e9c6d75bf1721255063 (patch) | |
tree | e32266bf3ba55f5b5e93c58d9fe28f3cf027b377 | |
parent | APIDump: Documented the cCompositeChat class. (diff) | |
parent | The APIDump generates a list of all the permissions again. (diff) | |
download | cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar.gz cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar.bz2 cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar.lz cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar.xz cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.tar.zst cuberite-2def1b40e13d14c972296e9c6d75bf1721255063.zip |
-rw-r--r-- | MCServer/Plugins/InfoDump.lua | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index e7ed157e3..c61f9c9e6 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -317,26 +317,19 @@ local function WriteCommandsCategoryGithub(a_Category, f) if (CategoryName == "") then CategoryName = "General"; end - f:write("\n## ", GithubizeString(a_Category.DisplayName or CategoryName), "\n"); + f:write("\n### ", GithubizeString(a_Category.DisplayName or CategoryName), "\n"); -- Write description: if (a_Category.Description ~= "") then - f:write(GithubizeString(a_Category.Description), "\n"); + f:write(GithubizeString(a_Category.Description), "\n\n"); end + f:write("| Command | Permission | Description | \n") + f:write("| ------- | ---------- | ----------- | \n") + -- Write commands: - f:write("\n"); for idx2, cmd in ipairs(a_Category.Commands) do - f:write("\n### ", cmd.CommandString, "\n", GithubizeString(cmd.Info.HelpString or "UNDOCUMENTED"), "\n\n"); - if (cmd.Info.Permission ~= nil) then - f:write("Permission required: **", cmd.Info.Permission, "**\n\n"); - end - if (cmd.Info.DetailedDescription ~= nil) then - f:write(GithubizeString(cmd.Info.DetailedDescription)); - end - if (cmd.Info.ParameterCombinations ~= nil) then - WriteCommandParameterCombinationsGithub(cmd.CommandString, cmd.Info.ParameterCombinations, f); - end + f:write("|", cmd.CommandString, " | ", cmd.Info.Permission or "", " | ", GithubizeString(cmd.Info.HelpString or "UNDOCUMENTED"), "| \n") end f:write("\n\n") end @@ -537,12 +530,13 @@ local function DumpPermissionsGithub(a_PluginInfo, f) -- Dump the permissions: f:write("\n# Permissions\n"); + f:write("| Permissions | Description | Commands | Recommended groups |\n") + f:write("| ----------- | ----------- | -------- | ------------------ |\n") for idx, perm in ipairs(Permissions) do - f:write("### ", perm.Name, "\n"); - f:write(GithubizeString(perm.Info.Description or "")); + f:write(perm.Name, " | "); + f:write(GithubizeString(perm.Info.Description or ""), " | "); local CommandsAffected = perm.Info.CommandsAffected or {}; if (#CommandsAffected > 0) then - f:write("\n\nCommands affected:\n - "); local Affects = {}; for idx2, cmd in ipairs(CommandsAffected) do if (type(cmd) == "string") then @@ -551,11 +545,10 @@ local function DumpPermissionsGithub(a_PluginInfo, f) table.insert(Affects, GetCommandRefGithub(cmd.Name, cmd)); end end - f:write(table.concat(Affects, "\n - ")); - f:write("\n"); + f:write(table.concat(Affects, ", "), " | "); end if (perm.Info.RecommendedGroups ~= nil) then - f:write("\n\nRecommended groups: ", perm.Info.RecommendedGroups, "\n"); + f:write(perm.Info.RecommendedGroups, " |"); end f:write("\n"); end |