How to export pdf files only
Hi there
I want to export a lot papers from zotero. But the 'export' function in zotero will export both pdf and other info in seperate folders. I just want pdfs in one folder. Is that possible? Thanks for your response in advance.
Lei
I want to export a lot papers from zotero. But the 'export' function in zotero will export both pdf and other info in seperate folders. I just want pdfs in one folder. Is that possible? Thanks for your response in advance.
Lei
1. Entirely independent of Zotero, just search for file type PDF in the zotero data/storage folder: http://www.zotero.org/support/zotero_data
2. Search for attachment file type -- is --> PDF in a Zotero advanced search. Create a saved search. You can select the PDFs in that saved search with ctrl+a and simply drag and drop them to your file browser.
(I am biased as I came to this discussion while working out how to export subselections)
I was facing the same issue and as a workaround, hacked the BIBTEX.js Translator. The file can be downloaded from https://www.dropbox.com/s/d9o4p166qbxuzkb/BibTeX_ExpPDF.js?dl=0
You may download and copy this js file in your Translators folder in the Zotero data directory.
Then when exporting a collection, you will see another option "BibTeXPDFExport". Choose it and tick the "Export Files" option export. In teh export folder, another "PDFs" folder will be created with all your PDFs.
Preexisting PDFs with same name will be overwritten
I am using it myself with reasonable success. But please exercise caution when you are using it.
For example I do not know what impact it will have on importing BIB files.
Thanks
Vivek
The changes from the regular BibTex.js are
IN THE METADATA SECTION
{
"translatorID": "9cb70025-a888-4a29-a210-93ec52da40VG",
"label": "BibTeXPDFExport",
"creator": "Vivek's mod of Simon Kornblith, Richard Karnesky and Emiliano heyns"",
"inRepository": false,
"lastUpdated": "2015-04-25 20:50:00"
}
IN THE EXPORT SECTION
for(var i in item.attachments) {
....
if(Zotero.getOption("exportFileData") && attachment.saveFile && attachment.mimeType == 'application/pdf') {
path = "/pdfs/" + encodeFilePathComponent(title);
attachment.saveFile(path, true);
} else if(attachment.localPath) {
path = "/pdfs/" + encodeFilePathComponent(title);
}
if (path) {
attachmentString += ";" + encodeFilePathComponent(title)
+ ":" + encodeFilePathComponent(path)
+ ":" + encodeFilePathComponent(attachment.mimeType);
}
}
Zotfile totally worked for me.
1) Navigate to the parent directory into which you exported the collection:
cd path_to_parent_directory
2) Recursively copy all pdfs in the directory at the topmost hierarchical layer:
find . -name "*.pdf" -type f -exec cp {} . \;
3) Optionally delete the original nested export folder in Finder or Terminal:
rm -r name_of_exported_directory