Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kb:mendeley_import [2018/08/02 02:38]
dstillman [The Import Process]
kb:mendeley_import [2018/08/28 21:37] (current)
dstillman [Extracting Mendeley Annotations and Highlights]
Line 1: Line 1:
 ====== How do I import a Mendeley library into Zotero? ====== ====== How do I import a Mendeley library into Zotero? ======
  
-Zotero includes support for directly importing a Mendeley database into Zotero via File → “Import…”,​ but due to recent changes by Mendeley some extra steps may be required.+Zotero includes support for directly importing a Mendeley database into Zotero via File → “Import…”,​ but due to recent changes by Elsevier, the company that produces the Mendeley ​software, ​some extra steps may be required.
  
 ===== Mendeley Database Encryption ===== ===== Mendeley Database Encryption =====
  
-Mendeley 1.19 and later have begun encrypting the local database, making it unreadable by Zotero and other standard database tools. ​Mendeley ​made this change a few months after Zotero publicly announced work on an importer, despite having long touted the openness of its database format as a guarantee against lock-in. At the same time, Mendeley continues to import data from Zotero’s own open database, as it has since 2009.+Mendeley 1.19 and later have begun encrypting the local database, making it unreadable by Zotero and other standard database tools. ​Elsevier ​made this change a few months after Zotero publicly announced work on an importer, despite having long touted the openness of its database format as a guarantee against lock-in ​and [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|erroneously continuing to state in its documentation that the database can be accessed using standard tools]]). At the same time, Mendeley continues to import data from Zotero’s own open database, as it has since 2009.
  
-The [[https://​www.mendeley.com/​release-notes/​v1_19|Mendeley 1.19 release notes]] claimed that the encryption was for “improved security” on shared machines, yet applications rarely encrypt their local data files, as file protections are generally handled by the operating system with account permissions and full-disk encryption, and anyone using the same operating system account or an admin account can already install a keylogger to capture passwords. ​Mendeley ​later [[https://​twitter.com/​mendeley_com/​status/​1006915998841221120|stated]] that the change was required by new European privacy regulations — a bizarre claim, given that those regulations are designed to give people control over their data and guarantee data portability,​ not the opposite — and continued to assert, falsely, that full local export was still possible, while [[https://​twitter.com/​mendeley_com/​status/​1006919608471818240|repeatedly]] [[https://​twitter.com/​MendeleySupport/​status/​1006920802120470528|dismissing]] reports of the change as "#​fakenews"​.+The [[https://​www.mendeley.com/​release-notes/​v1_19|Mendeley 1.19 release notes]] claimed that the encryption was for “improved security” on shared machines, yet applications rarely encrypt their local data files, as file protections are generally handled by the operating system with account permissions and full-disk encryption, and anyone using the same operating system account or an admin account can already install a keylogger to capture passwords. ​Elsevier ​later [[https://​twitter.com/​mendeley_com/​status/​1006915998841221120|stated]] that the change was required by new European privacy regulations — a bizarre claim, given that those regulations are designed to give people control over their data and guarantee data portability,​ not the opposite — and continued to assert, falsely, that full local export was still possible, while [[https://​twitter.com/​mendeley_com/​status/​1006919608471818240|repeatedly]] [[https://​twitter.com/​MendeleySupport/​status/​1006920802120470528|dismissing]] reports of the change as "#​fakenews"​.
  
-Direct access to the Mendeley database is the only local way to export the full contents of one’s own research. The export formats supported by Mendeley don’t contain folders, various metadata fields (date added, favorite, and others), or PDF annotations. Mendeley offers a web-based API, but it only contains uploaded data, so relying on it would mean that anyone wanting to export their own data would first need to upload all their data and files to Mendeley’s servers. The API is under Mendeley’s control and can be changed or discontinued at any time.+Direct access to the Mendeley database is the only local way to export the full contents of one’s own research. The export formats supported by Mendeley don’t contain folders, various metadata fields (date added, favorite, and others), or PDF annotations. Mendeley offers a web-based API, but it only contains uploaded data, so relying on it would mean that anyone wanting to export their own data would first need to upload all their data and files to Elsevier’s servers. The API is under Elsevier’s control and can be changed or discontinued at any time
 + 
 +===== Known Issues ===== 
 + 
 +In addition to the database encryption discussed above, there are a few other issues to be aware of when importing from Mendeley. 
 + 
 +  * Mendeley stores PDF annotations and highlights in its database rather than storing them in the file where they would be accessible to other PDF readers, so Zotero extracts annotations to a note stored under the item, with links back to the original page. Highlights are not imported. To embed annotations and highlights into the PDF files themselves so they can be imported into Zotero, you have a couple options: 
 +    - Mendeley provides an option to generate a PDF with annotations and highlights added back to the file, but it can only be run for one file at a time. If you’d like to import PDFs with annotations and highlights, you could use that option for select files and then replace the imported files in Zotero (right-click on the item and choose “Show File”) with the annotated versions. 
 +    - You can also try using the third-party [[https://​github.com/​cycomanic/​Menextract2pdf|Menextract2pdf]] script to write annotations and highlights back to the PDFs in Mendeley before importing into Zotero. See the [[#​Extracting_Mendeley_Annotations_and_Highlights|instructions below]]. 
 +  * It’s not possible to directly import group libraries. To import items in group libraries, simply copy the group items to a collection in your Mendeley library before importing. You can then create a Zotero group and drag imported collections or items to that group. 
 +  * Mendeley allows any field to be added to any type. When importing into Zotero, if a field isn’t valid for a given item type, the field is placed into the Extra field. When possible, those will be used automatically in citations (e.g., Original Date), and future versions of Zotero will automatically convert those to any real fields that become available. 
 +  * When using the Zotero word processor plugins, document citations created with Mendeley won’t currently be linked to imported citations in your Zotero database. We may be able to add support for this in a future version.
  
 ===== The Import Process ===== ===== The Import Process =====
Line 34: Line 45:
 ** If you’ve already upgraded to 1.19 and are not able to import from a recent backup of your Mendeley SQLite database:** ** If you’ve already upgraded to 1.19 and are not able to import from a recent backup of your Mendeley SQLite database:**
  
-It's possible to recreate an unencrypted database by syncing from an older version of Mendeley Desktop. However, this requires syncing all data and files to Mendeley's servers before downgrading. Even syncing data alone isn't sufficient: Mendeley sync doesn'​t make any information about attached files available unless you actually sync the files themselves.+It's possible to recreate an unencrypted database by syncing from an older version of Mendeley Desktop. However, this requires syncing all data and files to Elsevier's servers before downgrading. Even syncing data alone isn't sufficient: Mendeley sync doesn'​t make any information about attached files available unless you actually sync the files themselves.
  
-If you don't want to sync any data to Mendeley's servers, your only option is to use one of the available export formats, such as BibTeX, to transfer your data to Zotero. As discussed above, you'll lose your folder structure and some other data.+If you don't want to sync any data to Elsevier's servers, your only option is to use one of the available export formats, such as BibTeX, to transfer your data to Zotero. As discussed above, you'll lose your folder structure and some other data.
  
 If you're syncing your library data but don't want to sync files, you'll need to manually relink files in Mendeley after downgrading or in Zotero after importing. If you're syncing your library data but don't want to sync files, you'll need to manually relink files in Mendeley after downgrading or in Zotero after importing.
  
-(Note that at Zotero we strongly believe you should be fully in control of your own research data, and we don't think you should have to make these choices, but these are the available options given the design decisions ​Mendeley ​has made.)+(Note that at Zotero we strongly believe you should be fully in control of your own research data, and we don't think you should have to make these choices, but these are the available options given the design decisions ​Elsevier ​has made.)
  
-If you're comfortable syncing your data to Mendeley, or have already done so, here are the steps:+If you're comfortable syncing your data to Elsevier, or have already done so, here are the steps:
  
-  - Make sure you've synced all data and — if you want to avoid reassociating files manually — files to Mendeley's servers.+  - Make sure you've synced all data and — if you want to avoid reassociating files manually — files to Elsevier's servers.
   - Move your database out of the [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|Mendeley data directory]] to a temporary location.   - Move your database out of the [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|Mendeley data directory]] to a temporary location.
   - Download Mendeley 1.18.   - Download Mendeley 1.18.
-  - Perform a fresh sync to pull down your Mendeley data from the Mendeley ​servers.+  - Perform a fresh sync to pull down your Mendeley data from the Elsevier ​servers.
   - Start the import in Zotero by going to File → “Import…” and choosing the “Mendeley” option.   - Start the import in Zotero by going to File → “Import…” and choosing the “Mendeley” option.
  
Line 68: Line 79:
  
 If you're running the latest version and something doesn’t come through how you expect or you run into any trouble, let us know in the [[https://​forums.zotero.org/​|Zotero Forums]]. If you're running the latest version and something doesn’t come through how you expect or you run into any trouble, let us know in the [[https://​forums.zotero.org/​|Zotero Forums]].
 +
 +===== Preserving Mendeley Annotations and Highlights =====
 +
 +As [[#​known_issues|noted above]], Mendeley stores PDF annotations and highlights in its own database rather than in the PDF itself where they would be accessible to other PDF readers, and while Zotero will extract annotations to child notes with links back to the PDF, embedded annotations and highlights will not be imported.
 +
 +To use the third-party Menextract2pdf script to save annotations and highlights back to all of the PDFs in your library before importing into Zotero, follow these steps:
 +
 +==== macOS or Linux ====
 +
 +  - Close Mendeley
 +  - Make a backup of your [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|Mendeley data directory]],​ including the ''​Downloaded''​ folder that holds your PDF files (and other locations on your computer where you have PDF files you wish to save Mendeley annotations to)
 +  - Download and unzip the Mextract2pdf script from [[https://​github.com/​bwiernik/​Menextract2pdf/​archive/​master.zip|here]]
 +  - Open Terminal, navigate to the unzipped Mextract2pdf folder, and run the following command (filling in the correct file paths):
 +    * <​code>​menextract2pdf_overwrite.sh "/​Path/​To/​Mendeley/​Data Folder/"​ "/​Path/​To/​Mendeley/​PDF/​Folder/"</​code>​
 +  - For example, on macOS, if you have your Mendeley database in the [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|default location]] and your PDFs stored in Mendeley'​s "​Downloaded"​ folder, you would enter:
 +    * <​code>​menextract2pdf_overwrite.sh "/​Users/"​Your Name"/​Library/​Application Support/​Mendeley Desktop"​ "/​Users/"​Your Name"/​Library/​Application Support/​Mendeley Desktop/​Downloaded/"</​code>​
 +
 +==== Windows ====
 +  - Install [[https://​www.python.org/​downloads/​|Python]]
 +  - Close Mendeley
 +  - Make a backup of your [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|Mendeley data directory]],​ including the ''​Downloaded''​ folder that holds your PDF files (and other locations on your computer where you have PDF files you wish to save Mendeley annotations to)
 +  - Download and unzip the Mextract2pdf script from [[https://​github.com/​bwiernik/​Menextract2pdf/​archive/​master.zip|here]]
 +  - Open Command Prompt, navigate to the unzipped Mextract2pdf folder, and run the following command (filling in the correct file paths):
 +    * <​code>​menextract2pdf_overwrite.bat "​C:​\Path\To\Mendeley\Data Folder\"​ "​C:​\Path\To\Mendeley\PDF\Folder\"</​code>​
 +  - For example, if you have your Mendeley database in the [[https://​service.elsevier.com/​app/​answers/​detail/​a_id/​22098/​kw/​database/​supporthub/​mendeley/​|default location]] and your PDFs stored in Mendeley'​s "​Downloaded"​ folder, you would enter:
 +    * <​code>​menextract2pdf_overwrite.bat "​%LOCALAPPDATA%\Mendeley Ltd.\Mendeley Desktop\"​ "​%LOCALAPPDATA%\Mendeley Ltd.\Mendeley Desktop\Downloaded\"</​code>​
 +
  
 {{tag>kb entry}} {{tag>kb entry}}
kb/mendeley_import.1533191926.txt.gz · Last modified: 2018/08/02 02:38 by dstillman