mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-02-16 11:59:47 -06:00
FF-2048: Set thumbnail element
This commit is contained in:
43
BasicNodes/Functions/SetFileFlowsThumbnail.cs
Normal file
43
BasicNodes/Functions/SetFileFlowsThumbnail.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
|
||||
namespace FileFlows.BasicNodes.Functions;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Flow element that sets the thumbnail of a file in FileFlows
|
||||
/// </summary>
|
||||
public class SetFileFlowsThumbnail: Node
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override int Inputs => 1;
|
||||
/// <inheritdoc />
|
||||
public override int Outputs => 1;
|
||||
/// <inheritdoc />
|
||||
public override string Icon => "fas fa-image";
|
||||
/// <inheritdoc />
|
||||
public override FlowElementType Type => FlowElementType.Process;
|
||||
/// <inheritdoc />
|
||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/set-fileflows-thumbnail";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the file of the thumbnail
|
||||
/// </summary>
|
||||
[TextVariable(1)]
|
||||
public string FilePath { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int Execute(NodeParameters args)
|
||||
{
|
||||
string file = args.ReplaceVariables(FilePath ?? string.Empty, true)?.EmptyAsNull() ?? args.WorkingFile;
|
||||
if(string.IsNullOrWhiteSpace(file))
|
||||
return args.Fail("File Path not set");
|
||||
var localResult = args.FileService.GetLocalPath(file);
|
||||
if(localResult.Failed(out var error))
|
||||
return args.Fail("Failed to get local path: " + error);
|
||||
var local = localResult.Value;
|
||||
args.SetThumbnail(file);
|
||||
args.Logger.ILog("Thumbnail set");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "Der Verarbeitungsnode, um diese Datei zu verarbeiten."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Legt ein Miniaturbild für diese Datei in FileFlows fest.",
|
||||
"Label": "FileFlows-Miniaturbild festlegen",
|
||||
"Fields": {
|
||||
"FilePath": "Dateipfad",
|
||||
"FilePath-Help": "Der vollständige Pfad zur Bilddatei, die als Miniaturbild verwendet werden soll."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniaturbild gesetzt"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Setzt eine Variable im Flow.",
|
||||
"Label": "Variable setzen",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "The processing node to process this file."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Sets the thumbnail for this file in FileFlows.",
|
||||
"Label": "Set FileFlows Thumbnail",
|
||||
"Fields": {
|
||||
"FilePath": "File Path",
|
||||
"FilePath-Help": "The full path to the image file to use as the thumbnail."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Thumbnail set"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Sets a variable in the flow.",
|
||||
"Label": "Set Variable",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "El nodo de procesamiento para procesar este archivo."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Establece una miniatura para este archivo en FileFlows.",
|
||||
"Label": "Establecer miniatura de FileFlows",
|
||||
"Fields": {
|
||||
"FilePath": "Ruta del archivo",
|
||||
"FilePath-Help": "La ruta completa del archivo de imagen que se utilizará como miniatura."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniatura establecida"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Establece una variable en el flujo.",
|
||||
"Label": "Establecer Variable",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "Le nœud de traitement pour traiter ce fichier."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Définit une miniature pour ce fichier dans FileFlows.",
|
||||
"Label": "Définir la miniature de FileFlows",
|
||||
"Fields": {
|
||||
"FilePath": "Chemin du fichier",
|
||||
"FilePath-Help": "Le chemin complet du fichier image à utiliser comme miniature."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniature définie"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Définit une variable dans le flux.",
|
||||
"Label": "Définir une Variable",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "Il nodo di elaborazione per elaborare questo file."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Imposta una miniatura per questo file in FileFlows.",
|
||||
"Label": "Imposta miniatura di FileFlows",
|
||||
"Fields": {
|
||||
"FilePath": "Percorso del file",
|
||||
"FilePath-Help": "Il percorso completo del file immagine da usare come miniatura."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniatura impostata"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Imposta una variabile nel flusso.",
|
||||
"Label": "Imposta Variabile",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "このファイルを処理するための処理ノード。"
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "FileFlowsでこのファイルのサムネイルを設定します。",
|
||||
"Label": "FileFlowsのサムネイルを設定",
|
||||
"Fields": {
|
||||
"FilePath": "ファイルパス",
|
||||
"FilePath-Help": "サムネイルとして使用する画像ファイルのフルパス。"
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "サムネイルが設定されました"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "フロー内で変数を設定します。",
|
||||
"Label": "変数を設定",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "이 파일을 처리할 처리 노드입니다."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "FileFlows에서 이 파일의 썸네일을 설정합니다.",
|
||||
"Label": "FileFlows 썸네일 설정",
|
||||
"Fields": {
|
||||
"FilePath": "파일 경로",
|
||||
"FilePath-Help": "썸네일로 사용할 이미지 파일의 전체 경로입니다."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "썸네일 설정됨"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "흐름에서 변수를 설정합니다.",
|
||||
"Label": "변수 설정",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "De verwerkingsnode voor het verwerken van dit bestand."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Stelt een miniatuur in voor dit bestand in FileFlows.",
|
||||
"Label": "FileFlows Miniatuur instellen",
|
||||
"Fields": {
|
||||
"FilePath": "Bestandspad",
|
||||
"FilePath-Help": "Het volledige pad naar het afbeeldingsbestand dat als miniatuur moet worden gebruikt."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniatuur ingesteld"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Stelt een variabele in binnen de stroom.",
|
||||
"Label": "Stel Variabele In",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "O nó de processamento para processar este arquivo."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Define uma miniatura para este arquivo no FileFlows.",
|
||||
"Label": "Definir miniatura do FileFlows",
|
||||
"Fields": {
|
||||
"FilePath": "Caminho do arquivo",
|
||||
"FilePath-Help": "O caminho completo do arquivo de imagem a ser usado como miniatura."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniatura definida"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Define uma variável no fluxo.",
|
||||
"Label": "Definir uma Variável",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "Узел обработки для обработки этого файла."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Устанавливает миниатюру для этого файла в FileFlows.",
|
||||
"Label": "Установить миниатюру FileFlows",
|
||||
"Fields": {
|
||||
"FilePath": "Путь к файлу",
|
||||
"FilePath-Help": "Полный путь к файлу изображения, который будет использоваться в качестве миниатюры."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Миниатюра установлена"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Устанавливает переменную в потоке.",
|
||||
"Label": "Установить Переменную",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "Behandlingsnod för att bearbeta denna fil."
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "Ställer in en miniatyr för denna fil i FileFlows.",
|
||||
"Label": "Ställ in FileFlows-miniatyr",
|
||||
"Fields": {
|
||||
"FilePath": "Filväg",
|
||||
"FilePath-Help": "Den fullständiga sökvägen till bildfilen som ska användas som miniatyr."
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "Miniatyr inställd"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "Sätter en variabel i flödet.",
|
||||
"Label": "Ställ In Variabel",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "用于处理该文件的处理节点。"
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "在 FileFlows 中为此文件设置缩略图。",
|
||||
"Label": "设置 FileFlows 缩略图",
|
||||
"Fields": {
|
||||
"FilePath": "文件路径",
|
||||
"FilePath-Help": "要用作缩略图的图片文件的完整路径。"
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "缩略图已设置"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "在流中设置一个变量。",
|
||||
"Label": "设置变量",
|
||||
|
||||
@@ -630,6 +630,17 @@
|
||||
"Node-Help": "處理此檔案的處理節點。"
|
||||
}
|
||||
},
|
||||
"SetFileFlowsThumbnail": {
|
||||
"Description": "在 FileFlows 中為此文件設置縮略圖。",
|
||||
"Label": "設置 FileFlows 縮略圖",
|
||||
"Fields": {
|
||||
"FilePath": "文件路徑",
|
||||
"FilePath-Help": "要用作縮略圖的圖片文件的完整路徑。"
|
||||
},
|
||||
"Outputs": {
|
||||
"1": "縮略圖已設置"
|
||||
}
|
||||
},
|
||||
"SetVariable": {
|
||||
"Description": "在流程中設置變數。",
|
||||
"Label": "設置變數",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user