Skip to content

Commit

Permalink
Tweaks to P-List Viewer operation
Browse files Browse the repository at this point in the history
  • Loading branch information
n1474335 committed Jul 8, 2022
1 parent 2858a74 commit 7d4e554
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/core/config/Categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
"Frequency distribution",
"Index of Coincidence",
"Chi Square",
"PLIST Viewer",
"P-list Viewer",
"Disassemble x86",
"Pseudo-Random Number Generator",
"Generate UUID",
Expand Down
33 changes: 10 additions & 23 deletions src/core/operations/PLISTViewer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br><br>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 = [];
}

/**
Expand All @@ -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("<plist"))
.replace(/<plist.+>/g, "plist => ")
.replace(/<dict>/g, "{")
Expand Down Expand Up @@ -143,4 +130,4 @@ class PLISTViewer extends Operation {
}
}

export default PLISTViewer;
export default PlistViewer;

0 comments on commit 7d4e554

Please sign in to comment.