Sha256: 59e1ea85f92f4328202e39f3ef7a6903eaaf19d920bea57c1c90c97335f05c9e

Contents?: true

Size: 1.64 KB

Versions: 2

Compression:

Stored size: 1.64 KB

Contents

# frozen_string_literal: true

module Bolognese
  module Writers
    module CrossciteWriter
      def crosscite
        hsh = {
          "id" => identifier,
          "doi" => doi,
          "url" => b_url,
          "type" => type,
          "additional_type" => additional_type,
          "citeproc_type" => citeproc_type,
          "bibtex_type" => bibtex_type,
          "ris_type" => ris_type,
          "resource_type_general" => resource_type_general,
          "resource_type" => additional_type,
          "creator" => creator,
          "title" => title,
          "publisher" => publisher,
          "container_title" => periodical && periodical["title"],
          "keywords" => keywords,
          "contributor" => contributor,
          "dates" => dates,
          "date_published" => date_published,
          "date_modified" => date_modified,
          "language" => language,
          "alternate_identifiers" => alternate_identifiers,
          "size" => size,
          "format" => b_format,
          "version" => b_version,
          "rights" => rights,
          "description" => description,
          "volume" => volume,
          "issue" => issue,
          "first_page" => first_page,
          "last_page" => last_page,
          "geo_location" => geo_location,
          "funding_references" => funding_references,
          "related_identifiers" => related_identifiers,
          "schema_version" => schema_version,
          "provider_id" => provider_id,
          "client_id" => client_id,
          "provider" => service_provider,
          "state" => state
        }.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/crosscite_writer.rb
bolognese-1.0 lib/bolognese/writers/crosscite_writer.rb