Sha256: d4775150df946c79a12d2c7bf63002524ec76da9c96963a7e63cfd43d527455c

Contents?: true

Size: 922 Bytes

Versions: 10

Compression:

Stored size: 922 Bytes

Contents

module Bolognese
  module Writers
    module CiteprocWriter
      def citeproc
        hsh = {
          "type" => citeproc_type,
          "id" => id,
          "categories" => keywords.present? ? keywords.split(", ") : nil,
          "language" => language,
          "author" => to_citeproc(author),
          "editor" => to_citeproc(editor),
          "issued" => get_date_parts(date_published),
          "submitted" => get_date_parts(date_submitted),
          "abstract" => description.is_a?(Hash) ? description.fetch("text", nil) : description,
          "container-title" => container_title,
          "DOI" => doi,
          "issue" => issue,
          "page" => pagination,
          "publisher" => publisher,
          "title" => title,
          "URL" => url,
          "version" => version,
          "volume" => volume
        }.compact
        JSON.pretty_generate hsh.presence
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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