Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Adds "Download in RIS format" functionality to Blacklight.
Blacklight plugin that adds the ability to download a RIS representation of a record from a catalog show page and a set of records from the bookmarks index page.
v0.1.0
-> Known to work with Blacklight v6 and Rails 4
v0.2.0
-> Known to work with Blacklight v8 and Rails 7 (untested with Blacklight v7 but might work)
Add this line to your application's Gemfile:
gem 'blacklight-ris'
And then execute:
$ bundle install
Modify your SolrDocument
class with the extension modules for RIS,
and define your field mappings using the ris_field_mappings
hash.
class SolrDocument
# ...existing code...
include Blacklight::Ris::DocumentFields
use_extension(Blacklight::Ris:DocumentExport)
ris_field_mappings.merge!(
# Procs are evaluated in context of SolrDocument instance
:TY => Proc.new {
format = fetch('format_a', [])
if format.member?('Book')
'BOOK'
elsif format.member?('Journal/Periodical')
'JOUR'
else
'GEN'
end
},
# use solr field named 'title'
:TI => 'title',
:AU => 'author_creator_a',
:PY => 'publication_date_a',
# this assumes you're using blacklight-marc
:CY => Proc.new { marclibrary.get_ris_cy_field(to_marc) },
:PB => Proc.new { marclibrary.get_ris_pb_field(to_marc) },
:ET => 'edition',
:SN => Proc.new { marclibrary.get_ris_sn_field(to_marc) },
)
end
Modify your CatalogController
to include the
Blacklight::Ris::Catalog
module. Put this at the end of any existing
includes.
class CatalogController < ApplicationController
# ...existing includes...
include Blacklight::Catalog
# add this line
include Blacklight::Ris::Catalog
end
The show view and bookmarks page should now display links for downloading records in RIS format.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that blacklight-ris demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.