Is there any way to get a list of current tags ?
I use a lot of tags. In order to keep my set of tags as logical and efficient as possible, I need to occasionally review existing tags, looking for redundant tags or potential gaps that require new tags. To do this, an easy way to get a list of current tags is required. Is there any way to get such a list ?
If that doesn't work, the best I can come up with is exporting to CSV and the splitting the tag column and removing duplicates, which can both be done in Excel or any scripting language -- not sure that still qualifies as simple, though.
Re the second option, I actually didn't realize that tags were included in a library/collection Export to CSV. But I agree with you that processing that output to get a non-redundant list of tags is not simple. ;)
I haven't tested this on large tag sets, but it works for small sets and automatically de-dedupes (or rather, treats the same tag as a single tag in the first place)
var rows = await Zotero.DB.queryAsync("SELECT name AS tagname, COUNT(*) AS num FROM tags JOIN itemTags USING (tagID) GROUP BY tagname ORDER BY UPPER(tagname) ASC");
var lines = [];
for (let row of rows) {
lines.push(row.tagname + '\t' + row.num);
}
return lines.join('\n');