lib/bolognese/writers/ris_writer.rb in bolognese-0.15.9 vs lib/bolognese/writers/ris_writer.rb in bolognese-1.0
- old
+ new
@@ -5,12 +5,12 @@
module RisWriter
def ris
{
"TY" => ris_type,
"T1" => parse_attributes(title, content: "text", first: true),
- "T2" => container_title,
- "AU" => to_ris(author),
+ "T2" => periodical && periodical["title"],
+ "AU" => to_ris(creator),
"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,
@@ -18,9 +18,10 @@
"LA" => language,
"VL" => volume,
"IS" => issue,
"SP" => first_page,
"EP" => last_page,
+ "SN" => Array.wrap(related_identifiers).find { |ri| ri["relation_type"] == "IsPartOf" }.to_h.fetch("id", nil),
"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