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
let MarkdownIt = await npm("markdown-it") | |
import shiki from "shiki" | |
import "@johnlindquist/kit" | |
// Name: Markdown to HTML (Light Mode) | |
// Description: Paste Markdown to generate HTML with syntax highlighting | |
// Author: Taylor Bell | |
shiki.getHighlighter({ | |
theme: "light-plus" |
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: stopwatch | |
let time = 0; | |
let timerId = null; | |
let isPaused = false; | |
function formatTime(timeInSeconds) { | |
let hours = Math.floor(timeInSeconds / 3600); | |
let minutes = Math.floor((timeInSeconds - (hours * 3600)) / 60); |
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" | |
// Author: Taylor Bell | |
// Name: search by filename | |
// Shortcut: opt+f | |
// Description: Select files in Finder that contain a substring (comma separate for multiple matches) | |
let searchList = await arg(); // e.g. ".srt, .mp3, taco" | |
let searchItems = searchList.split(",").map(item => item.trim()).filter(Boolean); | |
let searchCriteria = searchItems.map(item => `name contains "${item}"`).join(" or "); |
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: Open VS Code Here | |
// Shortcut: option+v | |
// Author: Taylor Bell | |
let selectedFile = await getSelectedFile() | |
// remove the filename from the path | |
let path = selectedFile.replace(/\/[^\/]*$/, '') |
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: shorten-deepgram-srt | |
let deepgramJson = await drop("Drop deepgram json file"); | |
let jsonInput = await readFile(deepgramJson[0].path, 'utf-8'); | |
let data = JSON.parse(jsonInput); | |
function convertTime(inputSeconds) { |
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
/* | |
# OG Image Downloader | |
- Retrieves the open graph image (og:image) from the currently active browser tab | |
- Resizes the image to a width of 600 pixels, maintaining aspect ratio | |
- Saves the resized image in the Downloads folder with a derived name | |
- If no og:image tag is found, displays an error message and exits | |
*/ | |
//Author: Taylor Bell | |
//Name: OG Image Downloader |
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
/* | |
# OG Image Downloader | |
- Retrieves the open graph image (og:image) from the currently active browser tab | |
- Resizes the image to a width of 600 pixels, maintaining aspect ratio | |
- Saves the resized image in the Downloads folder with a derived name | |
- If no og:image tag is found, displays an error message and exits | |
*/ | |
//Author: Taylor Bell | |
//Name: OG Image Downloader |
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
// Author: Taylor Bell | |
// Name: Split video on silences | |
// Description: detects video silences over a threshold length and deletes the silences | |
import "@johnlindquist/kit" | |
const replaceAll = await npm('just-replace-all') | |
const numbers = await npm('numbers-in-string') | |
const seconds = await npm('seconds-to-timestamp') | |
const chunk = await npm('chunk') | |
const leadingzero = await npm('leadingzero') | |
const escape = await npm('escape-path-with-spaces') |
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: Roam Workshop Notes Template | |
let template = ` | |
clarification questions:: | |
content ideas:: | |
[[landing page copy]] | |
***General landing page** | |
***Workshop Specific** |
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" | |
// Author: Taylor Bell | |
// Name: | |
// Shortcut: | |
// Description: Select transcripts and image folders in the current Finder window | |
await applescript(` | |
set folderpath to false |