Created
          November 3, 2022 21:02 
        
      - 
      
 - 
        
Save tayiorbeii/6a6f4e5d5c0c264cbaeda1c038a628fb to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or 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" | |
| 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