Skip to content

Commit efd6d33

Browse files
committed
update project to use external library clj-spotify-playlist-copier
1 parent 30ea2a0 commit efd6d33

File tree

4 files changed

+7
-50
lines changed

4 files changed

+7
-50
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ Archieve Spotify's Discover Weekly playlist in a new playlist.
77
This project is build in [Clojure](http://clojure.org) without any experience, just for fun.
88

99
It uses a few libraries:
10-
* [clj-spotify](https://github.com/blmstrm/clj-spotify)
10+
* [clj-spotify-playlist-copier](https://github.com/vjo/clj-spotify-playlist-copier)
1111
* [tools.cli](https://github.com/clojure/tools.cli)
12+
* [clj-time](https://github.com/clj-time/clj-time)
1213

1314
### Limitation
1415

@@ -28,7 +29,7 @@ $ lein uberjar
2829
## Usage
2930

3031
```shell
31-
$ java -jar target/uberjar/discover-weekly-archivist-0.1.0-SNAPSHOT-standalone.jar -p
32+
$ java -jar target/uberjar/discover-weekly-archivist-0.1.0-SNAPSHOT-standalone.jar -l "your-login" -t "your-token" -p
3233
```
3334

3435
## Options

project.clj

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
:url "http://www.eclipse.org/legal/epl-v10.html"}
66
:dependencies [[org.clojure/clojure "1.7.0"]
77
[org.clojure/tools.cli "0.3.3"]
8-
[cheshire "5.5.0"]
9-
[clj-spotify "0.1.2"]
8+
[clj-spotify-playlist-copier "0.1.0"]
109
[clj-time "0.11.0"]]
1110
:main ^:skip-aot discover-weekly-archivist.core
1211
:target-path "target/%s"

src/discover_weekly_archivist/core.clj

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[clojure.string :as string]
44
[clj-time.core :as t]
55
[clj-time.format :as f]
6-
[discover-weekly-archivist.spotify-playlist-clone :as sptfy-clone])
6+
[clj-spotify-playlist-copier.core :as sptfy-playlist-copier])
77
(:gen-class :main true))
88

99
(def cli-options
@@ -44,8 +44,8 @@
4444
(str (#(f/unparse (f/formatters :year-month-day) %) (get-monday-from-week (t/now))) " Discover Weekly"))
4545

4646
(defn do-transfer [user-id, token, name, public?]
47-
(let [playlist-name (if (not (nil? name)) name (create-playlist-name))
48-
hello (sptfy-clone/do-clone user-id token "Discover Weekly" playlist-name public?)]
47+
(let [playlist-name (if (not (nil? name)) name (create-playlist-name))]
48+
(sptfy-playlist-copier/do-copy :user-id user-id :token token :playlist-name-to-copy "Discover Weekly" :playlist-name-new playlist-name :public? public?)
4949
(println "Done")))
5050

5151
(defn -main [& args]

src/discover_weekly_archivist/spotify_playlist_clone.clj

-43
This file was deleted.

0 commit comments

Comments
 (0)