APIDump: Taking advantage of the new cFile API.
parent
55999ee118
commit
c03e440311
|
@ -36,7 +36,6 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function DumpAPITxt()
|
function DumpAPITxt()
|
||||||
LOG("Dumping all available functions to API.txt...");
|
LOG("Dumping all available functions to API.txt...");
|
||||||
function dump (prefix, a, Output)
|
function dump (prefix, a, Output)
|
||||||
|
@ -177,18 +176,17 @@ function DumpAPIHtml()
|
||||||
-- Read in the descriptions:
|
-- Read in the descriptions:
|
||||||
ReadDescriptions(API);
|
ReadDescriptions(API);
|
||||||
|
|
||||||
|
-- Create the output folder
|
||||||
|
if not(cFile:IsFolder("API")) then
|
||||||
|
cFile:CreateFolder("API");
|
||||||
|
end
|
||||||
|
|
||||||
-- Create a "class index" file, write each class as a link to that file,
|
-- Create a "class index" file, write each class as a link to that file,
|
||||||
-- then dump class contents into class-specific file
|
-- then dump class contents into class-specific file
|
||||||
local f = io.open("API/index.html", "w");
|
local f = io.open("API/index.html", "w");
|
||||||
if (f == nil) then
|
if (f == nil) then
|
||||||
-- Create the output folder
|
LOGINFO("Cannot output HTML API: " .. err);
|
||||||
os.execute("mkdir API");
|
return;
|
||||||
local err;
|
|
||||||
f, err = io.open("API/index.html", "w");
|
|
||||||
if (f == nil) then
|
|
||||||
LOGINFO("Cannot output HTML API: " .. err);
|
|
||||||
return;
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
f:write([[<html><head><title>MCServer API - class index</title>
|
f:write([[<html><head><title>MCServer API - class index</title>
|
||||||
|
|
Loading…
Reference in New Issue