Script à ajouter dans l'extension Actions & Tags de Zotero permettant de supprimer les marqueurs tout en conservant certains d'entre eux
Astuce : en commentant les 2 lignes qui affichent une fenêtre pendant la suppression, cela évite de devoir cliquer des centaines, voire des milliers de fois sur OK.
// Delete tags, based on Replace tags
// This script removes all tags from the specified Zotero items, except those in the ignore list.
// add tags you wish to keep to `ignoreTags` list, the list is prefilled with two examples
(async () => {
const ignoreTags = ['#GoldSet', '#ClinicalTrials.gov', '#Cochrane Central', '#Embase', '#Medline', '#Proquest', '#Web of Science', '#WHO ICTRP'];
// ^^^^^ Add tag names here to ignore. ^^^^^^^
// Initialize `targetItems` to the array of `items`, or if `items` is undefined,
// use the single `item` wrapped in an array. If neither exists, default to an empty array.
let targetItems = items || (item ? [item] : []);
// Show an alert message
// await Zotero.alert(null, "Delete all tags except ignored ones");
// Iterate over each item in the `targetItems` array.
for (const currentItem of targetItems) {
// Retrieve all tags associated with the current item.
// Use `.getTags()` to get tag objects, and map to their `tag` property to get tag names.
const tags = currentItem.getTags().map(tag => tag.tag);
// Iterate over each tag in the list of tag names.
for (const tag of tags) {
// Check if the tag is in the ignore list.
if (ignoreTags.includes(tag)) {
// Alert the user that the tag is being skipped.
// await Zotero.alert(null, `Tag "${tag}" is in the ignore list and will not be deleted.`);
continue;
}
// Remove the tag from the current item using `.removeTag()`.
await currentItem.removeTag(tag);
}
}
// The script finishes here.
})(); Scripts partagés par la communauté d'utilisateur·trice·s du module Actions & tags pour Zotero 7, parmi lesquels il y en a quelques-uns qui paraissent particulièrement intéressants :
☑️ Bulk Edit Multiple Items : https://github.com/windingwind/zotero-actions-tags/discussions/343
🔲 Enhanced Duplicate Detection : https://github.com/windingwind/zotero-actions-tags/discussions/382
🔲 Detects if the current item has duplicate items : https://github.com/windingwind/zotero-actions-tags/discussions/133
☑️ When DOI is empty, get DOI from URL : https://github.com/windingwind/zotero-actions-tags/discussions/358
❌ Customize color labels of reader : https://github.com/windingwind/zotero-actions-tags/discussions/211 (ne semble pas fonctionner)
☑️ Batch Tag Operations: https://github.com/windingwind/zotero-actions-tags/discussions/351
❌ Extract Abstract Keywords : https://github.com/windingwind/zotero-actions-tags/discussions/136 (ne semble pas fonctionner)
☑️ Convert Rayyan Include/Exclude and Labels to Zotero Tags : https://github.com/windingwind/zotero-actions-tags/discussions/354
❌ Update Arxiv Paper to latest version or published version : https://github.com/windingwind/zotero-actions-tags/discussions/363 (utiliser l'extension arXiv Workflow for Zotero)
🔲 Update Date Added : https://github.com/windingwind/zotero-actions-tags/discussions/344
❌ Collection Tags : https://github.com/windingwind/zotero-actions-tags/discussions/245 (glisser-déposer toutes les références d'une collection sur un marqueur est traité plus rapidement par Zotero)
EDIT 28.09.2025
☑️ Batch Export PDFs from Zotero : https://github.com/windingwind/zotero-actions-tags/discussions/379 (fonction intégrée dans Zotero 8 > Fichier > Exporter les PDFs...)
🔲 Remove Tag in Clipboard from Selected Items : https://github.com/windingwind/zotero-actions-tags/discussions/515
☑️ Collapse all libraries : https://github.com/windingwind/zotero-actions-tags/discussions/406
☑️ Inverse Selection of Visible Top-Level Items : https://github.com/windingwind/zotero-actions-tags/discussions/508
❌ Copy Zotero link : https://github.com/windingwind/zotero-actions-tags/discussions/115
🔲 Copy Annotation(s) : https://github.com/windingwind/zotero-actions-tags/discussions/303
❌ Paper Rating System by a set of Scripts : https://github.com/windingwind/zotero-actions-tags/discussions/232
❌ Copy Web Library URI : https://github.com/windingwind/zotero-actions-tags/discussions/439 (fonctionne pour les bibliothèques de groupe, mais pas pour la bibliothèque personnelle)
EDIT 20.10.2025
❌ Add tag shortcut (working in Zotero 7): https://github.com/windingwind/zotero-actions-tags/discussions/390 (existe déjà dans Zotero)
☑️ Update 'accessDate' & 'dateModified' when modifying Annotation or Note: https://github.com/windingwind/zotero-actions-tags/discussions/521
EDIT 16.05.2026
☑️ Convert Covidence Exclusion Labels to Zotero Tags: https://github.com/windingwind/zotero-actions-tags/discussions/611
Testé ou à tester !
Comment rédiger un bon fichier README
Script de Sébastien Guillon pour déchiffrer la chaîne user-agent