4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/bolognese/writers/citeproc_writer.rb', line 4
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
|