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
// Menu: Spongebob Mocking! | |
// Description: Copy, run and paste! | |
// Author: Ambushfall | |
// Shortcut: ctrl shift x | |
import '@johnlindquist/kit' | |
const str = await getSelectedText() || await clipboard.readText(); | |
const splitStr = str.split(' ') | |
var newString = '' |
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
// Preview: docs | |
// Menu: Open Project | |
// Description: Opens a project in vscode | |
// Shortcut: command shift . | |
import "@johnlindquist/kit"; | |
import * as fs from "fs" | |
const envPath = await env('PROJECT_DIR'); |
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
// Name: Obsidian Helper | |
// Author: Ambushfall | |
import '@johnlindquist/kit' | |
import { Choice } from '@johnlindquist/kit' | |
import { readFileSync } from 'fs' | |
import _ from 'lodash' | |
let { obsidiandir, write } = await db('obsidiandir') |
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
// Name: Obsidian Helper | |
// Author: Ambushfall | |
import '@johnlindquist/kit' | |
import { Choice } from '@johnlindquist/kit' | |
import { readFileSync } from 'fs' | |
import _ from 'lodash' | |
let { obsidiandir, write } = await db('obsidiandir') |
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
// Name: OCR | |
// Description: Capture a screenshot and recognize the text using tesseract.js | |
import "@johnlindquist/kit"; | |
//both win and linux implementations were created by chatgpt (gpt4), without _any_ tests!! 😅 | |
const captureScreenshot = async () => { | |
const tmpFile = kenvTmpPath(`screenshot-${Date.now()}.png`); | |
const scriptFile = kenvTmpPath('script.ps1'); |
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
// Name: OCR | |
// Description: Capture a screenshot and recognize the text using tesseract.js | |
import "@johnlindquist/kit"; | |
//both win and linux implementations were created by chatgpt (gpt4), without _any_ tests!! 😅 | |
const captureScreenshot = async () => { | |
const tmpFile = kenvTmpPath(`screenshot-${Date.now()}.png`); | |
const scriptFile = kenvTmpPath('script.ps1'); |
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
// Name: Run .bat/.ps1/.sh | |
// Description: Process Output to Kit via stream | |
import '@johnlindquist/kit' | |
// @ts-expect-error | |
import { backToMainShortcut, highlightJavaScript } from '@johnlindquist/kit' | |
// --- Create a shell script to run ----------------- | |
// `tmpPath` will store the file here: |
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
// Preview: docs | |
// Menu: Open Project | |
// Description: Opens a project in vscode | |
// Shortcut: cmd shift . | |
import "@johnlindquist/kit"; | |
const envPath = await env('PROJECT_DIR'); | |
const projectDir = home(envPath); |
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" | |
// Menu: Search Anime | |
// Description: Use the jikan.moe API to search anime | |
// Author: John Lindquist, Updated by Ambushfall | |
let anime = await arg("Anime:") | |
let response = await get( | |
`https://api.jikan.moe/v4/anime?q=${anime}` |
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
// Menu: Clipboard History | |
// Description: Copy something from the clipboard history | |
// Shortcut: command shift v | |
import "@johnlindquist/kit" | |
let { history } = await db("clipboard-history") | |
let { value, type } = await arg("What to paste?", () => { | |
return history.map(({ value, type, timestamp, secret }) => { |
NewerOlder