https://github.com/dirkluijk/text-to-playlist
Finds all Spotify tracks in a given text and adds them to a Spotify Playlist
https://github.com/dirkluijk/text-to-playlist
Last synced: 3 months ago
JSON representation
Finds all Spotify tracks in a given text and adds them to a Spotify Playlist
- Host: GitHub
- URL: https://github.com/dirkluijk/text-to-playlist
- Owner: dirkluijk
- License: mit
- Created: 2025-01-03T13:35:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-05T15:09:46.000Z (over 1 year ago)
- Last Synced: 2025-03-12T09:44:30.508Z (over 1 year ago)
- Language: TypeScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Text to playlist 🎸
[](https://jsr.io/@dirkluijk/text-to-playlist)
[](https://github.com/dirkluijk/text-to-playlist/actions/workflows/ci.yml)
Simple CLI script written in Deno to sync Spotify tracks from a raw text to a Spotify playlist.
## Usage
Install the script with [Deno]:
[Deno]: https://docs.deno.com/runtime/getting_started/installation/
```bash
deno install jsr:@dirkluijk/text-to-playlist --global --allow-net --allow-run
```
Now just run it:
```bash
text-to-playlist --playlist
```
To run the script without installing, run:
```bash
deno run jsr:@dirkluijk/text-to-playlist --playlist
```
### Required permissions
* `allow-net`: to make network requests to the Spotify Web API
* `allow-run`: to open the browser for authorization
* `allow-read`: to read the input file (optional)
### Options
```
-h, --help - Show this help.
-V, --version - Show the version number for this program.
-P, --playlist - 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)
```
## Programmatic usage
To use this library in Deno, install it from JSR:
```bash
deno add jsr:@dirkluijk/text-to-playlist
```
```typescript
import { textToPlaylist } from "@dirkluijk/text-to-playlist";
await textToPlaylist("some text or file", "link to playlist");
```
Check out the [API docs here](https://jsr.io/@dirkluijk/text-to-playlist/doc).
## Contributors
- [@dirkluijk](https://github.com/dirkluijk) - Deno fork
- [@janluijk](https://github.com/janluijk) - original Python implementation