Export ALL author names from a folder

Hello, I need to do a search of publications by all authors in a set of about 40 references in a folder. Is there a way I can export JUST the author names for this small document collection?

I thought about exporting as a bibliography but I see two issues with this. First, most output styles truncate the author lis to 'et al.' after the first 3 - 5 authors; second, I literally only want the author names as I'm plugging them straight into a search by author so a bibliography will export way too much redundant data.
  • If folder = collection/sub-collection, then I guess it is answered here: https://forums.zotero.org/discussion/50983/list-of-authors-for-all-items-in-a-collection
  • Run the following code under Tools\Developer\Run JavaScript to get an alphabetical list of all authors in the current collection, along with a count of how often they appear.

    var CurrentCollection = Zotero.getActiveZoteroPane().getSelectedCollection();
    var sql = "SELECT TRIM(lastName || ', ' || firstName) AS author, COUNT(*) AS num FROM items JOIN itemCreators USING (itemID) JOIN creators USING (creatorID) JOIN collectionItems USING (itemID) JOIN collections USING (collectionID) WHERE collectionName=? GROUP BY author ORDER BY author ASC";
    var rows = await Zotero.DB.queryAsync(sql,CurrentCollection.name);
    var lines = [];
    for (let row of rows) {
    lines.push(row.author + '\t' + row.num);
    }
    return lines.join('\n');

    If you don't want the count, omit "+ '\t' + row.num".
  • I tried it and it seems to work but it's doing the entire folder, not the subcollection. How do I just export a subcollection without all the parent folders?
  • tim820 thanks that worked a treat!
Sign In or Register to comment.