import json 
import argparse 
import os 


parser =argparse .ArgumentParser ("llm-recipes")
parser .add_argument ("--data-file-path",type =str ,required =True )
args =parser .parse_args ()


with open (args .data_file_path ,'r')as file :
    data =json .load (file )


base ,_ =os .path .splitext (args .data_file_path )
new_file_path =base +".jsonl"


with open (new_file_path ,'w')as file :
    for entry in data :

        json .dump (entry ,file ,ensure_ascii =False )
        file .write ('\n')
