Cannot Import Attachments from Bookends References with Multiple Attachments

Hello!

I am migrating from Bookends to Zotero. I exported all my references from Bookends into XML format.

I then imported the references into Zotero.

Everything worked absolutely fine, it imported the references perfectly along with the attachments (and copied them from the Bookends file location over to the Zotero location).

The only issue is that none of the attachments from references with multiple PDF files in Bookends was copied over into Zotero. The reference imported fine--but not any of the attachments.

I took a look at the XML code for the ones with multiple PDF attachments. It looks fine.

There seems to be some problem with there being more than one PDF attachment and then it will not import any of those (but it does import the reference data itself along with some textual note data that was in the XML file).

Is there any way around this? I'd rather not manually copy over 2-5 files times nearly 500 references.

Thanks!
  • This does work in general - you can test roundtrip import/export with multiple attachments in Zotero. Here's what Zotero uses (and thus expects) for multiple PDFs in Endnote XML (which is I think what Bookends does for XML export):
    <urls>
    <web-urls>
    <url>http://www.mdpi.com/2072-6643/6/11/5117</url>
    </web-urls>
    <pdf-urls>
    <url>internal-pdf://44575/Burmeister et al. - 2023 - Classification of Features across Five CURE Networks Reveals Opportunities to Improve Course Design,.pdf</url>
    <url>internal-pdf://44636/Lomagno et al. - 2014 - Increasing Iron and Zinc in Pre-Menopausal Women and Its Effects on Mood and Cognition A Systematic.pdf</url>
    </pdf-urls>
    </urls>


    (the 44575 numbers are subfolders Zotero generates in the Export folder).

    How does this look coming from Bookends?
  • On my side, the export from Bookends looks like this:


    <urls><related-urls/><pdf-urls>
    <url><style face="normal" size="100%">file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%201%20-%2030%20Jan%201933%20to%202%20Aug%201934.pdf&#xD;
    file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%202%20-%2030%20Jan%201933%20to%202%20Aug%201934.pdf&#xD;
    file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%203%20-%203%20Aug%201934%20to%204%20Feb%201938.pdf&#xD;
    file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%204%20-%205%20Feb%201938%20to%2031%20Aug%201939.pdf&#xD;
    file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%205%20-%201%20Sep%201939%20to%2018%20Dec%201941.pdf&#xD;
    file://localhost/Users/cgoodwin/Library/Mobile%20Documents/iCloud~com~sonnysoftware~bot/Documents/Vol%206%20-%2019%20Dec%201941%20to%209%20May%201945.pdf
    </style>
    </url>
    </pdf-urls>
    </urls>
    </record>
    </records>
    </xml>


    So it looks to me like instead of a new tag for each source, it's just separating with a semicolon.

    Do you recommend closing out every url tag, then? That's a lot of editing but better than importing each attachment manually. Or is there a better way that you know of?
  • yeah, I think what Zotero is doing is certainly cleaner and I suspect correct for the XML (e.g., semicolons are legal characters in filenames, so just splitting on a semicolon could break things).
    You should be able to do this pretty well with some careful search & replace, especially if you use regex.
  • Ok, thank you so much!
  • Just an update for anyone stumbling across this page: I ended up putting around each file location and a closing bracket at the end of the file location . I also needed to remove the but mostly because it was in the wrong spot.

    To expedite the process I opened up the XML file in VSCode of my entire library. It was large and I had to increase the memory allowed through the XML plugins. I then structured the file using XML hierarchy to make it easy to read.

    I used "find and replace" to change to just be (because the style tag is used elsewhere you don't want to not use the part). Then I removed the correct by finding all instances of and replaced it with just .

    Then I needed to add before every other file location and after it.

    So I searched for " " without quotes, which is the semicolon between each file name. I replaced that with .

    At that point, I could easily import everything into Zotero.

    The only remaining issue is that every original PDF file name had spaces and I wanted to retain those. So I did find and replace on "%20" to " " (both without quotes).

    I then imported everything into Zotero and it was absolutely perfect.

    Hope this helps someone in the future!
  • Thanks for reporting back. You'll need to wrap the XML in code tags still
Sign In or Register to comment.