Sha256: a3f5930df4b274564ced48bb5701281c55ae32aebf6885bf58d3ea7a5ffe0636
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
module Bolognese # frozen_string_literal: true module Writers module DataciteJsonWriter def datacite_json hsh = { "id" => identifier, "doi" => doi, "url" => b_url, "creator" => creator, "title" => title, "publisher" => publisher, "container-title" => periodical && periodical["title"], "resource-type-general" => resource_type_general, "resource-type" => additional_type, "subject" => keywords.present? ? keywords.split(", ") : nil, "contributor" => contributor, "date-published" => date_published, "date-modified" => date_modified, "dates" => dates, "publication-year" => publication_year, "language" => language, "alternate-identifiers" => alternate_identifiers, "related-identifiers" => related_identifiers, "size" => size, "format" => b_format, "version" => b_version, "rights" => rights, "description" => description, "geo-location" => geo_location, "funding-references" => funding_references, "schema-version" => schema_version, "provider-id" => provider_id, "client-id" => client_id, "provider" => service_provider }.compact JSON.pretty_generate hsh.presence end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bolognese-1.0.1 | lib/bolognese/writers/datacite_json_writer.rb |
bolognese-1.0 | lib/bolognese/writers/datacite_json_writer.rb |