Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Created January 11, 2024 23:22
Show Gist options
  • Save tayiorbeii/fbcb08208611f86c9efd356c8a988159 to your computer and use it in GitHub Desktop.
Save tayiorbeii/fbcb08208611f86c9efd356c8a988159 to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
// Name: combine-txt-with-separators
let textFiles = await drop()
let allStrings = []
for (let f of textFiles) {
let text = await readFile(`${f.path}`, 'utf-8')
allStrings.push(`## ${f.name}\n`)
allStrings.push(text)
allStrings.push('\n------\n')
}
await writeFile(`${textFiles[0].path}-combined-transcript.md`, allStrings.join('\n'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment