rmzelle / ref-extractor

Reference Extractor - Extract Zotero/Mendeley references from Microsoft Word files
https://rintze.zelle.me/ref-extractor/
MIT License
318 stars 18 forks source link

Mendeley Cite (new Word plugin) compatibility #39

Open psobolewskiPhD opened 3 years ago

psobolewskiPhD commented 3 years ago

References inserted in the new MS Word (365) using the new Mendeley Cite plugin do not appear to be extractable. Here's a test file made on Mac OS 11.5.2, Word 16.52, Mendeley Cite 1.33.2 test_ref.docx

rmzelle commented 3 years ago

@psobolewskiPhD, thanks! It looks like this program stores the citation metadata in a different way. I have little time for open source nowadays, so I can't offer a quick fix.

In case somebody else wishes to work on this:

It looks like Mendeley Cite (a separate tool from Mendeley Desktop; see https://www.mendeley.com/reference-management/mendeley-cite) still stores item metadata in CSL JSON, but not in Mendeley Desktop's typical fashion. The embedded item metadata for Mendeley Cite Word documents can be found by extracting the .docx file above, and reading the word/webextensions/webextension1.xml file (here the contents after reindenting with https://www.freeformatter.com/xml-formatter.html and unescaping with https://www.freeformatter.com/html-escape.html):

<?xml version="1.0" encoding="UTF-8"?>
<we:webextension xmlns:we="http://schemas.microsoft.com/office/webextensions/webextension/2010/11" id="{1629F4A7-E299-1746-8737-A7C8EE395DE0}">
   <we:reference id="f78a3046-9e99-4300-aa2b-5814002b01a2" version="1.28.0.0" store="EXCatalog" storeType="EXCatalog" />
   <we:alternateReferences>
      <we:reference id="WA104382081" version="1.28.0.0" store="pl-PL" storeType="OMEX" />
   </we:alternateReferences>
   <we:properties>
      <we:property name="MENDELEY_CITATIONS" value="[{"citationID":"MENDELEY_CITATION_ad45ebab-9586-43de-afcb-d61c125265eb","citationItems":[{"id":"f2b99245-f06e-3336-94ac-63beadc04d1c","itemData":{"type":"article-journal","id":"f2b99245-f06e-3336-94ac-63beadc04d1c","title":"A Convenient and Efficient Centrifugation Assay for Comparing Cell Adhesion Strength on Uncharted Surfaces","author":[{"family":"Zhou","given":"Xuan","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Zhou","given":"Xin","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Du","given":"Yichen","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Shi","given":"Xiaohua","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"You","given":"Pan","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Chen","given":"Tao","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Fan","given":"Dongli","parse-names":false,"dropping-particle":"","non-dropping-particle":""},{"family":"Zhang","given":"Yiming","parse-names":false,"dropping-particle":"","non-dropping-particle":""}],"container-title":"Journal of Biomaterials and Tissue Engineering","DOI":"10.1166/jbt.2020.2285","ISSN":"2157-9083","URL":"https://www.ingentaconnect.com/content/10.1166/jbt.2020.2285","issued":{"date-parts":[[2020,4,1]]},"page":"462-468","abstract":"Regulating cell-substrate adhesion is of fundamental importance in biomaterial design and development. While an increasing number of approaches are being developed to quantify cell adhesion strength, only a fraction of these techniques provide measurements that are simple and sensitive at the living cell population level. In our previous study, the expression of adhesion-associated proteins in fibroblasts was found to change on ion-implanted silicone rubber; however, the actual effects of the modified surfaces on cellular mechanical properties remain to be probed. Here, we proposed a convenient method to compare the cell adhesion strength on various surfaces, for multiple adhesion periods and with different cell types. This method requires only common laboratory equipment. In addition, we introduced a new parameter, ECS 50 , which is appropriate for screening optimum centrifugal conditions when the cell affinity of the surface as a control is initially unknown. This parameter is helpful for further exploration of cell affinity on all the biomaterials of interest. The results demonstrate that this centrifugation assay is simple, efficient and adaptable in investigating the overall adhesion strength of living cells under various conditions, and therefore, it is a valid way to develop adhesion-controlled biointerface materials in the future.","issue":"4","volume":"10"},"isTemporary":false}],"properties":{"noteIndex":0},"isEdited":false,"manualOverride":{"isManuallyOverridden":false,"citeprocText":"(1)","manualOverrideText":""},"citationTag":"MENDELEY_CITATION_v3_eyJjaXRhdGlvbklEIjoiTUVOREVMRVlfQ0lUQVRJT05fYWQ0NWViYWItOTU4Ni00M2RlLWFmY2ItZDYxYzEyNTI2NW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WwgZm9yIGZ1cnRoZXIgZXhwbG9yYXRpb24gb2YgY2VsbCBhZmZpbml0eSBvbiBhbGwgdGhlIGJpb21hdGVyaWFscyBvZiBpbnRlcmVzdC4gVGhlIHJlc3VsdHMgZGVtb25zdHJhdGUgdGhhdCB0aGlzIGNlbnRyaWZ1Z2F0aW9uIGFzc2F5IGlzIHNpbXBsZSwgZWZmaWNpZW50IGFuZCBhZGFwdGFibGUgaW4gaW52ZXN0aWdhdGluZyB0aGUgb3ZlcmFsbCBhZGhlc2lvbiBzdHJlbmd0aCBvZiBsaXZpbmcgY2VsbHMgdW5kZXIgdmFyaW91cyBjb25kaXRpb25zLCBhbmQgdGhlcmVmb3JlLCBpdCBpcyBhIHZhbGlkIHdheSB0byBkZXZlbG9wIGFkaGVzaW9uLWNvbnRyb2xsZWQgYmlvaW50ZXJmYWNlIG1hdGVyaWFscyBpbiB0aGUgZnV0dXJlLiIsImlzc3VlIjoiNCIsInZvbHVtZSI6IjEwIn0sImlzVGVtcG9yYXJ5IjpmYWxzZX1dLCJwcm9wZXJ0aWVzIjp7Im5vdGVJbmRleCI6MH0sImlzRWRpdGVkIjpmYWxzZSwibWFudWFsT3ZlcnJpZGUiOnsiaXNNYW51YWxseU92ZXJyaWRkZW4iOmZhbHNlLCJjaXRlcHJvY1RleHQiOiIoMSkiLCJtYW51YWxPdmVycmlkZVRleHQiOiIifX0="}]" />
      <we:property name="MENDELEY_CITATIONS_STYLE" value=""https://www.zotero.org/styles/vancouver"" />
   </we:properties>
   <we:bindings />
   <we:snapshot xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" />
</we:webextension>