mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-06 02:52:02 +00:00
Compare commits
No commits in common. "88dec05bbbf0d24ccbd9372861dcaa6248b1c607" and "6514c8c93758321efec423ff45e98cd5e8bf7043" have entirely different histories.
88dec05bbb
...
6514c8c937
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
@ -11,14 +11,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
- name: Download Task
|
||||
run: 'sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d'
|
||||
- name: Build
|
||||
run: ./bin/task
|
||||
- name: Run docgen (go-written)
|
||||
- name: Run docgen
|
||||
run: go run cmd/docgen/docgen.go
|
||||
- name: Run docgen (lua-written)
|
||||
run: ./hilbish cmd/docgen/docgen.lua
|
||||
- name: Commit new docs
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
|
@ -116,17 +116,12 @@ for iface, dps in pairs(pieces) do
|
||||
local newOrNotNature = exists and mod ~= 'nature'
|
||||
|
||||
local f <close> = io.open(path, newOrNotNature and 'r+' or 'w+')
|
||||
local tocPos
|
||||
if not newOrNotNature then
|
||||
f:write(string.format(header, 'Module', iface, (descriptions[iface] and #descriptions[iface] > 0) and descriptions[iface][1] or 'No description.', docParent))
|
||||
if descriptions[iface] and #descriptions[iface] > 0 then
|
||||
table.remove(descriptions[iface], 1)
|
||||
f:write(string.format('\n## Introduction\n%s\n\n', table.concat(descriptions[iface], '\n')))
|
||||
f:write('## Functions\n')
|
||||
f:write([[|||
|
||||
|----|----|
|
||||
]])
|
||||
tocPos = f:seek()
|
||||
end
|
||||
end
|
||||
print(f)
|
||||
@ -134,6 +129,7 @@ for iface, dps in pairs(pieces) do
|
||||
print('mod and path:', mod, path)
|
||||
|
||||
local tocSearch = false
|
||||
local tocPos
|
||||
for line in f:lines() do
|
||||
if line:match '^## Functions' then
|
||||
tocSearch = true
|
||||
|
@ -20,15 +20,6 @@ The `hilbish.message` type is a table with the following keys:
|
||||
`read` (boolean): Whether the full message has been read or not.
|
||||
|
||||
## Functions
|
||||
|||
|
||||
|----|----|
|
||||
|<a href="#unreadCount">unreadCount()</a>|Returns the amount of unread messages.|
|
||||
|<a href="#readAll">readAll()</a>|Marks all messages as read.|
|
||||
|<a href="#send">send(message)</a>|Sends a message.|
|
||||
|<a href="#read">read(idx)</a>|Marks a message at `idx` as read.|
|
||||
|<a href="#delete">delete(idx)</a>|Deletes the message at `idx`.|
|
||||
|<a href="#clear">clear()</a>|Deletes all messages.|
|
||||
|<a href="#all">all()</a>|Returns all messages.|
|
||||
<hr>
|
||||
<div id='all'>
|
||||
<h4 class='heading'>
|
||||
|
@ -13,13 +13,6 @@ The dirs module defines a small set of functions to store and manage
|
||||
directories.
|
||||
|
||||
## Functions
|
||||
|||
|
||||
|----|----|
|
||||
|<a href="#recent">recent(idx)</a>|Get entry from recent directories list based on index.|
|
||||
|<a href="#pop">pop(num)</a>|Remove the specified amount of dirs from the recent directories list.|
|
||||
|<a href="#peak">peak(num)</a>|Look at `num` amount of recent directories, starting from the latest.|
|
||||
|<a href="#push">push(dir)</a>|Add `dir` to the recent directories list.|
|
||||
|<a href="#setOld">setOld(d)</a>|Sets the old directory string.|
|
||||
<hr>
|
||||
<div id='setOld'>
|
||||
<h4 class='heading'>
|
||||
|
@ -15,11 +15,6 @@ This is only documented for the sake of it. It's only intended use
|
||||
is by the Greenhouse pager.
|
||||
|
||||
## Functions
|
||||
|||
|
||||
|----|----|
|
||||
|<a href="#renderCodeBlock">renderCodeBlock(text)</a>|Assembles and renders a code block. This returns|
|
||||
|<a href="#highlight">highlight(text)</a>|Performs basic Lua code highlighting.|
|
||||
|<a href="#renderInfoBlock">renderInfoBlock(type, text)</a>|Renders an info block. An info block is a block of text with|
|
||||
<hr>
|
||||
<div id='renderInfoBlock'>
|
||||
<h4 class='heading'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user