This commit is contained in:
John Andrews
2024-10-17 09:13:22 +13:00
parent 45d6056f8f
commit 7c0f9ab4ce
16 changed files with 172 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
namespace FileFlows.BasicNodes.Functions;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
using System.ComponentModel.DataAnnotations;
/// <summary>
/// Flow element that Tags a file
/// </summary>
public class Tag : Node
{
/// <inheritdoc />
public override int Inputs => 1;
/// <inheritdoc />
public override int Outputs => 1;
/// <inheritdoc />
public override FlowElementType Type => FlowElementType.Logic;
/// <inheritdoc />
public override string Icon => "fas fa-tag";
/// <inheritdoc />
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/tag";
/// <inheritdoc />
public override bool FailureNode => true;
/// <inheritdoc />
public override LicenseLevel LicenseLevel => LicenseLevel.Basic;
/// <summary>
/// Gets or sets the tags
/// </summary>
[TagSelection(1)]
public List<Guid> Tags { get; set; }
/// <summary>
/// Gets or sets if the tags should replace the existing tags
/// </summary>
[Boolean(2)]
public bool Replace { get; set; }
/// <inheritdoc />
public override int Execute(NodeParameters args)
{
if (Tags == null || Tags.Count == 0)
{
args.FailureReason = "No tags selected";
args.Logger?.ELog(args.FailureReason);
return -1;
}
// if (Replace)
// args.File.Tags = Tags;
// else
// args.File.Tags.AddRange(Tags);
return 1;
}
}

View File

@@ -759,6 +759,15 @@
"Outputs": {
"1": "Zip-Datei erstellt"
}
},
"Tag": {
"Description": "Markiert die Datei mit den angegebenen Tags",
"Label": "Tag",
"Fields": {
"Tags": "Tags",
"Replace": "Ersetzen",
"Replace-Help": "Ob die Tags ersetzt oder den vorhandenen Tags hinzugefügt werden sollen."
}
}
}
},

View File

@@ -759,6 +759,15 @@
"Outputs": {
"1": "Zip created"
}
},
"Tag": {
"Description": "Tags the file with the specified tags",
"Label": "Tag",
"Fields": {
"Tags": "Tags",
"Replace": "Replace",
"Replace-Help": "If the tags should be replaced or appended to the existing tags."
}
}
}
},

View File

@@ -585,6 +585,15 @@
"1": "Archivo original reemplazado"
}
},
"Tag": {
"Description": "Etiqueta el archivo con las etiquetas especificadas",
"Label": "Etiqueta",
"Fields": {
"Tags": "Etiquetas",
"Replace": "Reemplazar",
"Replace-Help": "Si las etiquetas deben reemplazarse o añadirse a las etiquetas existentes."
}
},
"Reprocess": {
"Description": "El elemento de flujo te permite reprocesar el archivo original de la biblioteca con un nodo de procesamiento diferente.\n\n Si se selecciona el mismo nodo de procesamiento que el que actualmente procesa el archivo, el flujo fallará.",
"Label": "Reprocesar",

View File

@@ -595,6 +595,15 @@
"Node-Help": "Le nœud de traitement pour traiter ce fichier."
}
},
"Tag": {
"Description": "Tague le fichier avec les balises spécifiées",
"Label": "Tag",
"Fields": {
"Tags": "Balises",
"Replace": "Remplacer",
"Replace-Help": "Si les balises doivent être remplacées ou ajoutées aux balises existantes."
}
},
"SetVariable": {
"Description": "Définit une variable dans le flux.",
"Label": "Définir une Variable",

View File

@@ -595,6 +595,15 @@
"Node-Help": "Il nodo di elaborazione per elaborare questo file."
}
},
"Tag": {
"Description": "Etichetta il file con i tag specificati",
"Label": "Etichetta",
"Fields": {
"Tags": "Tag",
"Replace": "Sostituire",
"Replace-Help": "Se i tag devono essere sostituiti o aggiunti ai tag esistenti."
}
},
"SetVariable": {
"Description": "Imposta una variabile nel flusso.",
"Label": "Imposta Variabile",

View File

@@ -595,6 +595,15 @@
"Node-Help": "このファイルを処理するための処理ノード。"
}
},
"Tag": {
"Description": "指定されたタグでファイルにタグを付けます",
"Label": "タグ",
"Fields": {
"Tags": "タグ",
"Replace": "置き換える",
"Replace-Help": "タグを置き換えるか、既存のタグに追加するか。"
}
},
"SetVariable": {
"Description": "フロー内で変数を設定します。",
"Label": "変数を設定",

View File

@@ -595,6 +595,15 @@
"Node-Help": "이 파일을 처리할 처리 노드입니다."
}
},
"Tag": {
"Description": "지정된 태그로 파일에 태그를 지정합니다",
"Label": "태그",
"Fields": {
"Tags": "태그",
"Replace": "교체",
"Replace-Help": "태그를 교체하거나 기존 태그에 추가할지 여부."
}
},
"SetVariable": {
"Description": "흐름에서 변수를 설정합니다.",
"Label": "변수 설정",

View File

@@ -595,6 +595,15 @@
"Node-Help": "De verwerkingsnode voor het verwerken van dit bestand."
}
},
"Tag": {
"Description": "Tagt het bestand met de opgegeven tags",
"Label": "Tag",
"Fields": {
"Tags": "Tags",
"Replace": "Vervangen",
"Replace-Help": "Of de tags vervangen of toegevoegd moeten worden aan de bestaande tags."
}
},
"SetVariable": {
"Description": "Stelt een variabele in binnen de stroom.",
"Label": "Stel Variabele In",

View File

@@ -595,6 +595,15 @@
"Node-Help": "O nó de processamento para processar este arquivo."
}
},
"Tag": {
"Description": "Marca o arquivo com as tags especificadas",
"Label": "Tag",
"Fields": {
"Tags": "Tags",
"Replace": "Substituir",
"Replace-Help": "Se as tags devem ser substituídas ou adicionadas às tags existentes."
}
},
"SetVariable": {
"Description": "Define uma variável no fluxo.",
"Label": "Definir uma Variável",

View File

@@ -595,6 +595,15 @@
"Node-Help": "Узел обработки для обработки этого файла."
}
},
"Tag": {
"Description": "Присваивает файлу указанные теги",
"Label": "Тег",
"Fields": {
"Tags": "Теги",
"Replace": "Заменить",
"Replace-Help": "Следует ли заменить теги или добавить их к существующим тегам."
}
},
"SetVariable": {
"Description": "Устанавливает переменную в потоке.",
"Label": "Установить Переменную",

View File

@@ -595,6 +595,15 @@
"Node-Help": "Behandlingsnod för att bearbeta denna fil."
}
},
"Tag": {
"Description": "Taggar filen med de angivna taggarna",
"Label": "Tagg",
"Fields": {
"Tags": "Taggar",
"Replace": "Ersätt",
"Replace-Help": "Om taggarna ska ersättas eller läggas till de befintliga taggarna."
}
},
"SetVariable": {
"Description": "Sätter en variabel i flödet.",
"Label": "Ställ In Variabel",

View File

@@ -595,6 +595,15 @@
"Node-Help": "用于处理该文件的处理节点。"
}
},
"Tag": {
"Description": "使用指定的标签标记文件",
"Label": "标签",
"Fields": {
"Tags": "标签",
"Replace": "替换",
"Replace-Help": "标签是替换还是附加到现有标签。"
}
},
"SetVariable": {
"Description": "在流中设置一个变量。",
"Label": "设置变量",

View File

@@ -595,6 +595,15 @@
"Node-Help": "處理此檔案的處理節點。"
}
},
"Tag": {
"Description": "使用指定的標籤標記文件",
"Label": "標籤",
"Fields": {
"Tags": "標籤",
"Replace": "替換",
"Replace-Help": "標籤是替換還是附加到現有標籤。"
}
},
"SetVariable": {
"Description": "在流程中設置變數。",
"Label": "設置變數",