Skip to content

Commit 8ceb03a

Browse files
committed
updated readme
1 parent a277165 commit 8ceb03a

2 files changed

Lines changed: 51 additions & 26 deletions

File tree

README.md

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# exportify-cli
2-
![](image.png?raw=true "exportify-cli") \
3-
Export Spotify playlists to CSV directly from the terminal, inspired by [pavelkomarov/exportify](https://github.com/pavelkomarov/exportify).
2+
![exportify-cli](image.png)
3+
4+
Export Spotify playlists to CSV or JSON directly from the terminal, inspired by [pavelkomarov/exportify](https://github.com/pavelkomarov/exportify).
45

56
This tool can export all saved playlists, including liked songs.
67

@@ -12,17 +13,17 @@ git clone https://github.com/donmerendolo/exportify-cli.git
1213
```
1314

1415
2. **Install the required packages:**
16+
(recommended to use a virtual environment)
1517
```bash
1618
cd exportify-cli
1719
pip install -r requirements.txt
1820
```
19-
(recommended to use a virtual environment)
20-
21+
2122
3. **Set up Client ID, Client Secret and Redirect URI:**
2223

2324
The first time you run exportify-cli, it will guide you through the setup:
2425
```
25-
File "config.cfg" not found. Let's create it.
26+
File "config.cfg" not found or invalid. Let's create it.
2627
2728
1. Go to Spotify Developer Dashboard (https://developer.spotify.com/dashboard).
2829
2. Create a new app.
@@ -33,39 +34,63 @@ Now after creating the app, press the Settings button on the upper right corner.
3334
Copy the Client ID, Client Secret and Redirect URI and paste them below.
3435
```
3536

36-
After running `python exportify-cli.py` (or [`exportify-cli.exe`](https://github.com/donmerendolo/exportify-cli/releases/latest/download/exportify-cli.exe) if you use the Windows binary) the first time, it should keep you authenticated so you don't have to log in each time. If you wish to log out, simply remove the `.cache` file.
37+
After running `python exportify-cli.py` (or [`exportify-cli.exe`](https://github.com/donmerendolo/exportify-cli/releases/latest/download/exportify-cli.exe) if you use the Windows binary) the first time, it should keep you authenticated so you don't have to log in each time.
3738

38-
---
39+
If you wish to log out, simply remove the `.cache` file (you may also have to remove access to `exportify-cli` in https://www.spotify.com/us/account/apps/).
3940

40-
Tested on Windows with Python 3.11.9.
41+
---
4142

4243
## Usage:
4344
```
44-
usage: exportify.py [-h] [-a] [-p PLAYLISTS [PLAYLISTS ...]] [-o OUTPUT] [-l]
45-
46-
Export Spotify playlists to CSV.
47-
48-
options:
49-
-h, --help show this help message and exit
50-
-a, --all Export all playlists
51-
-p PLAYLISTS [PLAYLISTS ...], --playlists PLAYLISTS [PLAYLISTS ...]
52-
Specify playlist names or IDs to export
53-
-o OUTPUT, --output OUTPUT
54-
Specify the output directory (default: ./playlists/)
55-
-l, --list List all playlists
45+
Usage: exportify-cli.py (-a | -p NAME|ID|URL|URI [-p ...] | -l) [OPTIONS]
46+
47+
Export Spotify playlists to CSV or JSON.
48+
49+
Options:
50+
-a, --all Export all playlists
51+
-p, --playlist NAME|ID|URL|URI
52+
Spotify playlist name, ID, URL, or URI;
53+
repeatable.
54+
-l, --list List available playlists.
55+
-c, --config PATH Path to configuration file. [default:
56+
config.cfg]
57+
-o, --output PATH Directory to save exported files. [default:
58+
./playlists]
59+
-f, --format [csv|json] Output file format. [default: csv]
60+
--uris Include album and artist URIs.
61+
--external-ids Include track ISRC and album UPC.
62+
--no-bar Hide progress bar.
63+
-h, --help Show this message and exit.
64+
-v, --version Show the version and exit.
5665
```
5766

67+
- Default values can be changed in `config.cfg`.
68+
69+
- Playlist names support partial matching, provided they uniquely identify a single playlist.
70+
71+
- You can also export a playlist that's not saved in your library by using its ID, URL, or URI.
72+
73+
- A single command can export multiple playlists by using the `-p` option multiple times.
74+
75+
- The default fields are: `Track URI`, `Track Name`, `Album Name`, `Artist Name(s)`, `Release Date`, `Duration_ms`, `Popularity`, `Added By`, `Added At`, `Record Label`. With flags, `Album URI(s)`, `Artist URI(s)`, `Track ISRC` and `Album UPC` can be included too. If you want any other field to be added, feel free to open an issue or PR.
76+
5877
### Examples:
5978
```
6079
# List all saved playlists
6180
python exportify-cli.py --list
6281
63-
# Export all saved playlists, including liked songs
64-
exportify-cli.exe --all
82+
# Export all saved playlists, including liked songs with Artist and Album URIs
83+
exportify-cli.exe --all --uris
84+
85+
# Export playlist whose name is "COCHE" to JSON
86+
python exportify-cli.py -p COCHE -f json
87+
88+
# Export playlist whose ID is "2VqAIceMCzBRhzq6zVmDZw" to current directory
89+
exportify-cli.exe -p 2VqAIceMCzBRhzq6zVmDZw --output .
6590
66-
# Export playlist whose name is "COCHE"
67-
python exportify-cli.py -p COCHE
91+
# Export playlist with its URL
92+
exportify-cli.exe -p https://open.spotify.com/playlist/2VqAIceMCzBRhzq6zVmDZw?si=16df8ae16c2d492b
6893
69-
# Export playlist whose ID is "2VqAIceMCzBRhzq6zVmDZw"
70-
exportify-cli.exe -p 2VqAIceMCzBRhzq6zVmDZw
94+
# Export playlists "Instrumental" and "COCHE" to CSV without progress bar
95+
python exportify-cli.py -p instr -p COCHE -f csv --no-bar
7196
```

image.png

2.16 KB
Loading

0 commit comments

Comments
 (0)