Module TableMaker
Easy formatting for text tables
Functions
addColumn (options, position) | Adds a column definition for the table. |
deleteColumn (position) | Deletes a column at the given position |
replaceColumn (options, position) | Replaces a column at a specific position with the newly provided formatting |
addRow (columnEntries, position) | Adds a row of output to the table |
deleteRow (position) | Deletes the row at the given position |
replaceRow (columnEntries, position) | Replaces a row of output in the table |
setCell (row, column, entry) | Sets a specific cell's display information |
enablePopups () | enables making cells which incorporate insertLink/insertPopup |
enableAutoEcho () | enables autoEcho so that when assemble is called it echos automatically |
disableAutoEcho () | disables autoecho. |
enableAutoClear () | Enables automatically clearing the miniconsole we echo to |
disableAutoClear () | Disables automatically clearing the miniconsole we echo to |
setAutoEchoConsole (console) | Set the miniconsole to echo to |
assemble () | Assemble the table. |
new (options) | Creates and returns a new TableMaker. |
Functions
- addColumn (options, position)
-
Adds a column definition for the table.
Parameters:
- options table Table of options suitable for a TextFormatter object. See https://github.com/demonnic/fText/wiki/fText
- position number The position of the column you're adding, counting from the left. If not provided will add it as the last column
- deleteColumn (position)
-
Deletes a column at the given position
Parameters:
- position number the column you wish to delete
- replaceColumn (options, position)
-
Replaces a column at a specific position with the newly provided formatting
Parameters:
- options table table of options suitable for a TextFormatter object. See https://github.com/demonnic/fText/wiki/fText
- position number which column you are replacing, counting from the left.
- addRow (columnEntries, position)
-
Adds a row of output to the table
Parameters:
- columnEntries table This indexed table contains an entry for each column in the table. Entries in the table must be strings, a table of options for insertPopup or insertLink, or a function which returns one of these things
- position number position for the row you want to add, counting from the top down. If not provided defaults to the last line in the table.
- deleteRow (position)
-
Deletes the row at the given position
Parameters:
- position number the row to delete
- replaceRow (columnEntries, position)
-
Replaces a row of output in the table
Parameters:
- columnEntries table This indexed table contains an entry for each column in the table. Entries in the table must be strings, a table of options for insertPopup or insertLink, or a function which returns one of these things
- position number position for the row you want to add, counting from the top down.
- setCell (row, column, entry)
-
Sets a specific cell's display information
Parameters:
- row number the row number of the cell, counted from the top down
- column number the column number of the cell, counted from the left
- entry What to set the entry to. Must be a string, or a table of options for insertLink/insertPopup if allowPopups is set. Or a function which returns one of these things
- enablePopups ()
- enables making cells which incorporate insertLink/insertPopup
- enableAutoEcho ()
- enables autoEcho so that when assemble is called it echos automatically
- disableAutoEcho ()
- disables autoecho. Cannot be used if allowPopups is set
- enableAutoClear ()
- Enables automatically clearing the miniconsole we echo to
- disableAutoClear ()
- Disables automatically clearing the miniconsole we echo to
- setAutoEchoConsole (console)
-
Set the miniconsole to echo to
Parameters:
- console The miniconsole to autoecho to. Set to "main" or do not pass the parameter to autoecho to the main console. Can be a string name of the console, or a Geyser MiniConsole
- assemble ()
- Assemble the table. If autoEcho is enabled/set to true, will automatically echo. Otherwise, returns the formatted string to echo the table
- new (options)
-
Creates and returns a new TableMaker. See https://github.com/demonnic/fText/wiki/TableMaker for valid entries to the options table.
Parameters:
- options table table of options for the TableMaker object