Simple CLI script written in Deno to sync Spotify tracks from a raw text to a Spotify playlist.
Install the script with Deno:
deno install jsr:@dirkluijk/text-to-playlist --global --allow-net --allow-run
Now just run it:
text-to-playlist <inputFileOrText> --playlist <playlistUrl>
To run the script without installing, run:
deno run jsr:@dirkluijk/text-to-playlist <inputFileOrText> --playlist <playlistUrl>
allow-net
: to make network requests to the Spotify Web APIallow-run
: to open the browser for authorizationallow-read
: to read the input file (optional)
-h, --help - Show this help.
-V, --version - Show the version number for this program.
-P, --playlist <playlistUrl> - The Spotify Playlist URL to add to tracks to (required)
-D, --debug - Outputs debugging logs
--remove-duplicates [flag] - Whether to filter out duplicates from input (Default: true)
--remove-other-tracks [flag] - Whether to remove tracks from playlist that do not exit in input (Default: false)
To use this library in Deno, install it from JSR:
deno add jsr:@dirkluijk/text-to-playlist
import { textToPlaylist } from "@dirkluijk/text-to-playlist";
await textToPlaylist("some text or file", "link to playlist");
Check out the API docs here.
- @dirkluijk - Deno fork
- @janluijk - original Python implementation