mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Tidied up charts operations
This commit is contained in:
parent
f0b48acaf9
commit
1640859542
7 changed files with 16 additions and 14 deletions
|
@ -366,10 +366,6 @@
|
||||||
"Remove EXIF",
|
"Remove EXIF",
|
||||||
"Extract EXIF",
|
"Extract EXIF",
|
||||||
"Split Colour Channels",
|
"Split Colour Channels",
|
||||||
"Hex Density chart",
|
|
||||||
"Scatter chart",
|
|
||||||
"Series chart",
|
|
||||||
"Heatmap chart",
|
|
||||||
"Rotate Image",
|
"Rotate Image",
|
||||||
"Resize Image",
|
"Resize Image",
|
||||||
"Blur Image",
|
"Blur Image",
|
||||||
|
@ -382,7 +378,11 @@
|
||||||
"Image Filter",
|
"Image Filter",
|
||||||
"Contain Image",
|
"Contain Image",
|
||||||
"Cover Image",
|
"Cover Image",
|
||||||
"Image Hue/Saturation/Lightness"
|
"Image Hue/Saturation/Lightness",
|
||||||
|
"Hex Density chart",
|
||||||
|
"Scatter chart",
|
||||||
|
"Series chart",
|
||||||
|
"Heatmap chart"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -399,6 +399,7 @@
|
||||||
"Generate QR Code",
|
"Generate QR Code",
|
||||||
"Parse QR Code",
|
"Parse QR Code",
|
||||||
"Haversine distance",
|
"Haversine distance",
|
||||||
|
"HTML To Text",
|
||||||
"Generate Lorem Ipsum",
|
"Generate Lorem Ipsum",
|
||||||
"Numberwang",
|
"Numberwang",
|
||||||
"XKCD Random Number"
|
"XKCD Random Number"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import OperationError from "../errors/OperationError";
|
import OperationError from "../errors/OperationError";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -40,6 +40,7 @@ export const COLOURS = {
|
||||||
* @param {string} recordDelimiter
|
* @param {string} recordDelimiter
|
||||||
* @param {string} fieldDelimiter
|
* @param {string} fieldDelimiter
|
||||||
* @param {boolean} columnHeadingsAreIncluded - whether we should skip the first record
|
* @param {boolean} columnHeadingsAreIncluded - whether we should skip the first record
|
||||||
|
* @param {number} length
|
||||||
* @returns {Object[]}
|
* @returns {Object[]}
|
||||||
*/
|
*/
|
||||||
export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadingsAreIncluded, length) {
|
export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadingsAreIncluded, length) {
|
||||||
|
@ -58,7 +59,7 @@ export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadings
|
||||||
values.push(split);
|
values.push(split);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return { headings, values};
|
return { headings, values };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +75,8 @@ export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadings
|
||||||
export function getScatterValues(input, recordDelimiter, fieldDelimiter, columnHeadingsAreIncluded) {
|
export function getScatterValues(input, recordDelimiter, fieldDelimiter, columnHeadingsAreIncluded) {
|
||||||
let { headings, values } = getValues(
|
let { headings, values } = getValues(
|
||||||
input,
|
input,
|
||||||
recordDelimiter, fieldDelimiter,
|
recordDelimiter,
|
||||||
|
fieldDelimiter,
|
||||||
columnHeadingsAreIncluded,
|
columnHeadingsAreIncluded,
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
|
@ -96,6 +98,7 @@ export function getScatterValues(input, recordDelimiter, fieldDelimiter, columnH
|
||||||
return { headings, values };
|
return { headings, values };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets values from input for a scatter plot with colour from the third column.
|
* Gets values from input for a scatter plot with colour from the third column.
|
||||||
*
|
*
|
||||||
|
|
|
@ -20,7 +20,7 @@ class HTMLToText extends Operation {
|
||||||
|
|
||||||
this.name = "HTML To Text";
|
this.name = "HTML To Text";
|
||||||
this.module = "Default";
|
this.module = "Default";
|
||||||
this.description = "Converts a HTML ouput from an operation to a readable string instead of being rendered in the DOM.";
|
this.description = "Converts an HTML output from an operation to a readable string instead of being rendered in the DOM.";
|
||||||
this.infoURL = "";
|
this.infoURL = "";
|
||||||
this.inputType = "html";
|
this.inputType = "html";
|
||||||
this.outputType = "string";
|
this.outputType = "string";
|
||||||
|
|
|
@ -9,7 +9,6 @@ import * as d3temp from "d3";
|
||||||
import * as nodomtemp from "nodom";
|
import * as nodomtemp from "nodom";
|
||||||
import { getScatterValues, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
import { getScatterValues, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||||
|
|
||||||
|
|
||||||
import Operation from "../Operation";
|
import Operation from "../Operation";
|
||||||
import OperationError from "../errors/OperationError";
|
import OperationError from "../errors/OperationError";
|
||||||
import Utils from "../Utils";
|
import Utils from "../Utils";
|
||||||
|
|
|
@ -21,7 +21,7 @@ class JavaScriptParser extends Operation {
|
||||||
this.name = "JavaScript Parser";
|
this.name = "JavaScript Parser";
|
||||||
this.module = "Code";
|
this.module = "Code";
|
||||||
this.description = "Returns an Abstract Syntax Tree for valid JavaScript code.";
|
this.description = "Returns an Abstract Syntax Tree for valid JavaScript code.";
|
||||||
this.infoURL = "https://en.wikipedia.org/wiki/Abstract_syntax_tree";
|
this.infoURL = "https://wikipedia.org/wiki/Abstract_syntax_tree";
|
||||||
this.inputType = "string";
|
this.inputType = "string";
|
||||||
this.outputType = "string";
|
this.outputType = "string";
|
||||||
this.args = [
|
this.args = [
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PEMToHex extends Operation {
|
||||||
this.name = "PEM to Hex";
|
this.name = "PEM to Hex";
|
||||||
this.module = "PublicKey";
|
this.module = "PublicKey";
|
||||||
this.description = "Converts PEM (Privacy Enhanced Mail) format to a hexadecimal DER (Distinguished Encoding Rules) string.";
|
this.description = "Converts PEM (Privacy Enhanced Mail) format to a hexadecimal DER (Distinguished Encoding Rules) string.";
|
||||||
this.infoURL = "https://en.wikipedia.org/wiki/X.690#DER_encoding";
|
this.infoURL = "https://wikipedia.org/wiki/X.690#DER_encoding";
|
||||||
this.inputType = "string";
|
this.inputType = "string";
|
||||||
this.outputType = "string";
|
this.outputType = "string";
|
||||||
this.args = [];
|
this.args = [];
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
import * as d3temp from "d3";
|
import * as d3temp from "d3";
|
||||||
import * as nodomtemp from "nodom";
|
import * as nodomtemp from "nodom";
|
||||||
|
|
||||||
import { getScatterValues, getScatterValuesWithColour, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
import { getScatterValues, getScatterValuesWithColour, RECORD_DELIMITER_OPTIONS, COLOURS, FIELD_DELIMITER_OPTIONS } from "../lib/Charts";
|
||||||
|
|
||||||
import Operation from "../Operation";
|
import Operation from "../Operation";
|
||||||
|
@ -30,7 +29,7 @@ class ScatterChart extends Operation {
|
||||||
this.name = "Scatter chart";
|
this.name = "Scatter chart";
|
||||||
this.module = "Charts";
|
this.module = "Charts";
|
||||||
this.description = "Plots two-variable data as single points on a graph.";
|
this.description = "Plots two-variable data as single points on a graph.";
|
||||||
this.infoURL = "https://en.wikipedia.org/wiki/Scatter_plot";
|
this.infoURL = "https://wikipedia.org/wiki/Scatter_plot";
|
||||||
this.inputType = "string";
|
this.inputType = "string";
|
||||||
this.outputType = "html";
|
this.outputType = "html";
|
||||||
this.args = [
|
this.args = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue