We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raycast-extensions/packages/talking-translator/src/TalkingTranslator/hook/service.ts
Line 7 in 00866a2
import childProcess from "child_process"; import * as deepl from "deepl-node"; import { env } from "~/env"; /* c8 ignore start */ // TODO 別パッケージ化 export const say = (p: { text: string }) => childProcess.exec(`say -v Samantha "${p.text}"`); // TODO 別パッケージ化 const translator = new deepl.Translator(env.DEEPL_API_KEY); export const translateText = ( ...p: Parameters<typeof translator.translateText<string>> ) => translator.translateText(...p); // TODO 別パッケージ化 const regExp = new RegExp(/^[a-zA-Z0-9!-/:-@¥[-`{-~ ]*$/); const maybeEnglish = (p: { text: string }) => regExp.test(p.text); // TODO 別パッケージ化 export const cmdA = () => childProcess.exec( `osascript -e 'tell application "System Events" to keystroke "a" using {command down}'`, ); /* c8 ignore stop */ export const getTranslateTextParam = (p: { text: string }) => { const [sourceLang, targetLang] = maybeEnglish({ text: p.text, }) ? (["en", "ja"] as const) : (["ja", "en-US"] as const); return { sourceLang, targetLang, }; };
The text was updated successfully, but these errors were encountered:
akira-toriyama
No branches or pull requests
raycast-extensions/packages/talking-translator/src/TalkingTranslator/hook/service.ts
Line 7 in 00866a2
The text was updated successfully, but these errors were encountered: