Sha256: e9847344a54988fa9f57b132527bb28ce03d3b43200f041672dfbad7903f48a4

Contents?: true

Size: 988 Bytes

Versions: 25

Compression:

Stored size: 988 Bytes

Contents

module Bolognese
  module Writers
    module CiteprocWriter
      def citeproc
        hsh = {
          "type" => citeproc_type,
          "id" => id,
          "categories" => parse_attributes(keywords, content: "text"),
          "language" => language,
          "author" => to_citeproc(author),
          "editor" => to_citeproc(editor),
          "issued" => get_date_parts(date_published),
          "submitted" => get_date_parts(date_submitted),
          "abstract" => parse_attributes(description, content: "text", first: true),
          "container-title" => container_title,
          "DOI" => doi,
          "issue" => issue,
          "page" => [first_page, last_page].join("-").presence,
          "publisher" => publisher,
          "title" => parse_attributes(title, content: "text", first: true),
          "URL" => url,
          "version" => version,
          "volume" => volume
        }.compact
        JSON.pretty_generate hsh.presence
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
bolognese-0.9.62 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.61 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.60 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.59 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.58 lib/bolognese/writers/citeproc_writer.rb