<commit_before>#!/usr/bin/env jruby -I lib
require 'optparse'
require 'dspace'

options = {}
parser = OptionParser.new do |opts|
  opts.banner = "Usage: #{__FILE__} [-d]  handle.."

  opts.on("-d", "--[no-]detail", "Printe detais") do |v|
    options[:details] = v
  end
end

begin
  parser.parse!
  details = options[:details]

  DSpace.load

  ARGV.each do |obj|
    d = DSpace.fromString(obj)
    if (d) then
      puts JSON.pretty_generate(details ? DSpace.create(d).report : DSpace.create(d).dso_report)
    else
      $stderr.puts "ERROR: no such object #{obj}"
    end
  end
rescue Exception => e
  puts e.message;
  puts parser.help();
end


<commit_msg>obj_print with -v parameter<commit_after>#!/usr/bin/env jruby -I lib
require 'optparse'
require 'dspace'

options = {}
parser = OptionParser.new do |opts|
  opts.banner = "Usage: #{__FILE__} [-d]  handle.."

  opts.on("-v", "--[no-]verbose", "Printe detais") do |v|
    options[:details] = v
  end
end

begin
  parser.parse!
  details = options[:details]

  DSpace.load

  ARGV.each do |obj|
    d = DSpace.fromString(obj)
    if (d) then
      puts JSON.pretty_generate(details ? DSpace.create(d).report : DSpace.create(d).dso_report)
    else
      $stderr.puts "ERROR: no such object #{obj}"
    end
  end
rescue Exception => e
  puts e.message;
  puts parser.help();
end



{'fraction_non_alphanumeric': 0.15160567587752055, 'fraction_numerical': 0.0, 'mean_word_length': 3.174454828660436, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4962587', 'n_tokens_mistral': 505, 'n_tokens_neox': 493, 'n_words': 127}