<commit_before>
def cyber_dojo_start_point_inspect
  exit_success_if_show_start_point_inspect_help
  exit_failure_if_start_point_inspect_unknown_arguments
  name = ARGV[2]
  puts cyber_dojo_start_point_inspection(name)
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def cyber_dojo_start_point_inspection(name)
  command =
  [
    'docker run',
    '--rm',
    '--interactive',
    name,
    "sh -c 'ruby /app/repos/inspect.rb'"
  ].join(' ')
  run(command)
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def exit_success_if_show_start_point_inspect_help
  help = [
    '',
    "Use: #{me} start-point inspect NAME",
    '',
    'Prints the display_name, image_name, sha, and url of each entry in the named start-point',
  ]
  name = ARGV[2]
  if [nil,'-h','--help'].include?(name)
    show help
    exit succeeded
  end
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def exit_failure_if_start_point_inspect_unknown_arguments
  name = ARGV[2]
  exit_unless_start_point_image(name)
  ARGV[3..-1].each do |arg|
    STDERR.puts "FAILED: unknown argument [#{arg}]"
  end
  unless ARGV[3].nil?
    exit failed
  end
end
<commit_msg>improve help text for [start-point inpsect] by saying output is in JSON form<commit_after>
def cyber_dojo_start_point_inspect
  exit_success_if_show_start_point_inspect_help
  exit_failure_if_start_point_inspect_unknown_arguments
  name = ARGV[2]
  puts cyber_dojo_start_point_inspection(name)
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def cyber_dojo_start_point_inspection(name)
  command =
  [
    'docker run',
    '--rm',
    '--interactive',
    name,
    "sh -c 'ruby /app/repos/inspect.rb'"
  ].join(' ')
  run(command)
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def exit_success_if_show_start_point_inspect_help
  help = [
    '',
    "Use: #{me} start-point inspect NAME",
    '',
    'Prints, in JSON form, the display_name, image_name, sha, and url of each entry in the named start-point',
  ]
  name = ARGV[2]
  if [nil,'-h','--help'].include?(name)
    show help
    exit succeeded
  end
end

# - - - - - - - - - - - - - - - - - - - - - - - -

def exit_failure_if_start_point_inspect_unknown_arguments
  name = ARGV[2]
  exit_unless_start_point_image(name)
  ARGV[3..-1].each do |arg|
    STDERR.puts "FAILED: unknown argument [#{arg}]"
  end
  unless ARGV[3].nil?
    exit failed
  end
end

{'fraction_non_alphanumeric': 0.15813758389261745, 'fraction_numerical': 0.0050335570469798654, 'mean_word_length': 2.2987551867219915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6856335', 'n_tokens_mistral': 958, 'n_tokens_neox': 943, 'n_words': 169}