From 7d4e5545715ed6b279e3d6860ae537fd70c986c4 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 8 Jul 2022 15:26:33 +0100 Subject: [PATCH] Tweaks to P-List Viewer operation --- src/core/config/Categories.json | 2 +- src/core/operations/PLISTViewer.mjs | 33 +++++++++-------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json index 240ddbc3..a2c85ea3 100644 --- a/src/core/config/Categories.json +++ b/src/core/config/Categories.json @@ -457,7 +457,7 @@ "Frequency distribution", "Index of Coincidence", "Chi Square", - "PLIST Viewer", + "P-list Viewer", "Disassemble x86", "Pseudo-Random Number Generator", "Generate UUID", diff --git a/src/core/operations/PLISTViewer.mjs b/src/core/operations/PLISTViewer.mjs index b8a90c5b..67a42359 100644 --- a/src/core/operations/PLISTViewer.mjs +++ b/src/core/operations/PLISTViewer.mjs @@ -7,36 +7,23 @@ import Operation from "../Operation.mjs"; /** - * PLIST Viewer operation + * P-list Viewer operation */ -class PLISTViewer extends Operation { +class PlistViewer extends Operation { /** - * PLISTViewer constructor + * PlistViewer constructor */ constructor() { super(); - this.name = "PLIST Viewer"; - this.module = "Other"; - this.description = "Converts PLISTXML file into a human readable format."; - this.infoURL = ""; + this.name = "P-list Viewer"; + this.module = "Default"; + this.description = "In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files.

This operation displays plist files in a human readable format."; + this.infoURL = "https://wikipedia.org/wiki/Property_list"; this.inputType = "string"; this.outputType = "string"; - this.args = [ - /* Example arguments. See the project wiki for full details. - { - name: "First arg", - type: "string", - value: "Don't Panic" - }, - { - name: "Second arg", - type: "number", - value: 42 - } - */ - ]; + this.args = []; } /** @@ -46,7 +33,7 @@ class PLISTViewer extends Operation { */ run(input, args) { - // Regexes are designed to transform the xml format into a reasonably more readable string format. + // Regexes are designed to transform the xml format into a more readable string format. input = input.slice(input.indexOf("/g, "plist => ") .replace(//g, "{") @@ -143,4 +130,4 @@ class PLISTViewer extends Operation { } } -export default PLISTViewer; +export default PlistViewer;