import os

input_dir = "data/"

output_file = "data/evalcrafter_prompts.txt"

with open(output_file, "w", encoding="utf-8") as outfile:
    for fname in sorted(os.listdir(input_dir)):
        if fname.endswith(".txt"):
            fpath = os.path.join(input_dir, fname)
            with open(fpath, "r", encoding="utf-8") as infile:
                line = infile.readline().strip()
                outfile.write(line + "\n")

print(f"Done，Generated {output_file}")
