drum 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.editorconfig +10 -0
- data/.github/workflows/deploy.yml +33 -0
- data/.github/workflows/documentation.yml +29 -0
- data/.github/workflows/test.yml +19 -0
- data/.gitignore +13 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +134 -0
- data/LICENSE +21 -0
- data/README.md +114 -0
- data/Rakefile +13 -0
- data/artwork/icon.svg +186 -0
- data/artwork/icon128.png +0 -0
- data/bin/console +14 -0
- data/bin/drum +5 -0
- data/bin/drum.bat +2 -0
- data/bin/setup +8 -0
- data/drum.gemspec +36 -0
- data/lib/drum/model/album.rb +114 -0
- data/lib/drum/model/artist.rb +72 -0
- data/lib/drum/model/playlist.rb +222 -0
- data/lib/drum/model/raw_ref.rb +29 -0
- data/lib/drum/model/ref.rb +19 -0
- data/lib/drum/model/track.rb +157 -0
- data/lib/drum/model/user.rb +72 -0
- data/lib/drum/service/applemusic.rb +619 -0
- data/lib/drum/service/file.rb +89 -0
- data/lib/drum/service/mock.rb +50 -0
- data/lib/drum/service/service.rb +43 -0
- data/lib/drum/service/spotify.rb +615 -0
- data/lib/drum/service/stdio.rb +51 -0
- data/lib/drum/utils/ext.rb +88 -0
- data/lib/drum/utils/log.rb +93 -0
- data/lib/drum/utils/persist.rb +50 -0
- data/lib/drum/version.rb +3 -0
- data/lib/drum.rb +250 -0
- data/userdoc/playlist-format.md +96 -0
- metadata +207 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ccee94d125b95501fcfc0411415495ebd89e1fb628e354300cfe61a2c849d174
|
4
|
+
data.tar.gz: 223c183c3fcff3aac3e892da9ffb1b29c79036054d236470a3f98ea575994138
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 20f2bb96ed9ffc1e72a9b336c7f0a211565325e12bd93d13f5b61efafbabe0beee8dd552a524190ba6f9609031eb27dceea2a47de712a6d9eada9e24bc9ca7a4
|
7
|
+
data.tar.gz: a10fb471ba36bde100efbd9d6001344223efce95d1da5cf0a21e2646f54562dce7e1f97cf1634259ccef2ba8de9b62140e1a0efc279ea89b1ffab4be941fa3e9
|
data/.editorconfig
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Deploy
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
deploy:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.7.0
|
17
|
+
- name: Install dependencies
|
18
|
+
run: |
|
19
|
+
gem install bundler -v 2.2.29
|
20
|
+
bundle install
|
21
|
+
- name: Build gem
|
22
|
+
run: bundle exec rake build
|
23
|
+
- name: Configure gem credentials
|
24
|
+
run: |
|
25
|
+
mkdir -p ~/.gem
|
26
|
+
touch ~/.gem/credentials
|
27
|
+
chmod 600 ~/.gem/credentials
|
28
|
+
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
|
29
|
+
echo ":rubygems: Bearer ${{ secrets.RUBYGEMS_TOKEN }}" >> ~/.gem/credentials
|
30
|
+
- name: Push gem to GitHub Packages
|
31
|
+
run: bundle exec gem push --key github --host "https://rubygems.pkg.github.com/fwcd" pkg/drum-*.gem
|
32
|
+
- name: Push gem to RubyGems.org
|
33
|
+
run: bundle exec gem push --key rubygems --host "https://rubygems.org" pkg/drum-*.gem
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Documentation
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
documentation:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.7.0
|
17
|
+
- name: Install dependencies
|
18
|
+
run: |
|
19
|
+
gem install bundler -v 2.2.0
|
20
|
+
bundle install
|
21
|
+
- name: Generate documentation
|
22
|
+
run: bundle exec rake yard
|
23
|
+
- name: Deploy documentation
|
24
|
+
uses: peaceiris/actions-gh-pages@v3
|
25
|
+
with:
|
26
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
27
|
+
publish_dir: ./doc
|
28
|
+
user_name: 'github-actions[bot]'
|
29
|
+
user_email: 'github-actions[bot]@users.noreply.github.com'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.7.0
|
14
|
+
- name: Install dependencies
|
15
|
+
run: |
|
16
|
+
gem install bundler -v 2.2.0
|
17
|
+
bundle install
|
18
|
+
- name: Run tests
|
19
|
+
run: bundle exec rake spec
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in drum.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development, :test do
|
7
|
+
gem 'rake', '~> 13.0'
|
8
|
+
gem 'yard', '~> 0.9'
|
9
|
+
gem 'rspec', '~> 3.10'
|
10
|
+
gem 'ruby-debug-ide', '~> 0.7'
|
11
|
+
gem 'debase', '~> 0.2' # seems to be required by ruby-debug-ide
|
12
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
drum (0.1.12)
|
5
|
+
highline (~> 2.0)
|
6
|
+
jwt (~> 2.2)
|
7
|
+
launchy (~> 2.4)
|
8
|
+
progress_bar (~> 1.3)
|
9
|
+
rest-client (~> 2.0)
|
10
|
+
rspotify (~> 2.10)
|
11
|
+
ruby-limiter (~> 2.1)
|
12
|
+
thor (~> 0.20)
|
13
|
+
webrick (~> 1.7)
|
14
|
+
|
15
|
+
GEM
|
16
|
+
remote: https://rubygems.org/
|
17
|
+
specs:
|
18
|
+
addressable (2.5.2)
|
19
|
+
public_suffix (>= 2.0.2, < 4.0)
|
20
|
+
debase (0.2.4.1)
|
21
|
+
debase-ruby_core_source (>= 0.10.2)
|
22
|
+
debase-ruby_core_source (0.10.12)
|
23
|
+
diff-lcs (1.4.4)
|
24
|
+
domain_name (0.5.20190701)
|
25
|
+
unf (>= 0.0.5, < 1.0.0)
|
26
|
+
faraday (1.8.0)
|
27
|
+
faraday-em_http (~> 1.0)
|
28
|
+
faraday-em_synchrony (~> 1.0)
|
29
|
+
faraday-excon (~> 1.1)
|
30
|
+
faraday-httpclient (~> 1.0.1)
|
31
|
+
faraday-net_http (~> 1.0)
|
32
|
+
faraday-net_http_persistent (~> 1.1)
|
33
|
+
faraday-patron (~> 1.0)
|
34
|
+
faraday-rack (~> 1.0)
|
35
|
+
multipart-post (>= 1.2, < 3)
|
36
|
+
ruby2_keywords (>= 0.0.4)
|
37
|
+
faraday-em_http (1.0.0)
|
38
|
+
faraday-em_synchrony (1.0.0)
|
39
|
+
faraday-excon (1.1.0)
|
40
|
+
faraday-httpclient (1.0.1)
|
41
|
+
faraday-net_http (1.0.1)
|
42
|
+
faraday-net_http_persistent (1.2.0)
|
43
|
+
faraday-patron (1.0.0)
|
44
|
+
faraday-rack (1.0.0)
|
45
|
+
ffi (1.15.4-x64-mingw32)
|
46
|
+
hashie (4.1.0)
|
47
|
+
highline (2.0.3)
|
48
|
+
http-cookie (1.0.4)
|
49
|
+
domain_name (~> 0.5)
|
50
|
+
jwt (2.3.0)
|
51
|
+
launchy (2.4.3)
|
52
|
+
addressable (~> 2.3)
|
53
|
+
mime-types (3.3.1)
|
54
|
+
mime-types-data (~> 3.2015)
|
55
|
+
mime-types-data (3.2021.0901)
|
56
|
+
multi_json (1.15.0)
|
57
|
+
multi_xml (0.6.0)
|
58
|
+
multipart-post (2.1.1)
|
59
|
+
netrc (0.11.0)
|
60
|
+
oauth2 (1.4.7)
|
61
|
+
faraday (>= 0.8, < 2.0)
|
62
|
+
jwt (>= 1.0, < 3.0)
|
63
|
+
multi_json (~> 1.3)
|
64
|
+
multi_xml (~> 0.5)
|
65
|
+
rack (>= 1.2, < 3)
|
66
|
+
omniauth (2.0.4)
|
67
|
+
hashie (>= 3.4.6)
|
68
|
+
rack (>= 1.6.2, < 3)
|
69
|
+
rack-protection
|
70
|
+
omniauth-oauth2 (1.7.1)
|
71
|
+
oauth2 (~> 1.4)
|
72
|
+
omniauth (>= 1.9, < 3)
|
73
|
+
options (2.3.2)
|
74
|
+
progress_bar (1.3.3)
|
75
|
+
highline (>= 1.6, < 3)
|
76
|
+
options (~> 2.3.0)
|
77
|
+
public_suffix (3.1.1)
|
78
|
+
rack (2.2.3)
|
79
|
+
rack-protection (2.1.0)
|
80
|
+
rack
|
81
|
+
rake (13.0.6)
|
82
|
+
rest-client (2.0.2)
|
83
|
+
http-cookie (>= 1.0.2, < 2.0)
|
84
|
+
mime-types (>= 1.16, < 4.0)
|
85
|
+
netrc (~> 0.8)
|
86
|
+
rest-client (2.0.2-x64-mingw32)
|
87
|
+
ffi (~> 1.9)
|
88
|
+
http-cookie (>= 1.0.2, < 2.0)
|
89
|
+
mime-types (>= 1.16, < 4.0)
|
90
|
+
netrc (~> 0.8)
|
91
|
+
rspec (3.10.0)
|
92
|
+
rspec-core (~> 3.10.0)
|
93
|
+
rspec-expectations (~> 3.10.0)
|
94
|
+
rspec-mocks (~> 3.10.0)
|
95
|
+
rspec-core (3.10.1)
|
96
|
+
rspec-support (~> 3.10.0)
|
97
|
+
rspec-expectations (3.10.1)
|
98
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
99
|
+
rspec-support (~> 3.10.0)
|
100
|
+
rspec-mocks (3.10.2)
|
101
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
102
|
+
rspec-support (~> 3.10.0)
|
103
|
+
rspec-support (3.10.2)
|
104
|
+
rspotify (2.10.3)
|
105
|
+
addressable (~> 2.5.2)
|
106
|
+
omniauth-oauth2 (>= 1.6)
|
107
|
+
rest-client (~> 2.0.2)
|
108
|
+
ruby-debug-ide (0.7.3)
|
109
|
+
rake (>= 0.8.1)
|
110
|
+
ruby-limiter (2.1.0)
|
111
|
+
ruby2_keywords (0.0.5)
|
112
|
+
thor (0.20.3)
|
113
|
+
unf (0.1.4)
|
114
|
+
unf_ext
|
115
|
+
unf_ext (0.0.8)
|
116
|
+
unf_ext (0.0.8-x64-mingw32)
|
117
|
+
webrick (1.7.0)
|
118
|
+
yard (0.9.26)
|
119
|
+
|
120
|
+
PLATFORMS
|
121
|
+
ruby
|
122
|
+
x64-mingw32
|
123
|
+
x86_64-linux
|
124
|
+
|
125
|
+
DEPENDENCIES
|
126
|
+
debase (~> 0.2)
|
127
|
+
drum!
|
128
|
+
rake (~> 13.0)
|
129
|
+
rspec (~> 3.10)
|
130
|
+
ruby-debug-ide (~> 0.7)
|
131
|
+
yard (~> 0.9)
|
132
|
+
|
133
|
+
BUNDLED WITH
|
134
|
+
2.2.29
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 fwcd
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# Drum
|
2
|
+
|
3
|
+
A small tool for copying your playlists across music streaming services. Think `rsync`, but for playlists.
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
The basic usage pattern is always `drum cp [source] [destination]` where `source` and `destination` may be any of the following (internally called _a ref_):
|
10
|
+
|
11
|
+
* A file or folder, e.g.
|
12
|
+
* `.`
|
13
|
+
* `some/folder`
|
14
|
+
* `some-file.yaml`
|
15
|
+
* A URI, e.g.
|
16
|
+
* `https://open.spotify.com/playlist/123456`
|
17
|
+
* `spotify:playlist:123456`
|
18
|
+
* `https://music.apple.com/us/playlist/some-name/pl.123456789`
|
19
|
+
* `file:///path/to/list.yaml`
|
20
|
+
* A special token, e.g.
|
21
|
+
* `@spotify/playlists`
|
22
|
+
* `@spotify/tracks`
|
23
|
+
* `@applemusic/playlists`
|
24
|
+
* `@stdin`
|
25
|
+
* `@stdout`
|
26
|
+
* A dash `-`, synonymous with `@stdin` and `@stdout`, depending on usage
|
27
|
+
|
28
|
+
> Note that if the source is folder-like, i.e. includes multiple playlists, the destination has to be folder-like too. (The reverse is not true though.)
|
29
|
+
|
30
|
+
### Examples
|
31
|
+
|
32
|
+
**Download a playlist from Spotify.**
|
33
|
+
|
34
|
+
* `drum cp https://open.spotify.com/playlist/123456 my-fancy-list.yaml`
|
35
|
+
* `drum cp spotify:playlist:123456 my-fancy-list.yaml`
|
36
|
+
* `drum cp spotify:playlist:123456 some/folder`
|
37
|
+
|
38
|
+
**Download your liked songs playlist from Spotify.**
|
39
|
+
|
40
|
+
* `drum cp @spotify/tracks liked.yaml`
|
41
|
+
|
42
|
+
**Download all playlists from your Spotify library.**
|
43
|
+
|
44
|
+
* `drum cp @spotify/playlists .`
|
45
|
+
|
46
|
+
**Upload a playlist to Spotify.**
|
47
|
+
|
48
|
+
* `drum cp my-fancy-list.yaml @spotify/playlists`
|
49
|
+
|
50
|
+
## Supported Services
|
51
|
+
|
52
|
+
Currently, the following music services are supported:
|
53
|
+
|
54
|
+
* Spotify
|
55
|
+
* Apple Music
|
56
|
+
* Local, YAML-based playlists (via stdio or files)
|
57
|
+
|
58
|
+
> Note that the tool only processes metadata, not the actual audio files.
|
59
|
+
|
60
|
+
## Development
|
61
|
+
|
62
|
+
After checking out the repo, run `bin/setup` (or `bundle install`) to install dependencies.
|
63
|
+
|
64
|
+
To run the application, run `bundle exec bin/drum`. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
65
|
+
|
66
|
+
> Note that you may need to run `bundle exec ruby bin/drum` on Windows
|
67
|
+
|
68
|
+
To package the application into a gem, run `bundle exec rake build`. The built gem should then be located in `pkg`.
|
69
|
+
|
70
|
+
To install the gem, run `bundle exec rake install`.
|
71
|
+
|
72
|
+
To generate the documentation, run `bundle exec rake yard`.
|
73
|
+
|
74
|
+
To run tests, run `bundle exec rake spec`.
|
75
|
+
|
76
|
+
### Spotify
|
77
|
+
|
78
|
+
To use the service integration with Spotify, set the following environment variables:
|
79
|
+
|
80
|
+
```
|
81
|
+
SPOTIFY_CLIENT_ID=...
|
82
|
+
SPOTIFY_CLIENT_SECRET=...
|
83
|
+
```
|
84
|
+
|
85
|
+
The client ID and secret can be obtained by creating a Spotify application in the [developer dashboard](https://developer.spotify.com/dashboard/applications). After adding the application, make sure to whitelist the following redirect URI (required for user authentication):
|
86
|
+
|
87
|
+
```
|
88
|
+
http://localhost:17998/callback
|
89
|
+
```
|
90
|
+
|
91
|
+
### Apple Music
|
92
|
+
|
93
|
+
To use the service integration with Apple Music, set the following environment variables:
|
94
|
+
|
95
|
+
```
|
96
|
+
MUSICKIT_KEY_P8_FILE_PATH=...
|
97
|
+
MUSICKIT_KEY_ID=...
|
98
|
+
MUSICKIT_TEAM_ID=...
|
99
|
+
```
|
100
|
+
|
101
|
+
This keys can be obtained as described [here](https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens) (requires an Apple Developer Program membership).
|
102
|
+
|
103
|
+
## Limitations
|
104
|
+
|
105
|
+
* The Spotify API [does not support folders](https://developer.spotify.com/documentation/general/guides/working-with-playlists/#folders)
|
106
|
+
* The Apple Music API does support folders, these are not implemented yet, however (see [this issue](https://github.com/fwcd/drum/issues/17))
|
107
|
+
|
108
|
+
## Contributing
|
109
|
+
|
110
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/fwcd/drum.
|
111
|
+
|
112
|
+
## License
|
113
|
+
|
114
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/artwork/icon.svg
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
+
width="66.570992mm"
|
14
|
+
height="61.224346mm"
|
15
|
+
viewBox="0 0 66.570992 61.224346"
|
16
|
+
version="1.1"
|
17
|
+
id="svg8"
|
18
|
+
sodipodi:docname="icon.svg"
|
19
|
+
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
20
|
+
<defs
|
21
|
+
id="defs2">
|
22
|
+
<inkscape:path-effect
|
23
|
+
effect="mirror_symmetry"
|
24
|
+
start_point="2.7285938,150.66243"
|
25
|
+
end_point="17.147802,159.67803"
|
26
|
+
center_point="9.9381979,155.17023"
|
27
|
+
id="path-effect4680"
|
28
|
+
is_visible="true"
|
29
|
+
mode="free"
|
30
|
+
discard_orig_path="false"
|
31
|
+
fuse_paths="false"
|
32
|
+
oposite_fuse="false" />
|
33
|
+
<inkscape:path-effect
|
34
|
+
effect="mirror_symmetry"
|
35
|
+
start_point="26.022015,129.95196"
|
36
|
+
end_point="20.341157,138.7938"
|
37
|
+
center_point="23.181586,134.37288"
|
38
|
+
id="path-effect4674"
|
39
|
+
is_visible="true"
|
40
|
+
mode="free"
|
41
|
+
discard_orig_path="false"
|
42
|
+
fuse_paths="false"
|
43
|
+
oposite_fuse="false" />
|
44
|
+
<linearGradient
|
45
|
+
inkscape:collect="always"
|
46
|
+
id="linearGradient4625">
|
47
|
+
<stop
|
48
|
+
style="stop-color:#ebe0c0;stop-opacity:1"
|
49
|
+
offset="0"
|
50
|
+
id="stop4621" />
|
51
|
+
<stop
|
52
|
+
style="stop-color:#ffcb86;stop-opacity:1"
|
53
|
+
offset="1"
|
54
|
+
id="stop4623" />
|
55
|
+
</linearGradient>
|
56
|
+
<inkscape:path-effect
|
57
|
+
effect="bend_path"
|
58
|
+
id="path-effect4607"
|
59
|
+
is_visible="true"
|
60
|
+
bendpath="m 28.063301,221.09545 c 4.543581,-7.48354 -3.207235,-43.03039 113.856819,-43.56493"
|
61
|
+
prop_scale="1"
|
62
|
+
scale_y_rel="false"
|
63
|
+
vertical="false" />
|
64
|
+
<inkscape:path-effect
|
65
|
+
effect="bend_path"
|
66
|
+
id="path-effect4588"
|
67
|
+
is_visible="true"
|
68
|
+
bendpath="m 18.976137,193.29942 c 151.007283,14.16529 106.907813,-57.19568 106.907813,-57.19568 0,0 -77.240897,-41.961312 -106.907813,57.19568 z"
|
69
|
+
prop_scale="1"
|
70
|
+
scale_y_rel="false"
|
71
|
+
vertical="false" />
|
72
|
+
<inkscape:path-effect
|
73
|
+
effect="bend_path"
|
74
|
+
id="path-effect4578"
|
75
|
+
is_visible="true"
|
76
|
+
bendpath="m 26.192414,147.8636 c 121.607636,-17.63978 139.781966,5.87993 139.781966,5.87993 z"
|
77
|
+
prop_scale="1"
|
78
|
+
scale_y_rel="false"
|
79
|
+
vertical="false" />
|
80
|
+
<inkscape:path-effect
|
81
|
+
effect="knot"
|
82
|
+
id="path-effect4544"
|
83
|
+
is_visible="true"
|
84
|
+
interruption_width="3"
|
85
|
+
prop_to_stroke_width="true"
|
86
|
+
add_stroke_width="true"
|
87
|
+
add_other_stroke_width="true"
|
88
|
+
switcher_size="15"
|
89
|
+
crossing_points_vector="" />
|
90
|
+
<inkscape:path-effect
|
91
|
+
effect="mirror_symmetry"
|
92
|
+
start_point="73.328334,120.76304"
|
93
|
+
end_point="36.475656,120.76304"
|
94
|
+
center_point="54.901995,120.76304"
|
95
|
+
id="path-effect821"
|
96
|
+
is_visible="true"
|
97
|
+
mode="free"
|
98
|
+
discard_orig_path="false"
|
99
|
+
fuse_paths="false"
|
100
|
+
oposite_fuse="false" />
|
101
|
+
<inkscape:path-effect
|
102
|
+
effect="mirror_symmetry"
|
103
|
+
start_point="55.184523,110.09077"
|
104
|
+
end_point="55.184523,125.20982"
|
105
|
+
center_point="55.184523,117.65029"
|
106
|
+
id="path-effect819"
|
107
|
+
is_visible="true"
|
108
|
+
mode="free"
|
109
|
+
discard_orig_path="false"
|
110
|
+
fuse_paths="false"
|
111
|
+
oposite_fuse="false" />
|
112
|
+
<linearGradient
|
113
|
+
inkscape:collect="always"
|
114
|
+
xlink:href="#linearGradient4625"
|
115
|
+
id="linearGradient4627"
|
116
|
+
x1="66.298882"
|
117
|
+
y1="125.14569"
|
118
|
+
x2="112.67443"
|
119
|
+
y2="125.24019"
|
120
|
+
gradientUnits="userSpaceOnUse"
|
121
|
+
gradientTransform="matrix(0.95084893,0,0,0.95084893,5.1178385,6.9070034)" />
|
122
|
+
</defs>
|
123
|
+
<sodipodi:namedview
|
124
|
+
id="base"
|
125
|
+
pagecolor="#ffffff"
|
126
|
+
bordercolor="#666666"
|
127
|
+
borderopacity="1.0"
|
128
|
+
inkscape:pageopacity="0.0"
|
129
|
+
inkscape:pageshadow="2"
|
130
|
+
inkscape:zoom="0.98994949"
|
131
|
+
inkscape:cx="23.004858"
|
132
|
+
inkscape:cy="79.370625"
|
133
|
+
inkscape:document-units="mm"
|
134
|
+
inkscape:current-layer="layer1"
|
135
|
+
showgrid="false"
|
136
|
+
showguides="true"
|
137
|
+
inkscape:guide-bbox="true"
|
138
|
+
inkscape:window-width="1302"
|
139
|
+
inkscape:window-height="717"
|
140
|
+
inkscape:window-x="533"
|
141
|
+
inkscape:window-y="182"
|
142
|
+
inkscape:window-maximized="0" />
|
143
|
+
<metadata
|
144
|
+
id="metadata5">
|
145
|
+
<rdf:RDF>
|
146
|
+
<cc:Work
|
147
|
+
rdf:about="">
|
148
|
+
<dc:format>image/svg+xml</dc:format>
|
149
|
+
<dc:type
|
150
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
151
|
+
</cc:Work>
|
152
|
+
</rdf:RDF>
|
153
|
+
</metadata>
|
154
|
+
<g
|
155
|
+
inkscape:label="Layer 1"
|
156
|
+
inkscape:groupmode="layer"
|
157
|
+
id="layer1"
|
158
|
+
transform="translate(-57.729271,-95.289477)">
|
159
|
+
<path
|
160
|
+
sodipodi:type="star"
|
161
|
+
style="opacity:1;fill:#813118;fill-opacity:1;stroke:#000000;stroke-width:1.89999998;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
162
|
+
id="path4655"
|
163
|
+
sodipodi:sides="6"
|
164
|
+
sodipodi:cx="91.014771"
|
165
|
+
sodipodi:cy="125.90165"
|
166
|
+
sodipodi:r1="29.63785"
|
167
|
+
sodipodi:r2="25.66713"
|
168
|
+
sodipodi:arg1="1.4732805"
|
169
|
+
sodipodi:arg2="1.9968793"
|
170
|
+
inkscape:flatsided="true"
|
171
|
+
inkscape:rounded="0.6"
|
172
|
+
inkscape:randomized="0"
|
173
|
+
d="M 93.900352,155.39869 C 76.202126,157.13004 77.260877,157.6106 66.912372,143.14916 56.563867,128.68772 56.67707,129.8449 64.026791,113.65211 71.376512,97.459327 70.430964,98.135955 88.129189,96.404606 c 17.698231,-1.731348 16.639471,-2.211904 26.987981,12.249534 10.3485,14.46144 10.2353,13.30426 2.88558,29.49704 -7.34972,16.19279 -6.40417,15.51616 -24.102398,17.24751 z"
|
174
|
+
inkscape:transform-center-y="-3.4687486e-06"
|
175
|
+
transform="rotate(-114.61835,91.014769,125.90165)"
|
176
|
+
inkscape:transform-center-x="1.9694115e-06" />
|
177
|
+
<a
|
178
|
+
id="a825" />
|
179
|
+
<circle
|
180
|
+
style="opacity:1;fill:url(#linearGradient4627);fill-opacity:1;stroke:#000000;stroke-width:1.80661297;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
181
|
+
id="path4609"
|
182
|
+
cx="91.014771"
|
183
|
+
cy="125.90165"
|
184
|
+
r="22.363699" />
|
185
|
+
</g>
|
186
|
+
</svg>
|
data/artwork/icon128.png
ADDED
Binary file
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'drum'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require 'pry'
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start(__FILE__)
|
data/bin/drum
ADDED
data/bin/drum.bat
ADDED
data/bin/setup
ADDED
data/drum.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative 'lib/drum/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'drum'
|
5
|
+
spec.version = Drum::VERSION
|
6
|
+
spec.authors = ['fwcd']
|
7
|
+
|
8
|
+
spec.summary = 'Playlist manager'
|
9
|
+
spec.description = 'A tool for syncing and backing up your playlists'
|
10
|
+
spec.homepage = 'https://github.com/fwcd/drum.git'
|
11
|
+
spec.license = 'MIT'
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
13
|
+
|
14
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
15
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
|
23
|
+
spec.bindir = 'bin'
|
24
|
+
spec.executables = ['drum']
|
25
|
+
spec.require_paths = ['lib']
|
26
|
+
|
27
|
+
spec.add_dependency 'thor', '~> 0.20'
|
28
|
+
spec.add_dependency 'rspotify', '~> 2.10'
|
29
|
+
spec.add_dependency 'launchy', '~> 2.4'
|
30
|
+
spec.add_dependency 'ruby-limiter', '~> 2.1'
|
31
|
+
spec.add_dependency 'webrick', '~> 1.7'
|
32
|
+
spec.add_dependency 'jwt', '~> 2.2'
|
33
|
+
spec.add_dependency 'highline', '~> 2.0'
|
34
|
+
spec.add_dependency 'rest-client', '~> 2.0'
|
35
|
+
spec.add_dependency 'progress_bar', '~> 1.3'
|
36
|
+
end
|