I'm trying to make a program that will translate subtiltes file from a given path. The programm is running inside electron - so I have access to the computer's files. The problem is I couldn't find explanation on how to read and parse srt file is it possible?
function translateSubs(path, newPath){
var srt = readFile(path)
var translatedOutput = []
srt.data.foreach(line => {
line.text = translateToEnglishline.text()
})
parseFile(srt, newPath)
}