Created
January 11, 2024 23:22
-
-
Save tayiorbeii/fbcb08208611f86c9efd356c8a988159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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