Skip to content

Instantly share code, notes, and snippets.

View tayiorbeii's full-sized avatar

Taylor Bell tayiorbeii

View GitHub Profile
import "@johnlindquist/kit"
const _ = await npm('lodash')
// Name: checklist based on filename
// Description: generate a checklist based on the filename
let files = await drop()
let names = files.map(file => file.name.replace(/\.[^/.]+$/, ""))
import "@johnlindquist/kit"
/*
* Highlight the long video we are taking clips out of in Finder
*/
let longVideoFiles = await drop()
/**
* Tell kit we want to be working in the same directory as the source file
*/
cd(path.dirname(longVideoFiles[0].path))
import "@johnlindquist/kit"
// Name: srt to txt
// Author: Taylor Bell
// Description: Breaks an srt file into readable text blocks
let srtParser2 = await npm('srt-parser-2')
let parser = new srtParser2()
import "@johnlindquist/kit"
// Name: stub-notion-pages-from-md-files
let directory = await arg('Transcript directory: ')
await cd(directory)
let {_stdout} = await $`ls *.md`
let allMdFiles = _stdout.split('\n').map(file => file.replace('.md', ''))
import "@johnlindquist/kit"
const replaceAll = await npm('just-replace-all')
// Name: Copy Selected
// Shortcut: opt c
let selectedFile = await getSelectedFile()
let contents = await readFile(selectedFile, 'utf-8')
await copy(contents)
import "@johnlindquist/kit"
const replaceAll = await npm('just-replace-all')
// Name: Copy Selected
// Shortcut: opt c
let selectedFile = await getSelectedFile()
let contents = await readFile(selectedFile, 'utf-8')
await copy(contents)
import "@johnlindquist/kit"
// Author: Taylor Bell
// Name: search by filename
// Shortcut: opt+f
// Description: Select files in Finder that contain a substring
let name = await arg()
await applescript(`
import "@johnlindquist/kit"
// Name: stub-total-typescript-drafts
/**
* Copy all transcript .srt and .txt files into local repo directory
* so that .ts, .srt, and .txt files are all together.
* Run the `srt-to-text` script to format the transcript txt files.
*/
import "@johnlindquist/kit"
// Name: srt to txt
// Author: Taylor Bell
// Description: Breaks an srt file into readable text blocks
let srtParser2 = await npm('srt-parser-2')
let parser = new srtParser2()
import "@johnlindquist/kit"
// Author: Taylor Bell
// Name: search by filename
// Shortcut: opt+f
// Description: Select files in Finder that contain a substring
let name = await arg()
await applescript(`