Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Created November 3, 2022 21:02
Show Gist options
  • Save tayiorbeii/6a6f4e5d5c0c264cbaeda1c038a628fb to your computer and use it in GitHub Desktop.
Save tayiorbeii/6a6f4e5d5c0c264cbaeda1c038a628fb to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
const _ = await npm('lodash')
// Name: transcript-notes-checklist
// Description: Drag srt-transcript.txt files to generate a Roam formatted checklist that includes the transcript
let files = await drop()
let results = []
for (let file of files) {
let name = file.name.replace('.srt-transcript.txt', "")
let text = await readFile(file.path, 'utf8')
results.push({name, text})
}
let markdown = results.map(result => `
${result.name}
\tNotes
\tTranscript
\t\t${result.text.split("\n").filter(line => !line == '').map(line => `- ${line}`).join("\n\t\t")}
`).join("\n\t")
await copy(markdown)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment