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