From 0c8d08cb0962640bb3688f80ff782245daa2747c Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 2 Mar 2014 16:48:55 +0100 Subject: Simplified and more clearer infodump for Github. --- MCServer/Plugins/InfoDump.lua | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index e7ed157e3..ede4c0e8b 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 | Discription | \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 @@ -601,7 +594,7 @@ local function DumpPluginInfoGithub(a_PluginFolder, a_PluginInfo) f:write(GithubizeString(a_PluginInfo.Description), "\n"); DumpAdditionalInfoGithub(a_PluginInfo, f); DumpCommandsGithub(a_PluginInfo, f); - DumpPermissionsGithub(a_PluginInfo, f); + --DumpPermissionsGithub(a_PluginInfo, f); -- Seems a little overkill since they are already mentioned in the commands. f:close(); end -- cgit v1.2.3 From 20e377ea7b64f60bd5565b8c97ce26750e0eeb5e Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 2 Mar 2014 16:55:04 +0100 Subject: Fixed typo Discription => Description --- MCServer/Plugins/InfoDump.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index ede4c0e8b..59263d056 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -324,7 +324,7 @@ local function WriteCommandsCategoryGithub(a_Category, f) f:write(GithubizeString(a_Category.Description), "\n\n"); end - f:write("| Command | Permission | Discription | \n") + f:write("| Command | Permission | Description | \n") f:write("| ------- | ---------- | ----------- | \n") -- Write commands: -- cgit v1.2.3 From dc0cbd594c05395b5d71af8a8a1f24b10c2d0d50 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Wed, 5 Mar 2014 19:17:59 +0100 Subject: The APIDump generates a list of all the permissions again. --- MCServer/Plugins/InfoDump.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index 59263d056..c61f9c9e6 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -530,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 @@ -544,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 @@ -594,7 +594,7 @@ local function DumpPluginInfoGithub(a_PluginFolder, a_PluginInfo) f:write(GithubizeString(a_PluginInfo.Description), "\n"); DumpAdditionalInfoGithub(a_PluginInfo, f); DumpCommandsGithub(a_PluginInfo, f); - --DumpPermissionsGithub(a_PluginInfo, f); -- Seems a little overkill since they are already mentioned in the commands. + DumpPermissionsGithub(a_PluginInfo, f); f:close(); end -- cgit v1.2.3