First, install the run-applescript package using npm: npm i run-applescript To do this, we’ll use some old-school AppleScript. The first step of our script is to get the current track from Apple Music. Start the Raycast development server using npm run dev, run the “Get Spotify Link” command, and see that it works as expected. In src/index.ts, you’ll notice a sample script that copies the current date to the clipboard. Next, open the created repository and run npm i to install the required dependencies. In the “Command Name” field, type “Get Spotify Link”. Give the extension a name, description, and location of your choice. ![]() We’ll use the “Script” template, which bootstraps a simple extension to run a script when we open it. ![]() Getting startedįirst, open Raycast and run the “Create Extension” command. We can use the Raycast API to create our own extension that takes the current track in Apple Music and generates a sharable Spotify link. Raycast is a multifunctional app launcher for macOS with a multitude of user-created extensions. After unsuccessful attempts to convert my friends to Apple Music users, I decided it was time to automate the process. And, as an Apple Music listener, I often find myself manually searching Spotify’s library to get a sharable link compatible with others’ preferred music apps.
0 Comments
Leave a Reply. |