To extract journals' names from the library
Hello!
Is there any way to see the whole list of journals (item type: journal article) that I have in my Zotero library? I mean not the whole bibliography but only journals names.
Thanks in advance!
Is there any way to see the whole list of journals (item type: journal article) that I have in my Zotero library? I mean not the whole bibliography but only journals names.
Thanks in advance!
2) Open the eported file in a spreadsheet program, such as Excel, Google Sheets, or LibreOffice Calc.
3) Filter the "Item Type" column to show only journalArticle items.
4) Select the "Publication Title" title column and copy its contents to a new sheet.
5) Use the Remove Duplicates function to retain just the unique titles.
var rows = await Zotero.DB.queryAsync("SELECT value AS title, COUNT(*) AS num FROM itemData JOIN itemDataValues USING (valueID) WHERE fieldID=12 GROUP BY title ORDER BY UPPER(title) ASC");
var lines = [];
for (let row of rows) {
lines.push(row.title + '\t' + row.num);
}
return lines.join('\n');
var rows = await Zotero.DB.queryAsync(`SELECT value AS title, COUNT(*) AS num FROM itemData JOIN itemDataValues USING (valueID) WHERE fieldID=${Zotero.ItemFields.getID('publicationTitle')} GROUP BY title ORDER BY UPPER(title) ASC`);
var lines = [];
for (let row of rows) {
lines.push(row.title + '\t' + row.num);
}
return lines.join('\n');
[edited to fix wrong field name]
I'd like to modify it to work on the currently selected collection, but haven't been able to quite work this out (see the other thread, which does a similar thing but for an author list rather than publications).
https://forums.zotero.org/discussion/77813/0/#Form_Comment
var rows = await Zotero.DB.queryAsync(`
SELECT value AS title, COUNT(*) AS num
FROM itemData
JOIN collectionItems USING (itemID)
JOIN itemDataValues USING (valueID)
WHERE fieldID=${Zotero.ItemFields.getID('publicationTitle')}
AND collectionID=${ZoteroPane.getSelectedCollection(true)}
AND itemID NOT IN (SELECT itemID FROM deletedItems)
GROUP BY title ORDER BY UPPER(title) ASC
`.trim());
var lines = [];
for (let row of rows) {
lines.push(row.title + '\t' + row.num);
}
return lines.join('\n');
Will throw an error if you aren't in a collection, though.