bat/c#/shell/ps1

This commit is contained in:
John Andrews
2024-08-05 09:19:16 +12:00
parent 9ad51503b8
commit e65c4d6113
8 changed files with 70 additions and 16 deletions
@@ -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;
+4 -1
View File
@@ -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>
+3 -3
View File
@@ -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>
-2
View File
@@ -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 -1
View File
@@ -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
View File
@@ -1,6 +1,5 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using BasicNodes.Scripting;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;