<commit_before>#!/usr/bin/env ruby

require_relative '../utility.rb'
@config = read_YAML("config.yml")

user = ARGV[0]
repo = ARGV[1]

# puts Dir.pwd

# Clone repo into projects
Dir.chdir("#{@config['root']}/#{@config['projects']}")
puts `git clone --depth=1 https://github.com/#{user}/#{repo}.git`
puts `echo 'done'`

# Set it up
Dir.chdir("#{repo}")
puts `./setup`

# Add it to projects
Dir.chdir("../../../user")
File.open("projects.yml", 'a') do |file|
	file.puts ""
	file.puts "- project: #{repo}\n"
	file.puts "  user: #{user}\n"
	file.puts "  repo: #{repo}\n"
	file.puts "  repo: #{repo}\n"
	file.puts "  desc: (none yet!)"
end

puts "done"<commit_msg>Works. The reason it wasn't was because `watch` canceled it<commit_after>#!/usr/bin/env ruby

require_relative '../utility.rb'
@config = read_YAML("config.yml")

user = ARGV[0]
repo = ARGV[1]

puts Dir.pwd

# Clone repo into projects
Dir.chdir("#{@config['root']}/#{@config['projects']}")
puts `git clone --depth=1 https://github.com/#{user}/#{repo}.git`

# Set it up
Dir.chdir("#{repo}")
puts `./setup`

# Add it to projects
Dir.chdir("../../../user")
File.open("projects.yml", 'a') do |file|
	file.puts ""
	file.puts "- project: #{repo}\n"
	file.puts "  user: #{user}\n"
	file.puts "  repo: #{repo}\n"
	file.puts "  repo: #{repo}\n"
	file.puts "  desc: (none yet!)"
end

puts "done"
{'fraction_non_alphanumeric': 0.23454951600893523, 'fraction_numerical': 0.004467609828741623, 'mean_word_length': 3.887272727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3074654', 'n_tokens_mistral': 564, 'n_tokens_neox': 554, 'n_words': 125}