You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -6,10 +6,10 @@ With support for filters like ranges of date added, release date, genres, audio
6
6
7
7
## What does it solve?
8
8
9
-
Around 2500 Liked songs in, I needed a way to organise the chaos without having to move away from 'liking' any more songs.
10
-
Hopefully, it's useful to more people out there with little time and a lot of songs :)
9
+
Around 2500 Liked songs in, I needed a way to organise the chaos without having to move away from 'liking' any more songs.
10
+
Hopefully, it's useful to more people out there with little time and a lot of liked songs :)
11
11
12
-
With heartify, you may
12
+
### What you can do
13
13
14
14
✔️ Export them to a playlist - you can now share your liked songs!
15
15
@@ -23,28 +23,35 @@ With heartify, you may
23
23
24
24
✔️ Filter by audio features - make a workout playlist of songs in a certain bpm range, for example
25
25
26
+
### No library size limits
27
+
28
+
There's no (known) limit to the number of songs Heartify can fetch, so bring along your massive libary of 7000 liked songs (or more?)!
29
+
Just be prepared for it to take a bit longer with the measures in place to account for Spotify's rate limits.
30
+
26
31
27
32
## Getting Started
28
33
29
34
### Installation
30
35
31
-
Heartify is currently a work in progress, but you can install it here:
36
+
Heartify is currently a work in progress, but you can install it by running:
32
37
33
38
```sh
34
39
npm install -g heartify-cli
35
40
```
36
41
37
-
### Authorization
42
+
### Authorisation
38
43
39
-
Run the following command from any directory, all data is stored locally where heartify is installed.
44
+
Run the following command from any directory, all data is stored locally where Heartify is installed.
40
45
Then follow the instructions to authorise access to your Spotify library.
41
46
42
47
```sh
43
48
heartify init
44
49
45
50
```
46
51
47
-
This command needs to be run just once, and you're logged in until you revoke permissions from your account page, logout, or until Spotify automatically revokes permissions from time-to-time (in which case, run `heartify init` again). Heartify uses the OAuth 2.0 Authorization Code with PKCE flow, and refreshes the access token automatically until it's revoked.
52
+
This command needs to be run just once, and you're logged in until you revoke permissions from your account page,
53
+
logout, or until Spotify automatically revokes permissions from time-to-time (in which case, run `heartify init` again).
54
+
Heartify uses the OAuth 2.0 Authorization Code with PKCE flow, and refreshes the access token automatically until it's revoked.
48
55
49
56
### Basic Examples
50
57
@@ -62,20 +69,27 @@ This command needs to be run just once, and you're logged in until you revoke pe
62
69
63
70
```
64
71
65
-
2. Export your liked songs from a specific year (2023 in the example). You can use `--added-from` or `-f` and `--added-to` or `-t`, but there's also a convenience option `--year` or `-Y` available, used here:
72
+
1. Export your liked songs from a specific year (2023 in the example). You can use `--added-from` or `-f`
73
+
and `--added-to` or `-t`, but there's also a convenience option `--year` or `-Y` available, used here:
66
74
67
75
```sh
68
76
heartify export'Liked Songs 2023' -Y 2023
69
77
70
78
```
71
79
72
-
3. Filter by genre: There are several filters available, and one of them is `genre`. To see all the genres detected in your liked songs that you can filter by, run
80
+
1. Filter by genre: There are several filters available, and one of them is `genre`.
81
+
To see all the genres detected in your liked songs that you can filter by, run
73
82
74
83
```sh
75
84
heartify show-genres
76
85
77
86
```
78
87
88
+
> Note:
89
+
> As of now, you need to have run at least one `export` command before running `show-genres` as it needs to fetch the
90
+
> liked songs first while exporting to identify the genres. This will be fixed in a future update.
91
+
92
+
79
93
Then pick a genre and filter (replace '\<genre name\>'):
80
94
81
95
```sh
@@ -90,14 +104,16 @@ This command needs to be run just once, and you're logged in until you revoke pe
90
104
91
105
```
92
106
93
-
If genre names contain spaces or special characters, either wrap it in quotes, or wrap the entire field-value pair in quotes. For example, this command would make (a rather interesting) playlist out of songs which fall into at least one of the following genres: 'disco', 'conscious hip hop', 'k-indie', and 'escape room'
107
+
If genre names contain spaces or special characters, either wrap it in quotes, or wrap the entire field-value pair in quotes.
108
+
For example, this command would make (a rather interesting) playlist out of songs which fall into at least one of
109
+
the following genres: 'disco', 'conscious hip hop', 'k-indie', and 'escape room'
4. Filter by custom range of date added using the `--added-from` or `-f` option, the `--added-to` or `-t` option, or both
116
+
1. Filter by custom range of date added using the `--added-from` or `-f` option, the `--added-to` or `-t` option, or both
101
117
102
118
```sh
103
119
heartify export'Liked Songs, November 2023' -f 2023-11-01 -t 2023-11-30
@@ -119,27 +135,142 @@ This command needs to be run just once, and you're logged in until you revoke pe
119
135
120
136
-`YYYYMMDD`: 20230101, 20230730
121
137
-`YYYY-MM-DD`: 2023-01-01, 2023-07-30
122
-
-`YYYY`: 2023, 2022 (NOTE: this is converted to midnight at the start of the year if it's a 'from' value, and the timestamp at the last second before midnight of January 1st if it's a 'to' value)
138
+
-`YYYY`: 2023, 2022 (NOTE: this is converted to midnight at the start of the year if it's a 'from' value, and the timestamp
139
+
at the last second before midnight of January 1st if it's a 'to' value)
123
140
124
-
5. Filter by other features of the tracks, like date released, key, or tempo (Full list at TODO)
141
+
1. Filter by other features of the tracks, like date released, key, or tempo (see the list of supported features [here](#string-fields))
6. Filter by ranges: DateTime filters and Number filters (TODO: link) support ranges. Ranges are written as `field=[from, to]`. Either the 'from' or the 'to' value can be omitted for a range unbounded on one side
148
+
1. Filter by ranges: DateTime filters and Number filters (TODO: link) support ranges. Ranges are written as `field=[from, to]`.
149
+
Either the 'from' or the 'to' value can be omitted for a range unbounded on one side
|`danceability`| How suitable a track is for dancing based on <br>a combination of musical elements including tempo, <br>rhythm stability, beat strength,and overall regularity | 0.0 to 1.0<br>(float) |
254
+
|`energy`| Represents a perceptual measure of intensity <br>and activity | 0.0 to 1.0<br>(float) |
255
+
|`key`| The key the track is in. <br>Integers map to pitches using standard Pitch Class <br>notation. E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on. <br>If no key was detected, the value is -1. | -1 to 11<br>(integer) |
256
+
|`loudness`| The overall loudness of a track in decibels (dB).<br>Loudness values are averaged across the entire track and <br>are useful for comparing relative loudness of tracks | -60 to 0<br>(float) |
257
+
|`mode`| Mode indicates the modality (major or minor) of a track.<br>Major is represented by 1 and minor is 0. | 1 or 0<br>(integer) |
258
+
|`speechiness`| Detects the presence of spoken words in a track | 0.0 to 1.0<br>(float) |
259
+
|`acousticness`| A confidence measure from 0.0 to 1.0 of whether the<br>track is acoustic | 0.0 to 1.0<br>(float) |
260
+
|`instrumentalness`| Predicts whether a track contains no vocals | 0.0 to 1.0<br>(float) |
261
+
|`liveness`| Detects the presence of an audience in the recording.<br>A value above 0.8 provides strong likelihood that the track<br>is live. | 0.0 to 1.0<br>(float) |
262
+
|`valence`| Tracks with high valence sound more positive<br>(e.g. happy, cheerful, euphoric), while tracks with <br>low valence sound more negative (e.g. sad, depressed, angry) | 0.0 to 1.0<br>(float) |
263
+
|`tempo`| The overall estimated tempo of a track in beats per minute (BPM) | -<br>(float) |
264
+
|`duration_ms`| The duration of the track in milliseconds | -<br>(integer) |
265
+
|`time_signature`| An estimated time signature. The time signature (meter) <br>is a notational convention to specify how many beats<br>are in each bar (or measure). The time signature ranges <br>from 3 to 7 indicating time signatures of "3/4", to "7/4". | 3 to 7<br>(integer) |
266
+
267
+
</br>
268
+
269
+
---
270
+
271
+
## Feedback, suggestions, and bug reports welcome! 👐
272
+
273
+
This is a small project I've been making on the side as I'm learning JS.
274
+
Feel free to open an issue for a new feature you'd like to have, suggestions, bug reports, or anything else.
0 commit comments