NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 26 forks source link

Add support for Zotero's `ZoteroItemUpdated` event #1804

Closed amoeba closed 3 years ago

amoeba commented 3 years ago

@datadavev mentioned in https://github.com/NCEAS/metacatui/issues/902#issuecomment-846450424 that we can pretty easily improve our support for Zotero with https://www.zotero.org/support/dev/exposing_metadata#force_zotero_to_refresh_metadata.

I think it'd be a good idea to add this in given Zotero's popularity and howe simple it is to add.

amoeba commented 3 years ago

Got this in with https://github.com/NCEAS/metacatui/commit/a5409a1bd95c3eed34d9dac05c668007e64cfd2c. It's a pretty small code change but I did test against pages from a few member nodes and found it worked as advertised. I put this on the 2.15.2 milestone and will put it in the Review/QA pipeline in a sec. This is ready for review.

mbjones commented 3 years ago

Fantastic!

amoeba commented 3 years ago

For a reference, with this change, you go from:

@misc{noauthor_dataone_nodate,
    title = {{DataONE} {Data} {Catalog}},
    url = {https://search.dataone.org/view/doi:10.5063/F14F1P2Q},
    urldate = {2021-05-24},
    file = {DataONE Data Catalog:/Users/bryce/Zotero/storage/J3JUHKGY/F14F1P2Q.html:text/html},
}

to:

@article{alaska_department_of_fish_and_game_commercial_2018,
    title = {Commercial vessel characteristics by year, state, {Alaskan} census area and city, 1978-2017},
    url = {https://search.dataone.org/view/doi:10.5063/F14F1P2Q},
    doi = {10.5063/F14F1P2Q},
    abstract = {The Commercial Fisheries Entry Commision (CFEC) is an independent, autonomous agency of the State of Alaska which regulates entry into Alaska's commercial fisheries. The CFEC is committed to promoting conservation and sustained-yield management of Alaska's unique fishery resources and boosting economic stability among fishermen and their dependents. To ensure effective management of commercial fisheries, all vessels used for commercial fishing or related activities must be licensed by the CFEC. This includes fishing vessels, tenders, packers, processors, transporter vessels, and seine skiffs. The CFEC is responsible for leasing all commercial fishing permits including permits for limited-entry fisheries. Limited-entry fisheries include all state salmon fisheries, most herring fisheries, and various other fisheries. This data is based on commercial vessel licenses which are required for any vessel, boat, ship or other craft which is used for commercial fishing or for aiding or assisting in the performance of any activity related to commercial fishing (including refrigeration, transportation and processing). Data for characteristics of all commercial vessels registered with the CFEC are included in this dataset. Also included is a set of figures showing vessel horsepower through time, for different regions in Alaska.},
    language = {en},
    urldate = {2021-05-24},
    author = {Alaska Department of Fish {and} Game, Commercial Fisheries Entry Commission and Schwoerer, Tobias},
    year = {2018},
    note = {Publisher: Knowledge Network for Biocomplexity},
}