mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-02-12 23:48:41 -06:00
bat/c#/shell/ps1
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using BasicNodes.Scripting;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
@@ -10,12 +8,12 @@ namespace FileFlows.BasicNodes.Scripting;
|
||||
/// <summary>
|
||||
/// Flow element that executes a bat script
|
||||
/// </summary>
|
||||
public class BatScript : ScriptBase
|
||||
public class BatchScript : ScriptBase
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Icon => "svg:dos";
|
||||
/// <inheritdoc />
|
||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/bat-script";
|
||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/scripting/batch-script";
|
||||
/// <inheritdoc />
|
||||
protected override ScriptLanguage Language => ScriptLanguage.Batch;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
namespace BasicNodes.Scripting;
|
||||
namespace FileFlows.BasicNodes.Scripting;
|
||||
|
||||
/// <summary>
|
||||
/// Flow element that executes a CSharp script
|
||||
@@ -19,6 +19,9 @@ public class CSharpScript : ScriptBase
|
||||
/// <inheritdoc />
|
||||
protected override ScriptLanguage Language => ScriptLanguage.CSharp;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Group => "Scripting:1";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the code to execute
|
||||
/// </summary>
|
||||
|
||||
@@ -19,10 +19,10 @@ public class Function : Node
|
||||
/// <inheritdoc />
|
||||
public override bool FailureNode => true;
|
||||
/// <inheritdoc />
|
||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/function";
|
||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/scripting/function";
|
||||
/// <inheritdoc />
|
||||
public override string Group => "Scripting";
|
||||
|
||||
public override string Group => "Scripting:0";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of outputs
|
||||
/// </summary>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using BasicNodes.Scripting;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.ComponentModel;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
namespace BasicNodes.Scripting;
|
||||
namespace FileFlows.BasicNodes.Scripting;
|
||||
|
||||
/// <summary>
|
||||
/// Base for a script
|
||||
@@ -46,6 +46,7 @@ public abstract class ScriptBase : Node
|
||||
var result = args.ScriptExecutor.Execute(new()
|
||||
{
|
||||
Args = args,
|
||||
Logger = args.Logger,
|
||||
Code = Language is ScriptLanguage.CSharp or ScriptLanguage.JavaScript ? Code : args.ReplaceVariables(Code),
|
||||
ScriptType = ScriptType.Flow,
|
||||
Language = Language
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using BasicNodes.Scripting;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
"1": "Library Folder"
|
||||
}
|
||||
},
|
||||
"BatScript": {
|
||||
"Label": "Batch (.bat)",
|
||||
"BatchScript": {
|
||||
"Label": "Batch Script (.bat)",
|
||||
"Description": "Allows you to execute a batch (.bat) script in a Windows environment.",
|
||||
"Outputs": {
|
||||
"1": "returned 1",
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
},
|
||||
"ShellScript": {
|
||||
"Label": "Shell (.sh))",
|
||||
"Label": "Shell Script (.sh)",
|
||||
"Description": "Allows you to execute a shell (.sh) script in a Unix-like environment.",
|
||||
"Outputs": {
|
||||
"1": "returned 1",
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
},
|
||||
"PowerShellScript": {
|
||||
"Label": "PowerShell (.ps1)",
|
||||
"Label": "PowerShell Script (.ps1)",
|
||||
"Description": "Allows you to execute a PowerShell (.ps1) script in a Windows environment.",
|
||||
"Outputs": {
|
||||
"1": "returned 1",
|
||||
@@ -286,6 +286,7 @@
|
||||
}
|
||||
},
|
||||
"Function": {
|
||||
"Label": "Function",
|
||||
"Outputs": {
|
||||
"1": "returned 1",
|
||||
"2": "returned 2",
|
||||
|
||||
Reference in New Issue
Block a user