diff --git a/cmd/docgen/docgen.go b/cmd/docgen/docgen.go index 9332dfa..8598091 100644 --- a/cmd/docgen/docgen.go +++ b/cmd/docgen/docgen.go @@ -480,7 +480,7 @@ func main() { } if len(modu.Fields) != 0 { - f.WriteString("## Interface fields\n") + f.WriteString("## Static module fields\n") mdTable := md.NewTable(len(modu.Fields), 2) mdTable.SetTitle(0, "") @@ -496,11 +496,17 @@ func main() { } if len(modu.Properties) != 0 { f.WriteString("## Object properties\n") - for _, dps := range modu.Properties { - f.WriteString(fmt.Sprintf("- `%s`: ", dps.FuncName)) - f.WriteString(strings.Join(dps.Doc, " ")) - f.WriteString("\n") + + mdTable := md.NewTable(len(modu.Fields), 2) + mdTable.SetTitle(0, "") + mdTable.SetTitle(1, "") + + + for i, dps := range modu.Properties { + mdTable.SetContent(i, 0, dps.FuncName) + mdTable.SetContent(i, 1, strings.Join(dps.Doc, " ")) } + f.WriteString(mdTable.String()) f.WriteString("\n") } @@ -563,6 +569,7 @@ func main() { if len(modu.Types) != 0 { f.WriteString("## Types\n") for _, dps := range modu.Types { + f.WriteString("
\n\n") f.WriteString(fmt.Sprintf("## %s\n", dps.FuncName)) for _, doc := range dps.Doc { if !strings.HasPrefix(doc, "---") { @@ -570,12 +577,18 @@ func main() { } } if len(dps.Properties) != 0 { - f.WriteString("### Properties\n") - for _, dps := range dps.Properties { - f.WriteString(fmt.Sprintf("- `%s`: ", dps.FuncName)) - f.WriteString(strings.Join(dps.Doc, " ")) - f.WriteString("\n") + f.WriteString("## Object properties\n") + + mdTable := md.NewTable(len(dps.Properties), 2) + mdTable.SetTitle(0, "") + mdTable.SetTitle(1, "") + + for i, d := range dps.Properties { + mdTable.SetContent(i, 0, d.FuncName) + mdTable.SetContent(i, 1, strings.Join(d.Doc, " ")) } + f.WriteString(mdTable.String()) + f.WriteString("\n") } f.WriteString("\n") f.WriteString("### Methods\n") diff --git a/docs/api/hilbish/_index.md b/docs/api/hilbish/_index.md index 2fb9aa7..3bfb92b 100644 --- a/docs/api/hilbish/_index.md +++ b/docs/api/hilbish/_index.md @@ -33,7 +33,7 @@ interfaces and functions which directly relate to shell functionality. |timeout(cb, time) -> @Timer|Runs the `cb` function after `time` in milliseconds.| |which(name) -> string|Checks if `name` is a valid command.| -## Interface fields +## Static module fields ||| |----|----| |ver|The version of Hilbish| @@ -316,7 +316,9 @@ Will return the path of the binary, or a basename if it's a commander. This function has no parameters. -




## Types +## Types +
+ ## Sink A sink is a structure that has input and/or output to/from a desination. diff --git a/docs/api/hilbish/hilbish.jobs.md b/docs/api/hilbish/hilbish.jobs.md index ecc045e..290fe6f 100644 --- a/docs/api/hilbish/hilbish.jobs.md +++ b/docs/api/hilbish/hilbish.jobs.md @@ -24,7 +24,7 @@ interactive usage or with the functions defined below for use in external runner |last() -> @Job|Returns the last added job from the table.| ## Functions -




+

hilbish.jobs.add(cmdstr, args, execPath) @@ -90,16 +90,21 @@ This function has no parameters.

## Types +
+ ## Job The Job type describes a Hilbish job. -### Properties -- `cmd`: The user entered command string for the job. -- `running`: Whether the job is running or not. -- `id`: The ID of the job in the job table -- `pid`: The Process ID -- `exitCode`: The last exit code of the job. -- `stdout`: The standard output of the job. This just means the normal logs of the process. -- `stderr`: The standard error stream of the process. This (usually) includes error messages of the job. +## Object properties +||| +|----|----| +|cmd|The user entered command string for the job.| +|running|Whether the job is running or not.| +|id|The ID of the job in the job table| +|pid|The Process ID| +|exitCode|The last exit code of the job.| +|stdout|The standard output of the job. This just means the normal logs of the process.| +|stderr|The standard error stream of the process. This (usually) includes error messages of the job.| + ### Methods #### background() diff --git a/docs/api/hilbish/hilbish.os.md b/docs/api/hilbish/hilbish.os.md index 3abd8f7..7749e3d 100644 --- a/docs/api/hilbish/hilbish.os.md +++ b/docs/api/hilbish/hilbish.os.md @@ -12,7 +12,7 @@ The `os` interface provides simple text information properties about the current OS on the systen. This mainly includes the name and version. -## Interface fields +## Static module fields ||| |----|----| |family|Family name of the current OS| diff --git a/docs/api/hilbish/hilbish.timers.md b/docs/api/hilbish/hilbish.timers.md index 186c1af..f996bb4 100644 --- a/docs/api/hilbish/hilbish.timers.md +++ b/docs/api/hilbish/hilbish.timers.md @@ -36,14 +36,14 @@ print(t.running) // true |
create(type, time, callback) -> @Timer|Creates a timer that runs based on the specified `time` in milliseconds.| |get(id) -> @Timer|Retrieves a timer via its ID.| -## Interface fields +## Static module fields ||| |----|----| |INTERVAL|Constant for an interval timer type| |TIMEOUT|Constant for a timeout timer type| ## Functions -