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.82 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.81 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.80 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.79 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.78 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.77 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.76 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.75 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.74 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.73 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.72 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.71 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.70 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.69 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.68 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.67 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.66 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.65 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.64 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.63 lib/bolognese/writers/citeproc_writer.rb