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.
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.
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".