Creating Zotero Database Entries from Document with Zotero Links

I made a big mistake with my Zotero database - I accidentally deleted all of the entries that I had listed under "My Library" I have many different collections and sub-collections, but I also had a substantial amount of entries that were in "My Library" which I thought was a general category and I did not realize that these entries went into the "unfiled items." These files were deleted when I uploaded and then deleted a large parallel RDF file of some of my other collections (I was messing around with trying to upload them to a shared folder) - but then I "deleted the collection" which took it to "unfiled items" and then I deleted all my "unfiled items" which included the files from "My Library" (which I did not mean to delete). So my question - is it possible to re-create these entries using a linked document (like my dissertation!?!?)? Or is there any way to recover this (this happened around five months ago and I just now figured out what the main issue was)?

Thanks in advance
  • You don't have an old harddisk backup (e.g. via Mac Time Machine or the like) do you? That'd be by far the easiest.
    There is a way to get stuff out of linked documents, but it's fairly involved, so a backup would be much preferable.
  • I wish... Unfortunately, I do not have one. I had saved some copies of Zotero in the past - but I was primarily concerned with my collections and neglected the "My Library" part, which has led to the current issue. It would be well worth it to me to attempt the process that you mention - if you do not mind explaining. Thanks
  • basic instructions are here:
    https://forums.zotero.org/discussion/35987/import-old-zotero-bibliography-from-word-field-codes-still-present-into-library/#Item_8

    MLZ is now called juris-m, but should work basically the same way otherwise.

    It sounds like you're working with import/export a lot. I'd generally council against that and it's certainly not how you want to back up items. For that, see
    https://www.zotero.org/support/zotero_data#backing_up_your_zotero_library
  • Thanks. That seemed to partially work (it extracted 165 references of several thousand references) but apparently this feature in Juris-m has not been updated yet as he notes in the comments section of the MLZ page.
  • I'm sorry, I fear that's the best I can currently do for you.
    If you have some tech skills, you could potentially write a parser (e.g. in VBA, but potentially also just any scripting language using regular expressions) that retrieves all the CSL_JSON codes from the document and puts them into a text file that Zotero can then import. Doable, but certainly not trivial.
  • I created a tool, "Reference Extractor", to quickly extract embedded Zotero references from .docx Word documents. It's available at http://rintze.zelle.me/ref-extractor/. The extracted item metadata (in CSL JSON format) can be (re)imported into Zotero.

    I don't know if it would work with a Word document containing thousands of references, but you can give it a try.

    P.S. Feedback is more than welcome, and can be given either here or at the code repository at https://github.com/rmzelle/ref-extractor.
    P.P. S. There are no privacy concerns: while it is a website, the extraction takes place entirely on your computer, and nobody has access to the Word documents you process with the tool.
Sign In or Register to comment.