Tidied up 'To Table' operation, adding better CSV parsing support.

This commit is contained in:
n1474335 2018-05-04 16:10:22 +00:00
parent 8fc5f59647
commit 8556bdcdeb
4 changed files with 43 additions and 58 deletions

View file

@ -67,7 +67,6 @@ const Categories = [
"Encode text",
"Decode text",
"Swap endianness",
"To Table",
]
},
{
@ -183,6 +182,7 @@ const Categories = [
"To Lower case",
"Add line numbers",
"Remove line numbers",
"To Table",
"Reverse",
"Sort",
"Unique",

View file

@ -616,26 +616,22 @@ const OperationConfig = {
},
"To Table": {
module: "Default",
description: "Renders data as a table. Data can be split on different characters and output as a HTML or ASCII table with optional header row.",
description: "Data can be split on different characters and rendered as an HTML or ASCII table with an optional header row.<br><br>Supports the CSV (Comma Separated Values) file format by default. Change the cell delimiter argument to <code>\\t</code> to support TSV (Tab Separated Values) or <code>|</code> for PSV (Pipe Separated Values).<br><br>You can enter as many delimiters as you like. Each character will be treat as a separate possible delimiter.",
inputType: "string",
outputType: "html",
highlight: false,
highlightReverse: false,
manualBake: false,
args: [
{
name: "Select separator",
type: "populateOption",
value: ToTable.SEPARATORS,
target: 1
},
{
name: "Separator",
type: "string",
name: "Cell delimiters",
type: "binaryShortString",
value: ","
},
{
name: "First row header?",
name: "Row delimiters",
type: "binaryShortString",
value: "\\n\\r"
},
{
name: "Make first row header",
type: "boolean",
value: false
},