Sha256: a09fa131a5b38d50af2504c784d69f6a9285b0f28f3c2fae7112c76da8f5d1ae

Contents?: true

Size: 1004 Bytes

Versions: 7

Compression:

Stored size: 1004 Bytes

Contents

module Bolognese
  module Writers
    module CiteprocWriter
      def citeproc
        hsh = {
          "type" => citeproc_type,
          "id" => identifier,
          "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].compact.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

7 entries across 7 versions & 1 rubygems

Version Path
bolognese-0.9.89 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.88 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.87 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.86 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.85 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.84 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.83 lib/bolognese/writers/citeproc_writer.rb