-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
worked on documentation. Switching to new branch for major documentat…
…ion changes
- Loading branch information
1 parent
af970be
commit 9d3f1ea
Showing
18 changed files
with
192 additions
and
303 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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,3 @@ | ||
guns4d_classes = { | ||
"Gun" | ||
} |
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,50 @@ | ||
local config = {} | ||
local ld_chunk = assert(loadfile("./config.ld")) | ||
setfenv(ld_chunk, config) | ||
ld_chunk() | ||
local guns4d_chunk = assert(loadfile("./config.guns4d")) | ||
setfenv(guns4d_chunk, config) | ||
guns4d_chunk() | ||
|
||
|
||
function trim_leading_space(line) | ||
local white_space = 0 | ||
while string.sub(line, 1, 1) == " " do | ||
line = string.sub(line, 2) | ||
white_space = white_space+1 | ||
end | ||
return line, white_space | ||
end | ||
--there should be | ||
function generate_field_hyperlink_string(name) | ||
return "<a name = \""..name.."\"></a>" | ||
end | ||
|
||
local field_tag = "<h3>Fields:</h3>" | ||
for _, class in pairs(config.guns4d_classes) do | ||
|
||
--read the file, break down into a modifiable structure. | ||
local fp = config.dir.."/classes/"..class..".html" | ||
local file_stream = io.open(fp, "r") | ||
assert(file_stream, "file not found while generating class docs, check class '"..class.."' is tagged as an @class") | ||
local line = 0 | ||
local file = {} | ||
for line_text in file_stream:lines("*a") do | ||
line=line+1 | ||
file[line]=line_text | ||
end | ||
|
||
--find fields and their associated class (with their hyperlink) | ||
for i, text in pairs(file) do | ||
--print(i,text) | ||
local trm_text, indent = trim_leading_space(text) | ||
if trm_text==field_tag then | ||
local line = i | ||
while | ||
|
||
do | ||
|
||
end | ||
end | ||
end | ||
end |
File renamed without changes.
Oops, something went wrong.