mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "2399c459609a0172e47f5ea0e38de401c5e7d3f7" and "b7af6177ba436d113e72e23af658e4094f8ee990" have entirely different histories.
		
	
	
		
			2399c45960
			...
			b7af6177ba
		
	
		
| @ -19,6 +19,8 @@ for _, fname in ipairs(files) do | ||||
| 	local docPiece = {} | ||||
| 	local lines = {} | ||||
| 	local lineno = 0 | ||||
| 	local tocPos | ||||
| 	local tocSearch = false | ||||
| 	for line in f:lines() do | ||||
| 		lineno = lineno + 1 | ||||
| 		lines[lineno] = line | ||||
| @ -135,12 +137,11 @@ for iface, dps in pairs(pieces) do | ||||
| 		sig = sig .. ')' | ||||
| 
 | ||||
| 		if tocPos then | ||||
| 			local pos = f:seek() | ||||
| 			f:seek('set', tocPos) | ||||
| 			local contents = f:read '*a' | ||||
| 			f:seek('set', tocPos) | ||||
| 			local tocLine = string.format('|<a href="#%s">%s</a>|%s|\n', func, string.format('%s(%s)', func, params), docs.description[1]) | ||||
| 			f:write(tocLine .. contents) | ||||
| 			f:seek 'end' | ||||
| 			f:write(string.format('|<a href="#%s">%s</a>|%s|\n', func, string.format('%s(%s)', func, params), docs.description[1])) | ||||
| 			tocPos = f:seek() | ||||
| 			f:seek('set', pos) | ||||
| 		end | ||||
| 
 | ||||
| 		f:write(string.format('<hr>\n<div id=\'%s\'>\n', func)) | ||||
|  | ||||
| @ -1,107 +0,0 @@ | ||||
| --- | ||||
| title: Module hilbish.messages | ||||
| description: No description. | ||||
| layout: doc | ||||
| menu: | ||||
|   docs: | ||||
|     parent: "API" | ||||
| --- | ||||
| 
 | ||||
| <hr> | ||||
| <div id='all'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.all() | ||||
| <a href="#all" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='clear'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.clear() | ||||
| <a href="#clear" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='delete'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.delete() | ||||
| <a href="#delete" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='read'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.read() | ||||
| <a href="#read" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='send'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.send(message) | ||||
| <a href="#send" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| Sends a message. | ||||
| #### Parameters | ||||
| `message` **`hilbish.message`** | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='readAll'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.readAll() | ||||
| <a href="#readAll" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='unreadCount'> | ||||
| <h4 class='heading'> | ||||
| hilbish.messages.unreadCount() | ||||
| <a href="#unreadCount" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| 
 | ||||
| #### Parameters | ||||
| This function has no parameters.   | ||||
| </div> | ||||
| 
 | ||||
| @ -57,37 +57,13 @@ end) | ||||
| |<a href="#runner.setMode">setMode(cb)</a>|This is the same as the `hilbish.runnerMode` function.| | ||||
| |<a href="#runner.lua">lua(cmd)</a>|Evaluates `cmd` as Lua input. This is the same as using `dofile`| | ||||
| |<a href="#runner.sh">sh(cmd)</a>|Runs a command in Hilbish's shell script interpreter.| | ||||
| |<a href="#exec">exec(cmd, runnerName)</a>|Executes cmd with a runner. If runnerName isn't passed, it uses| | ||||
| |<a href="#set">set(name, runner)</a>|Sets a runner by name. The runner table must have the run function in it.| | ||||
| |<a href="#get">get(name)</a>|Get a runner by name.| | ||||
| |<a href="#add">add(name, runner)</a>|Adds a runner to the table of available runners. If runner is a table,| | ||||
| |<a href="#setCurrent">setCurrent(name)</a>|Sets the current interactive/command line runner mode.| | ||||
| |<a href="#getCurrent">getCurrent()</a>|Returns the current runner by name.| | ||||
| 
 | ||||
| <hr> | ||||
| <div id='runner.setMode'> | ||||
| <h4 class='heading'> | ||||
| hilbish.runner.setMode(cb) | ||||
| <a href="#runner.setMode" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
| </h4> | ||||
| 
 | ||||
| This is the same as the `hilbish.runnerMode` function.   | ||||
| It takes a callback, which will be used to execute all interactive input.   | ||||
| In normal cases, neither callbacks should be overrided by the user,   | ||||
| as the higher level functions listed below this will handle it.   | ||||
| 
 | ||||
| #### Parameters | ||||
| `function` **`cb`**   | ||||
| 
 | ||||
| 
 | ||||
| </div> | ||||
| 
 | ||||
| <hr> | ||||
| <div id='runner.lua'> | ||||
| <h4 class='heading'> | ||||
| hilbish.runner.lua(cmd) | ||||
| |<a href="#setCurrent">setCurrent(name)</a>|Sets the current interactive/command line runner mode.| | ||||
| |<a href="#add">add(name, runner)</a>|Adds a runner to the table of available runners. If runner is a table,| | ||||
| |<a href="#get">get(name)</a>|Get a runner by name.| | ||||
| |<a href="#set">set(name, runner)</a>|Sets a runner by name. The runner table must have the run function in it.| | ||||
| |<a href="#exec">exec(cmd, runnerName)</a>|Executes cmd with a runner. If runnerName isn't passed, it uses| | ||||
| d) | ||||
| <a href="#runner.lua" class='heading-link'> | ||||
| 	<i class="fas fa-paperclip"></i> | ||||
| </a> | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
| -- @module hilbish.messages | ||||
| local bait = require 'bait' | ||||
| local commander = require 'commander' | ||||
| local lunacolors = require 'lunacolors' | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user