Exporting a list of all your group libraries

edited November 1, 2022
Is there a way to do this - either offline or online? Just a list with the names of all the group libraries one has, and - if possible - also the names of the collections in them . Thanks!
  • Could tweak this to show the collection hierarchy better, but here's the basic idea:

    var str = "";
    for (let group of Zotero.Groups.getAll()) {
    str += group.name + "\n";
    for (let collection of Zotero.Collections.getByLibrary(group.libraryID, true)) {
    let c = {
    name: collection.name
    };
    if (collection.parentID) {
    c.parentCollection = Zotero.Collections.get(collection.parentID).name;
    }
    str += JSON.stringify(c, null, 2) + "\n"
    }
    str += "\n=================\n\n";
    }
  • Hmmm - I guess I missed the part where we could use code to interact with our libraries. Will have to look that up. But thanks Dan!
    For those of us with very large collections, the ability to extract some metadata for those would indeed be great. Say the collection hierarchy with some of the main stats - say the N of items (maybe even by type), the overall size, N of items with full-text, etc.
Sign In or Register to comment.