Sha256: 8c1154b70e945b96cc0fd2833600c51b2ff80a59c96890f1f5c94821311a9a21

Contents?: true

Size: 939 Bytes

Versions: 17

Compression:

Stored size: 939 Bytes

Contents

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

17 entries across 17 versions & 1 rubygems

Version Path
bolognese-0.10.11 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.10 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.9 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.8 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.7 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.6 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.5 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.4 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.3 lib/bolognese/writers/ris_writer.rb
bolognese-0.10.2 lib/bolognese/writers/ris_writer.rb
bolognese-0.10 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.99 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.98 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.97 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.96 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.95 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.94 lib/bolognese/writers/ris_writer.rb