<commit_before>def __main__(argv)
  if argv[1] == "version"
    puts "v#{Chimay::VERSION}"
  elsif argv[1] =~ Regexp.compile("https?://[^/]+[-a-zA-Z0-9./]+")
    Http.run(argv[1])
  elsif argv[1] =~ Regexp.compile("s3://[^/]+[-a-zA-Z0-9./]+")
    S3.run(argv[1])
  else
    file = File.open(argv[1])
    eval(file.read, nil, __FILE__, __LINE__)
  end
end<commit_msg>change to input script path from stdin<commit_after>def __main__(argv)
  if argv[1] == "version"
    puts "v#{Chimay::VERSION}"
  else
    input = STDIN.read

    if input =~ Regexp.compile("^https?://[^/]+[-a-zA-Z0-9./]+")
      Http.run(argv[1])
    elsif input =~ Regexp.compile("^s3://[^/]+[-a-zA-Z0-9./]+")
      S3.run(argv[1])
    else
      eval(input, nil, __FILE__, __LINE__)
    end
  end
end
{'fraction_non_alphanumeric': 0.23276983094928477, 'fraction_numerical': 0.027308192457737322, 'mean_word_length': 3.074074074074074, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7102129', 'n_tokens_mistral': 337, 'n_tokens_neox': 331, 'n_words': 55}