<commit_before><commit_msg>letitgo: Helper script to combine surtitles files, audio files, and the video clip<commit_after>constant basedir="../Downloads/Let It Go (The Complete Set) (From Frozen) YG";
int main(int argc,array(string) argv)
{
	array(string) dir=({ });
	for (int i=1;i<=2;++i)
	{
		string path=basedir+"/CD"+i+"/";
		dir+=path+utf8_to_string(sort(get_dir(path))[*])[*];
	}
	nextarg: foreach (argv[1..],string fn)
	{
		string findme=lower_case(utf8_to_string(fn))-".srt";
		foreach (dir,string f) if (has_value(lower_case(f),findme))
		{
			sscanf((f/"/")[-1],"%*s(%s Version).%s",string lang,string mp3);
			if (!lang || mp3!="mp3") lang=fn-".srt";
			write("Creating: %O\n",lang);
			Process.create_process(({"avconv",
				"-i","/video/Clips/Frozen - Let It Go.mkv",
				"-i",string_to_utf8(f),
				"-i",fn,
				"-map","0:v","-map","1:a:0","-map","2:s",
				"-c","copy",lang+".mkv"
			}))->wait();
			continue nextarg;
		}
		write("Not found: %s\n",fn);
	}
}

{'fraction_non_alphanumeric': 0.24512820512820513, 'fraction_numerical': 0.014358974358974359, 'mean_word_length': 4.609195402298851, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7266261', 'n_tokens_mistral': 450, 'n_tokens_neox': 407, 'n_words': 70}