psu-libraries / psulib_blacklight

Penn State University Libraries' Blacklight Catalog
Apache License 2.0
10 stars 3 forks source link

Citation functionality #335

Closed cdmo closed 1 year ago

cdmo commented 5 years ago

Ruth: I updated our Wiki page about this toward the end of 2022. https://github.com/psu-libraries/psulib_blacklight/wiki/Adding-RIS-Citation-Export

For implementation -- let's replace the Refworks and EndNote exports since they can both use RIS and they're not going to be as good quality as what we're giving in RIS. This will be in the Share dropdown and it'll be just Email and Export RIS.

Multiple authors can be put in as repeating A2s, however none of the rest of the fields can repeat so we'll need to grab field[0] for any arrays. (did my own test to see how Zotero handles it)

Including below notes from how they did it at Wisconsin -- they're using straight Ruby vs. Blacklight, so we would probably have to look into how BL does it when making exports, but it might be useful. (I got this info when checking something else they do that I decided won't be a good fit for our catalog.) Our own RIS mappings are in the wiki link above.

We register the mime type (in the rails default mime_types.rb) with: Mime::Type.register "application/x-research-info-systems", :ris

We have a “show.ris.erb” that looks like:

TY  - <%= @doc.ris_type %>

T1  - <%= @doc.title %>

AU  - <%= @doc.simple_author %>

PY  - <%= @doc.dates.first %>

PB  - <%= @doc.edition_and_imprint %>

AB  - <%= @doc.physical_descriptions.first %>

<% @doc.call_numbers.each do |cn| %>

CN  - <%= cn %>

<% end %>

N1  - <%= @doc.display_notes.join(";") %>

ID  - <%= @doc.id %>

UR  - <%= system_item_url(@doc.id) %>

ER  -

And then link to our ris view of the show page by specifying the format:

<%= link_to t(:cite_export), system_item_path(@doc.id, format: :ris) %>
banukutlu commented 5 years ago

we will remove this feature from the pre-release but will fix for initial release

cdmo commented 5 years ago

So I'll push this out to 1.0.x for now then.

banukutlu commented 5 years ago

So I'll push this out to 1.0.x for now then.

yes but we need to remember to hide the functionality for 0.2.x release.

banukutlu commented 5 years ago

oh I saw that you added hiding this as task in #319, yes makes sense ✔️

ruthtillman commented 3 years ago

Heather Ross noted that Wisconsin (not a BL institution but has a Ruby/Solr setup) has a really nice citation feature!

https://search.library.wisc.edu/catalog/9910017867502121/cite