diff --git a/BasicNodes/BasicNodes.csproj b/BasicNodes/BasicNodes.csproj index d8fec414..05de7f56 100644 Binary files a/BasicNodes/BasicNodes.csproj and b/BasicNodes/BasicNodes.csproj differ diff --git a/BasicNodes/BasicNodes.en.json b/BasicNodes/BasicNodes.en.json index 54d96138..f16e9aa5 100644 --- a/BasicNodes/BasicNodes.en.json +++ b/BasicNodes/BasicNodes.en.json @@ -8,80 +8,87 @@ } }, "Flow":{ - "Parts":{ - "InputFile":{ - "Description":"An input node for a library file. This is required and is the starting point of a flow. Any input node can be used, just one is required." - }, - "CopyFile":{ - "Description":"Copies a file to the destination path", - "Fields":{ - "DestinationPath":"Destination Path", - "DestinationPath-Help":"The path where the file will be copied too", - "CopyFolder":"Copy Folder", - "CopyFolder-Help" :"If the relative library folder structure should be copied too" - } - }, - "Log":{ - "Description":"Logs a message to the flow log", - "Fields":{ - "LogType":"Type", - "Message":"Message" - } - }, - "FileExtension":{ - "Description":"Checks if the file has one of the configured extensions.\n\nOutput 1: Matches\nOutput 2: Does not match", - "Fields":{ - "Extensions":"Extensions", - "Extensions-Help":"A list of case insensitive file extensions that will be matched against.\nOuput 1 Matches\nOutput 2: Does not match" - } - }, - "FileSize":{ - "Description":"Checks if the file size matches the configured parameters.\n\nOutput 1: Matches\nOutput 2: Does not match", - "Fields":{ - "Comparison":"Comparison", - "Lower":"Lower", - "Lower-Suffix":"MB", - "Lower-Help":"The value it must bet greater than", - "Upper":"Upper", - "Upper-Suffix":"MB", - "Upper-Help":"The value it must be less than. Leave as 0 to not test the upper limit." - } - }, - "MoveFile":{ - "Description":"Moves a file to the destination path", - "Fields":{ - "DestinationPath":"Destination Path", - "DestinationPath-Help":"The path where the file will be moved too", - "MoveFolder":"Copy Folder", - "MoveFolder-Help" :"If the relative library folder structure should be copied too", - "DeleteOriginal":"Delete Original", - "DeleteOriginal-Help":"If the original file should be deleted, this will only happen if the working file is different to the original file" - } - }, - "RenameFile":{ - "Description":"Renames the working file", - "Fields":{ - "FileName":"File Name", - "FileName-Help":"The new filename" - } - }, - "DeleteSourceDirectory":{ - "Description":"Deletes the source directory of the original library file", - "Fields":{ - "IfEmpty":"If Empty", - "IfEmpty-Help":"Only delete the source directory if the it is empty", - "IncludePatterns":"Include Patterns", - "IncludePatterns-Help":"Optional, if set only files matching these patterns will be counted to see if the folder is empty. Any of these patterns can match." - } - }, - "Function":{ - "Fields":{ - "Outputs":"Outputs", - "Outputs-Help":"The number of outputs this node can have.", - "Code":"Code", - "Code-Help":"return -1 for error and flow to stop\nreturn 0 for flow to complete\nreturn 1 or more for the desired output to be called" - } - } + "Parts": { + "InputFile": { + "Description": "An input node for a library file. This is required and is the starting point of a flow. Any input node can be used, just one is required." + }, + "CopyFile": { + "Description": "Copies a file to the destination path", + "Fields": { + "DestinationPath": "Destination Path", + "DestinationPath-Help": "The path where the file will be copied too", + "CopyFolder": "Copy Folder", + "CopyFolder-Help": "If the relative library folder structure should be copied too" + } + }, + "DeleteSourceDirectory": { + "Description": "Deletes the source directory of the original library file", + "Fields": { + "IfEmpty": "If Empty", + "IfEmpty-Help": "Only delete the source directory if the it is empty", + "IncludePatterns": "Include Patterns", + "IncludePatterns-Help": "Optional, if set only files matching these patterns will be counted to see if the folder is empty. Any of these patterns can match." + } + }, + "FileExtension": { + "Description": "Checks if the file has one of the configured extensions.\n\nOutput 1: Matches\nOutput 2: Does not match", + "Fields": { + "Extensions": "Extensions", + "Extensions-Help": "A list of case insensitive file extensions that will be matched against.\nOuput 1 Matches\nOutput 2: Does not match" + } + }, + "FileSize": { + "Description": "Checks if the file size matches the configured parameters.\n\nOutput 1: Matches\nOutput 2: Does not match", + "Fields": { + "Comparison": "Comparison", + "Lower": "Lower", + "Lower-Suffix": "MB", + "Lower-Help": "The value it must bet greater than", + "Upper": "Upper", + "Upper-Suffix": "MB", + "Upper-Help": "The value it must be less than. Leave as 0 to not test the upper limit." + } + }, + "Function": { + "Fields": { + "Outputs": "Outputs", + "Outputs-Help": "The number of outputs this node can have.", + "Code": "Code", + "Code-Help": "return -1 for error and flow to stop\nreturn 0 for flow to complete\nreturn 1 or more for the desired output to be called" + } + }, + "Log": { + "Description": "Logs a message to the flow log", + "Fields": { + "LogType": "Type", + "Message": "Message" + } + }, + "MoveFile": { + "Description": "Moves a file to the destination path", + "Fields": { + "DestinationPath": "Destination Path", + "DestinationPath-Help": "The path where the file will be moved too", + "MoveFolder": "Copy Folder", + "MoveFolder-Help": "If the relative library folder structure should be copied too", + "DeleteOriginal": "Delete Original", + "DeleteOriginal-Help": "If the original file should be deleted, this will only happen if the working file is different to the original file" + } + }, + "Pattern": { + "Description": "Tests the working file and original file against a regular expression.\n\nOutput 1: Matches expression\nOutput 2: Does not match", + "Fields": { + "Pattern": "Pattern", + "Pattern-Help": "A regular expression, using the C# specifciation for regular expressions." + } + }, + "RenameFile": { + "Description": "Renames the working file", + "Fields": { + "FileName": "File Name", + "FileName-Help": "The new filename" + } } + } } } \ No newline at end of file diff --git a/BasicNodes/Functions/PatternMatch.cs b/BasicNodes/Functions/PatternMatch.cs index c9b96ef7..dc2e499e 100644 --- a/BasicNodes/Functions/PatternMatch.cs +++ b/BasicNodes/Functions/PatternMatch.cs @@ -11,11 +11,10 @@ namespace FileFlows.BasicNodes.Functions public override FlowElementType Type => FlowElementType.Logic; public override string Icon => "fas fa-equals"; - [DefaultValue(".*?")] - [RegularExpression(2)] + [DefaultValue("")] + [Text(1)] public string Pattern { get; set; } - delegate void LogDelegate(params object[] values); public override int Execute(NodeParameters args) { if (string.IsNullOrEmpty(Pattern)) diff --git a/Builds/BasicNodes.zip b/Builds/BasicNodes.zip index 7dd52583..ce33de4d 100644 Binary files a/Builds/BasicNodes.zip and b/Builds/BasicNodes.zip differ diff --git a/Builds/VideoNodes.zip b/Builds/VideoNodes.zip index fd95c6e1..dc930177 100644 Binary files a/Builds/VideoNodes.zip and b/Builds/VideoNodes.zip differ diff --git a/VideoNodes/VideoNodes.csproj b/VideoNodes/VideoNodes.csproj index b668a4c8..9dc66076 100644 Binary files a/VideoNodes/VideoNodes.csproj and b/VideoNodes/VideoNodes.csproj differ diff --git a/plugins.json b/plugins.json index d979dd9b..ced96e70 100644 --- a/plugins.json +++ b/plugins.json @@ -1,12 +1,12 @@ [ { "Name": "BasicNodes", - "Version": "0.0.1.4", + "Version": "0.0.1.5", "Package": "https://github.com/revenz/FileFlowsPlugins/blob/master/Builds/BasicNodes.zip?raw=true" }, { "Name": "VideoNodes", - "Version": "0.0.1.4", + "Version": "0.0.1.5", "Package": "https://github.com/revenz/FileFlowsPlugins/blob/master/Builds/VideoNodes.zip?raw=true" } ]