diff --git a/src/nat/ArchiveController.kiss b/src/nat/ArchiveController.kiss index f6ea41d..951e6fd 100644 --- a/src/nat/ArchiveController.kiss +++ b/src/nat/ArchiveController.kiss @@ -169,4 +169,16 @@ (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 + entries) // TODO this includes entries that already had the tag in the changeset + + (defcommand removeTags [entries (SelectedEntries 1 null) + tagsToRemove (VarText null)] + (doFor e entries + (withWritableEntry archive e + (when (hasComponent e Tags) + (withWritableComponents archive e [tags Tags] + (doFor tag tagsToRemove (tags.remove tag)))))) + entries) // TODO this includes entries that didn't have the tag in the changeset + + (defcommand selectByTags [tagsBoolExp (Text null)] + (selectEntries (filter archive.entries ->e (tagsMatch archive e tagsBoolExp))))) \ No newline at end of file