Sha256: d2ca74b6a8f3f299ff2fb1cb6483bb32051b681424690c07122cd332da99ebd9
Contents?: true
Size: 972 Bytes
Versions: 8
Compression:
Stored size: 972 Bytes
Contents
# frozen_string_literal: true module Bolognese module Writers module RisWriter def ris { "TY" => ris_type, "T1" => parse_attributes(title, content: "text", first: true), "T2" => container_title, "AU" => to_ris(author), "DO" => doi, "UR" => b_url, "AB" => parse_attributes(description, content: "text", first: true), "KW" => Array.wrap(keywords).map { |k| parse_attributes(k, content: "text", first: true) }.presence, "PY" => publication_year, "PB" => publisher, "AN" => parse_attributes(alternate_name, content: "name").presence, "LA" => language, "VL" => volume, "IS" => issue, "SP" => first_page, "EP" => last_page, "ER" => "" }.compact.map { |k, v| v.is_a?(Array) ? v.map { |vi| "#{k} - #{vi}" }.join("\r\n") : "#{k} - #{v}" }.join("\r\n") end end end end
Version data entries
8 entries across 8 versions & 1 rubygems