import csv

# Converts a CSV file to | delimted 
# use for incorporating data into RAG system

input_file = "input.csv"
output_file = "output.txt"

with open(input_file, newline='', encoding='utf-8') as csvfile, \
     open(output_file, 'w', newline='', encoding='utf-8') as outfile:
    
    reader = csv.reader(csvfile)
    writer = csv.writer(outfile, delimiter='|')
    
    for row in reader:
        writer.writerow(row)

print("Conversion complete.")