Sha256: e4053170848ac2c4bba97c1af10729d2cefd9f9e610966002a1c0e9f062aa8fc

Contents?: true

Size: 898 Bytes

Versions: 32

Compression:

Stored size: 898 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" => 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

32 entries across 32 versions & 1 rubygems

Version Path
bolognese-0.9.89 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.88 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.87 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.86 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.85 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.84 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.83 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.82 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.81 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.80 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.79 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.78 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.77 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.76 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.75 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.74 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.73 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.72 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.71 lib/bolognese/writers/ris_writer.rb
bolognese-0.9.70 lib/bolognese/writers/ris_writer.rb