Sha256: c3b4de35f88f74de7d28e0084eac521b0a4e5f1802c223275c4469ff77df3903

Contents?: true

Size: 788 Bytes

Versions: 10

Compression:

Stored size: 788 Bytes

Contents

module Bolognese
  module Writers
    module RisWriter
      def ris
        {
          "TY" => ris_type,
          "T1" => title,
          "T2" => container_title,
          "AU" => to_ris(author),
          "DO" => doi,
          "UR" => url,
          "AB" => description.present? ? description["text"] : nil,
          "KW" => keywords.to_s.split(", ").presence,
          "PY" => publication_year,
          "PB" => publisher,
          "AN" => alternate_name.present? ? alternate_name["name"] : nil,
          "LA" => language,
          "VL" => volume,
          "IS" => issue,
          "SP" => pagination,
          "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

10 entries across 10 versions & 1 rubygems

Version Path
bolognese-0.9.19 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.18 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.17 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.16 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.15 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.14 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.13 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.11 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.10 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.9 lib/bolognese/writers/ris_writer.rb