diff --git a/AudioNodes/InputNodes/AudioFile.cs b/AudioNodes/InputNodes/AudioFile.cs index d03a2bcf..20b85853 100644 --- a/AudioNodes/InputNodes/AudioFile.cs +++ b/AudioNodes/InputNodes/AudioFile.cs @@ -9,6 +9,8 @@ namespace FileFlows.AudioNodes public override int Outputs => 1; public override FlowElementType Type => FlowElementType.Input; + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/audio-file"; + private Dictionary _Variables; public override Dictionary Variables => _Variables; public AudioFile() diff --git a/AudioNodes/Nodes/AudioFileNormalization.cs b/AudioNodes/Nodes/AudioFileNormalization.cs index b569a5f0..9ab5355f 100644 --- a/AudioNodes/Nodes/AudioFileNormalization.cs +++ b/AudioNodes/Nodes/AudioFileNormalization.cs @@ -9,6 +9,7 @@ public class AudioFileNormalization : AudioNode public override int Inputs => 1; public override int Outputs => 1; public override FlowElementType Type => FlowElementType.Process; + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/audio-file-normalization"; public override string Icon => "fas fa-volume-up"; diff --git a/AudioNodes/Nodes/ConvertNode.cs b/AudioNodes/Nodes/ConvertNode.cs index 2c7fdb94..45d85b4b 100644 --- a/AudioNodes/Nodes/ConvertNode.cs +++ b/AudioNodes/Nodes/ConvertNode.cs @@ -11,6 +11,7 @@ namespace FileFlows.AudioNodes { public class ConvertToMP3 : ConvertNode { + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/convert-to-mp3"; protected override string Extension => "mp3"; public static List BitrateOptions => ConvertNode.BitrateOptions; protected override List GetArguments() @@ -26,6 +27,7 @@ namespace FileFlows.AudioNodes } public class ConvertToWAV : ConvertNode { + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/convert-to-wav"; protected override string Extension => "wav"; public static List BitrateOptions => ConvertNode.BitrateOptions; protected override List GetArguments() @@ -42,6 +44,7 @@ namespace FileFlows.AudioNodes public class ConvertToAAC : ConvertNode { + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/convert-to-aac"; protected override string Extension => "aac"; public static List BitrateOptions => ConvertNode.BitrateOptions; @@ -60,6 +63,7 @@ namespace FileFlows.AudioNodes } public class ConvertToOGG: ConvertNode { + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/convert-to-ogg"; protected override string Extension => "ogg"; public static List BitrateOptions => ConvertNode.BitrateOptions; protected override List GetArguments() @@ -93,6 +97,7 @@ namespace FileFlows.AudioNodes public class ConvertAudio : ConvertNode { protected override string Extension => Codec; + public override string HelpUrl => "https://docs.fileflows.com/plugins/audio-nodes/convert-audio"; public static List BitrateOptions => ConvertNode.BitrateOptions; diff --git a/BasicNodes/Functions/PatternMatch.cs b/BasicNodes/Functions/PatternMatch.cs index bdf7eae8..b8308aac 100644 --- a/BasicNodes/Functions/PatternMatch.cs +++ b/BasicNodes/Functions/PatternMatch.cs @@ -1,40 +1,57 @@ -namespace FileFlows.BasicNodes.Functions +namespace FileFlows.BasicNodes.Functions; + +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Text.RegularExpressions; +using FileFlows.Plugin; +using FileFlows.Plugin.Attributes; +public class PatternMatch : Node { - using System.ComponentModel; - using System.ComponentModel.DataAnnotations; - using System.Text.RegularExpressions; - using FileFlows.Plugin; - using FileFlows.Plugin.Attributes; - public class PatternMatch : Node + public override int Inputs => 1; + public override int Outputs => 2; + public override FlowElementType Type => FlowElementType.Logic; + public override string Icon => "fas fa-equals"; + public override string HelpUrl => "https://docs.fileflows.com/plugins/basic-nodes/pattern-match"; + + private Dictionary _Variables; + public override Dictionary Variables => _Variables; + public PatternMatch() { - public override int Inputs => 1; - public override int Outputs => 2; - public override FlowElementType Type => FlowElementType.Logic; - public override string Icon => "fas fa-equals"; - public override string HelpUrl => "https://docs.fileflows.com/plugins/basic-nodes/pattern-match"; - - [DefaultValue("")] - [Text(1)] - [Required] - public string Pattern { get; set; } - - public override int Execute(NodeParameters args) + _Variables = new Dictionary() { - if (string.IsNullOrEmpty(Pattern)) - return 1; // no pattern, matches everything + { "PatternMatch", "match from pattern" } + }; + } - try + [DefaultValue("")] + [Text(1)] + [Required] + public string Pattern { get; set; } + + public override int Execute(NodeParameters args) + { + if (string.IsNullOrEmpty(Pattern)) + return 1; // no pattern, matches everything + + try + { + var rgx = new Regex(Pattern); + if (rgx.IsMatch(args.WorkingFile)) { - var rgx = new Regex(Pattern); - if (rgx.IsMatch(args.WorkingFile) || rgx.IsMatch(args.FileName)) - return 1; - return 2; + args.Variables.Add("PatternMatch", rgx.Match(args.WorkingFile).Value); + return 1; } - catch (Exception ex) + if (rgx.IsMatch(args.FileName)) { - args.Logger?.ELog("Pattern error: " + ex.Message); - return -1; + args.Variables.Add("PatternMatch", rgx.Match(args.FileName).Value); + return 1; } + return 2; + } + catch (Exception ex) + { + args.Logger?.ELog("Pattern error: " + ex.Message); + return -1; } } -} \ No newline at end of file +} diff --git a/ImageNodes/Images/ImageFile.cs b/ImageNodes/Images/ImageFile.cs index b696ab4e..f3c0aa33 100644 --- a/ImageNodes/Images/ImageFile.cs +++ b/ImageNodes/Images/ImageFile.cs @@ -6,6 +6,7 @@ public class ImageFile : ImageBaseNode { public override int Outputs => 1; public override FlowElementType Type => FlowElementType.Input; + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-file"; public override string Icon => "fas fa-file-image"; @@ -16,7 +17,7 @@ public class ImageFile : ImageBaseNode _Variables = new Dictionary() { { "img.Width", 1920 }, - { "img.Heigh", 1080 }, + { "img.Height", 1080 }, { "img.Format", "PNG" }, { "img.IsPortrait", true }, { "img.IsLandscape", false } diff --git a/ImageNodes/Images/ImageFlip.cs b/ImageNodes/Images/ImageFlip.cs index 19501876..9caba9eb 100644 --- a/ImageNodes/Images/ImageFlip.cs +++ b/ImageNodes/Images/ImageFlip.cs @@ -7,7 +7,8 @@ public class ImageFlip: ImageNode { public override int Inputs => 1; public override int Outputs => 1; - public override FlowElementType Type => FlowElementType.Process; + public override FlowElementType Type => FlowElementType.Process; + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-flip"; public override string Icon => "fas fa-sync-alt"; [Boolean(2)] diff --git a/ImageNodes/Images/ImageFormat.cs b/ImageNodes/Images/ImageFormat.cs index 3980d6cd..d7de940e 100644 --- a/ImageNodes/Images/ImageFormat.cs +++ b/ImageNodes/Images/ImageFormat.cs @@ -6,7 +6,9 @@ public class ImageFormat: ImageNode { public override int Inputs => 1; public override int Outputs => 2; - public override FlowElementType Type => FlowElementType.Process; + public override FlowElementType Type => FlowElementType.Process; + + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-format"; public override string Icon => "fas fa-file-image"; public override int Execute(NodeParameters args) diff --git a/ImageNodes/Images/ImageIsLandscape.cs b/ImageNodes/Images/ImageIsLandscape.cs index 82918ba5..017d944c 100644 --- a/ImageNodes/Images/ImageIsLandscape.cs +++ b/ImageNodes/Images/ImageIsLandscape.cs @@ -7,6 +7,8 @@ public class ImageIsLandscape: ImageBaseNode public override FlowElementType Type => FlowElementType.Logic; public override string Icon => "fas fa-image"; + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-is-landscape"; + public override int Execute(NodeParameters args) { diff --git a/ImageNodes/Images/ImageResizer.cs b/ImageNodes/Images/ImageResizer.cs index 6d6b2671..a59928e7 100644 --- a/ImageNodes/Images/ImageResizer.cs +++ b/ImageNodes/Images/ImageResizer.cs @@ -17,8 +17,10 @@ public class ImageResizer: ImageNode public override int Outputs => 1; public override FlowElementType Type => FlowElementType.Process; public override string Icon => "fas fa-expand"; - - + + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-resizer"; + + [Select(nameof(ResizeModes), 2)] public ResizeMode Mode { get; set; } diff --git a/ImageNodes/Images/ImageRotate.cs b/ImageNodes/Images/ImageRotate.cs index c0f45d6b..36fd58b0 100644 --- a/ImageNodes/Images/ImageRotate.cs +++ b/ImageNodes/Images/ImageRotate.cs @@ -10,6 +10,8 @@ public class ImageRotate: ImageNode public override FlowElementType Type => FlowElementType.Process; public override string Icon => "fas fa-undo"; + public override string HelpUrl => "https://docs.fileflows.com/plugins/image-nodes/image-rotate"; + [Select(nameof(AngleOptions), 2)] public int Angle { get; set; }