Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
kb:exporting_from_endnote_with_pdfs [2009/06/10 15:57] – external edit 127.0.0.1 | kb:exporting_from_endnote_with_pdfs [2017/11/12 19:53] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === How do I import my EndNote library, complete with attached PDFs? === | + | < |
+ | in the process of updating the documentation for | ||
+ | <a href=" | ||
+ | may be outdated in the meantime. Thanks for your understanding.</ | ||
+ | |||
+ | |||
+ | === [deprecated] | ||
+ | |||
+ | **//This procedure is no longer necessary for Zotero 3.0.9. Please refer to [[importing_records_from_endnote|this article]] for help//** | ||
Obviously, manually adding every PDF from a large EndNote library would be rather labor intensive. There is a trick to automating it, though. | Obviously, manually adding every PDF from a large EndNote library would be rather labor intensive. There is a trick to automating it, though. | ||
Line 7: | Line 15: | ||
You should be able to import all the PDFs by using a single find and replace statement. In EndNote, you need to export your library using the RIS (Refman) style. It should be exported as a text document. | You should be able to import all the PDFs by using a single find and replace statement. In EndNote, you need to export your library using the RIS (Refman) style. It should be exported as a text document. | ||
- | In it, you will want to find | + | In it, you will want to replace the ' |
+ | |||
+ | On Mac OS X and Linux, you may run:< | ||
+ | </ | ||
+ | |||
+ | On Windows, you may copy the following and paste it into notepad. Save as " | ||
+ | ' RIS link fixer for windows | ||
+ | ' transforms Endnote internal-pdf:// | ||
+ | |||
+ | Dim FileName, objDialog, boolResult | ||
+ | Dim regEx, FileContents, | ||
+ | Dim objShell, pdfFolder | ||
+ | |||
+ | ' | ||
+ | Set objDialog = CreateObject(" | ||
+ | objDialog.Filter = "RIS (*.ris)|*.ris|All Files (*.*)|*.*" | ||
+ | objDialog.FilterIndex = 1 | ||
+ | boolResult = objDialog.ShowOpen | ||
+ | If boolResult = 0 Then | ||
+ | WScript.Quit | ||
+ | Else | ||
+ | FileName = objDialog.FileName | ||
+ | End If | ||
+ | |||
+ | ' | ||
+ | Set regEx = New RegExp | ||
+ | regEx.Pattern = " | ||
+ | FileContents = GetFile(FileName) | ||
+ | |||
+ | ' | ||
+ | set objShell = CreateObject(" | ||
+ | set pdfFolder = objShell.BrowseForFolder(0, | ||
+ | If (not pdfFolder is nothing) then | ||
+ | ReplaceWith | ||
+ | If (Right(ReplaceWith, | ||
+ | ReplaceWith = ReplaceWith & " | ||
+ | End If | ||
+ | regEx.Global = True | ||
+ | modFileContents = regEx.replace(FileContents, | ||
+ | If modFileContents <> FileContents Then | ||
+ | WriteFile FileName, modFileContents | ||
+ | Wscript.Echo "The RIS file has successfully been modified." | ||
+ | Else | ||
+ | Wscript.Echo "No EndNote attachments have been detected in the RIS file." | ||
+ | End If | ||
+ | End If | ||
- | internal-pdf:// | + | function GetFile(FileName) |
+ | If FileName<>"" | ||
+ | Dim FS, FileStream | ||
+ | Set FS = CreateObject(" | ||
+ | on error resume Next | ||
+ | Set FileStream = FS.OpenTextFile(FileName) | ||
+ | GetFile = FileStream.ReadAll | ||
+ | End If | ||
+ | End Function | ||
- | And then replace it with | + | function WriteFile(FileName, |
+ | Dim OutStream, FS | ||
+ | on error resume Next | ||
+ | Set FS = CreateObject(" | ||
+ | Set OutStream = FS.OpenTextFile(FileName, | ||
+ | OutStream.Write Contents | ||
+ | End Function | ||
+ | </ | ||
- | file:// | + | == Remark on sed statement == |
- | In Windows, this would look more like | + | Thanks for the tip. If the previous sed statement doen't work for you, try |
+ | < | ||
+ | </ | ||
- | | + | Explanation: |
- | From there, you should be able to import | + | Example: Your Endnote library called Literatur (i. e. Literatur.enl and Literatur.Data), and the exported |
- | {{tag> | ||
+ | {{tag>kb entry}} |