From 30a98de38b4bd9117231ddc5b4a528f3be96df58 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 27 Jun 2021 23:33:49 -0600 Subject: [PATCH] selectAllEntries, addTags --- .../src/nat/ArchiveController.kiss | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/projects/nat-archive-tool/src/nat/ArchiveController.kiss b/projects/nat-archive-tool/src/nat/ArchiveController.kiss index 9110bf02..fd660cb0 100644 --- a/projects/nat-archive-tool/src/nat/ArchiveController.kiss +++ b/projects/nat-archive-tool/src/nat/ArchiveController.kiss @@ -140,6 +140,9 @@ (defcommand selectEntries [entries (Entries null null)] (set selectedEntries entries) []) + (defcommand selectAllEntries [] + (set selectedEntries (for =>id e archive.entries e)) []) + (defcommand selectLastChangeSet [] (set selectedEntries lastChangeSet) []) @@ -152,4 +155,14 @@ (defcommand createEntries [names (VarText null)] (flatten (for name names - (createEntry name))))) \ No newline at end of file + (createEntry name)))) + + (defcommand addTags [entries (SelectedEntries 1 null) + tagsToAdd (VarText null)] + (doFor e entries + (withWritableEntry archive e + (if (hasComponent e Tags) + (withWritableComponents archive e [tags Tags] + (doFor tag tagsToAdd (dictSet tags tag 1))) + (addComponent archive e Tags (for tag tagsToAdd =>tag 1))))) + entries)) \ No newline at end of file