Sha256: da821bd4404284145b281e9f035c46a10979bc0716ab4a55d2d6c104f2c9fe09

Contents?: true

Size: 1.03 KB

Versions: 18

Compression:

Stored size: 1.03 KB

Contents

module Bolognese
  module Writers
    module CiteprocWriter
      def citeproc
        hsh = {
          "type" => citeproc_type,
          "id" => identifier,
          "categories" => Array.wrap(keywords).map { |k| parse_attributes(k, content: "text", first: true) }.presence,
          "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" => b_url,
          "version" => b_version,
          "volume" => volume
        }.compact
        JSON.pretty_generate hsh.presence
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
bolognese-0.10.13 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.11 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.10 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.9 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.8 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.7 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.6 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.5 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.4 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.3 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10.2 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.10 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.99 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.98 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.97 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.96 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.95 lib/bolognese/writers/citeproc_writer.rb
bolognese-0.9.94 lib/bolognese/writers/citeproc_writer.rb