Sha256: 3703c8b0d709ce04e225d84ca6e51a4684f1d4862af8e2d8eddc8c05d8c15674

Contents?: true

Size: 869 Bytes

Versions: 14

Compression:

Stored size: 869 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" => url,
          "AB" => parse_attributes(description, content: "text", first: true),
          "KW" => parse_attributes(keywords, content: "text").presence,
          "PY" => publication_year,
          "PB" => publisher,
          "AN" => parse_attributes(alternate_name, content: "name").presence,
          "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

14 entries across 14 versions & 1 rubygems

Version Path
bolognese-0.9.56 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.55 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.54 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.52 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.51 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.50 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.48 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.44 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.43 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.42 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.41 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.39 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.38 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.37 lib/bolognese/writers/ris_writer.rb