music-routes-data 3.3.0 → 4.0.0
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.
- package/README.md +3 -4
- package/bin/verify +1 -3
- package/data/artist_track.json +4 -0
- package/data/individual_track.json +28 -0
- package/data/individuals.json +18 -0
- package/data/releases.json +6 -0
- package/data/track_release.json +4 -0
- package/data/tracks.json +6 -0
- package/lib/Data/index.js +0 -1
- package/lib/cli/index.js +3 -12
- package/lib/cli/link.js +2 -2
- package/package.json +2 -2
- package/data/individual_artist.json +0 -19410
package/README.md
CHANGED
|
@@ -6,19 +6,18 @@ Music Routes Data: What musicians played on which tracks?
|
|
|
6
6
|
Schema
|
|
7
7
|
======
|
|
8
8
|
|
|
9
|
-
Data is stored in
|
|
9
|
+
Data is stored in JSON files in the `data` directory.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
These files contain basic data:
|
|
12
12
|
|
|
13
13
|
* `tracks.json` contains the `names` and unique `id` string for a track.
|
|
14
14
|
* `releases.json` contains the `names` and unique `id` string for a release.
|
|
15
15
|
* `artists.json` contains the `names` and unique `id` string for an artist.
|
|
16
16
|
* `individuals.json` contains the `names` and unique `id` string for an individual.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
These files describe relationships between the basic data and sometimes include extra data relevant to the relationship:
|
|
19
19
|
|
|
20
20
|
* `artist_track.json` contains `artistId` and `trackId` pairs where a track is attributed to an artist.
|
|
21
|
-
* `individual_artist.json` contains `individualId` and `artistId` pairs where an individual is a member of an artist.
|
|
22
21
|
* `individual_track.json` contains `individualId` and `trackId` pairs where the individual performed on the track. There is also an optional `credits` array that explains the person's role on the track (e.g., `["vocals","guitar"]`).
|
|
23
22
|
* `track_release.json` contains `trackId` and `releaseId` pairs where a track appears on a release.
|
|
24
23
|
|
package/bin/verify
CHANGED
|
@@ -15,7 +15,7 @@ if (rv.status === data.StatusEnum.ERROR) {
|
|
|
15
15
|
|
|
16
16
|
var dump = {}; // local copy of all collections
|
|
17
17
|
|
|
18
|
-
collections = ["tracks", "artists", "releases", "individuals", "artist_track", "
|
|
18
|
+
collections = ["tracks", "artists", "releases", "individuals", "artist_track", "individual_track", "track_release"];
|
|
19
19
|
|
|
20
20
|
collections.forEach(function(collection) {
|
|
21
21
|
var rv = data.search({collection: collection});
|
|
@@ -51,8 +51,6 @@ dump.included = function (basic, relation, propName) {
|
|
|
51
51
|
assert.ok(dump.included("artists", "artist_track", "artist_id"));
|
|
52
52
|
// All tracks should have artists.
|
|
53
53
|
assert.ok(dump.included("tracks", "artist_track", "track_id"));
|
|
54
|
-
// All artists have individuals. (Not all individuals are members of artists, though.)
|
|
55
|
-
// assert.ok(dump.included("artists", "individual_artist", "artist_id"));
|
|
56
54
|
// All individuals are associated with at least one track.
|
|
57
55
|
// assert.ok(dump.included("individuals", "individual_track", "individual_id"));
|
|
58
56
|
// All tracks are on at least one release.
|
package/data/artist_track.json
CHANGED
|
@@ -54806,5 +54806,9 @@
|
|
|
54806
54806
|
{
|
|
54807
54807
|
"artist_id": "1772",
|
|
54808
54808
|
"track_id": "13483"
|
|
54809
|
+
},
|
|
54810
|
+
{
|
|
54811
|
+
"artist_id": "1771",
|
|
54812
|
+
"track_id": "13484"
|
|
54809
54813
|
}
|
|
54810
54814
|
]
|
|
@@ -257410,5 +257410,33 @@
|
|
|
257410
257410
|
{
|
|
257411
257411
|
"individual_id": "12",
|
|
257412
257412
|
"track_id": "13483"
|
|
257413
|
+
},
|
|
257414
|
+
{
|
|
257415
|
+
"individual_id": "11071",
|
|
257416
|
+
"track_id": "13484"
|
|
257417
|
+
},
|
|
257418
|
+
{
|
|
257419
|
+
"individual_id": "11072",
|
|
257420
|
+
"track_id": "13484"
|
|
257421
|
+
},
|
|
257422
|
+
{
|
|
257423
|
+
"individual_id": "11070",
|
|
257424
|
+
"track_id": "13484"
|
|
257425
|
+
},
|
|
257426
|
+
{
|
|
257427
|
+
"individual_id": "3114",
|
|
257428
|
+
"track_id": "13484"
|
|
257429
|
+
},
|
|
257430
|
+
{
|
|
257431
|
+
"individual_id": "11073",
|
|
257432
|
+
"track_id": "13484"
|
|
257433
|
+
},
|
|
257434
|
+
{
|
|
257435
|
+
"individual_id": "11074",
|
|
257436
|
+
"track_id": "13484"
|
|
257437
|
+
},
|
|
257438
|
+
{
|
|
257439
|
+
"individual_id": "11075",
|
|
257440
|
+
"track_id": "13484"
|
|
257413
257441
|
}
|
|
257414
257442
|
]
|
package/data/individuals.json
CHANGED
|
@@ -63099,5 +63099,23 @@
|
|
|
63099
63099
|
"names": [
|
|
63100
63100
|
"Woody Goss"
|
|
63101
63101
|
]
|
|
63102
|
+
},
|
|
63103
|
+
{
|
|
63104
|
+
"_id": "11073",
|
|
63105
|
+
"names": [
|
|
63106
|
+
"Richie Rodriguez"
|
|
63107
|
+
]
|
|
63108
|
+
},
|
|
63109
|
+
{
|
|
63110
|
+
"_id": "11074",
|
|
63111
|
+
"names": [
|
|
63112
|
+
"Cory Wong"
|
|
63113
|
+
]
|
|
63114
|
+
},
|
|
63115
|
+
{
|
|
63116
|
+
"_id": "11075",
|
|
63117
|
+
"names": [
|
|
63118
|
+
"Joey Dosik"
|
|
63119
|
+
]
|
|
63102
63120
|
}
|
|
63103
63121
|
]
|
package/data/releases.json
CHANGED
|
@@ -14783,5 +14783,11 @@
|
|
|
14783
14783
|
"names": [
|
|
14784
14784
|
"https://www.youtube.com/watch\\?v\\=s0-_WzSfQe8"
|
|
14785
14785
|
]
|
|
14786
|
+
},
|
|
14787
|
+
{
|
|
14788
|
+
"_id": "2489",
|
|
14789
|
+
"names": [
|
|
14790
|
+
"The Joy Of Music, The Job Of Real Estate"
|
|
14791
|
+
]
|
|
14786
14792
|
}
|
|
14787
14793
|
]
|
package/data/track_release.json
CHANGED
|
@@ -54310,5 +54310,9 @@
|
|
|
54310
54310
|
{
|
|
54311
54311
|
"track_id": "13483",
|
|
54312
54312
|
"release_id": "2488"
|
|
54313
|
+
},
|
|
54314
|
+
{
|
|
54315
|
+
"track_id": "13484",
|
|
54316
|
+
"release_id": "2489"
|
|
54313
54317
|
}
|
|
54314
54318
|
]
|
package/data/tracks.json
CHANGED
|
@@ -80099,5 +80099,11 @@
|
|
|
80099
80099
|
"names": [
|
|
80100
80100
|
"Fanstume [singular] 2024"
|
|
80101
80101
|
]
|
|
80102
|
+
},
|
|
80103
|
+
{
|
|
80104
|
+
"_id": "13484",
|
|
80105
|
+
"names": [
|
|
80106
|
+
"Something"
|
|
80107
|
+
]
|
|
80102
80108
|
}
|
|
80103
80109
|
]
|
package/lib/Data/index.js
CHANGED
package/lib/cli/index.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
dir:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exit: function (code) {
|
|
7
|
-
process.exit(code)
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
error: function (message) {
|
|
11
|
-
console.error(message)
|
|
12
|
-
},
|
|
13
|
-
|
|
2
|
+
dir: console.dir,
|
|
3
|
+
exit: process.exit,
|
|
4
|
+
error: console.error,
|
|
14
5
|
argv: require('./argv')
|
|
15
6
|
}
|
package/lib/cli/link.js
CHANGED
|
@@ -10,8 +10,8 @@ module.exports = function (data, collection1, id1, collection2, id2) {
|
|
|
10
10
|
// Try track_release if release_track is what we have
|
|
11
11
|
linkCollection = collection2 + '_' + collection1
|
|
12
12
|
if (data.linkCollections.indexOf(linkCollection) === -1) {
|
|
13
|
-
|
|
14
|
-
return { status: data.StatusEnum.ERROR }
|
|
13
|
+
const message = `${collection1} and ${collection2} cannot be linked`
|
|
14
|
+
return { status: data.StatusEnum.ERROR, message }
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
return data.link(linkCollection, link)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "music-routes-data",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "What musicians played on what tracks",
|
|
5
5
|
"homepage": "https://github.com/Trott/music-routes-data",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"test": "standard && c8 jasmine spec/*.js && bin/verify"
|
|
14
|
+
"test": "standard && c8 --100 jasmine spec/*.js && bin/verify"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|