Expand description
Folder auto-tags: the tags stored in a folder’s tags key, which Eagle
adds to every item put into the folder.
Eagle works out, for each folder, the folder’s own tags followed by its
parent’s, its grandparent’s and so on up to the top; it keeps the first
copy of each tag and then reverses the whole list. That list (the
runtime extendTags, which Eagle strips before writing metadata.json)
is what gets applied, so a subfolder’s items also get every ancestor’s
auto-tags. The cached extendTags key, when a file has one, is ignored
here: the list is always worked out from tags.
How the list is applied depends on the way the item arrives: importing (or pasting) into a folder appends the tags the item lacks; adding to a folder appends them only when the item was not already in it; dropping onto a folder appends them either way. Tags are never removed and never reordered.
Functions§
- append_
new - Appends the tags in
addthattagslacks, in order. Returns whether any were added. - auto_
tags_ for - The auto-tags for an item going into several folders at once: each folder’s list in the order given, first copy of each tag kept.
- folder_
auto_ tags - The tags Eagle applies to an item put into folder
id: the folder’s own tags, then each ancestor’s in turn up to the top level, with only the first copy of each kept, and the result reversed. Empty for an unknown folder. - join_
folder - Adds
itemto folderidas Eagle’s add-to-folder does: when the item is not in the folder yet it joins it, comes out of the Trash and gets the folder’s auto-tags. Returns false, with the item untouched, when it was already in the folder.