Sha256: 4517178be735c5e4daedc5b196c473c26af5d2e1e1ce5a92f2e253ce41e73ba4

Contents?: true

Size: 361 Bytes

Versions: 36

Compression:

Stored size: 361 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift 'lib'

require 'sdr_client'

output = JSON.parse($stdin.read).tap do |hash|
  hash.dig('description', 'event').each do |event|
    event['date'].each do |event_date|
      event_date.delete('encoding') if event_date.dig('encoding', 'code') == 'w3cdtf'
    end
  end
end.to_json

puts output

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
sdr-client-2.18.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.17.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.16.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.13.2 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.13.1 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.13.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.13.0.beta2 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.13.0.beta1 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.12.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.11.1 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.11.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.10.1 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.10.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.9.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.8.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.7.1 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.7.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.6.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.5.0 exe/remove_w3cdtf_encoding_from_event_dates
sdr-client-2.4.0 exe/remove_w3cdtf_encoding_from_event_dates