scene release to discogs release
| in-ws-predb.ovh.sh | ||
| LICENSE | ||
| out-fallback.jq | ||
| out-ids.jq | ||
| out-simple.jq | ||
| parse-rls.fish | ||
| README.md | ||
| search-deezer-api.fish | ||
| search-discogs-api.fish | ||
| search-discogs-elastic.fish | ||
rls-discogs
scene release to discogs release
using
flow
scene rls name > parse > artist / title / year as .tsv > search discogs > .json
tools
in-ws-predb.ovh.shread scene release names from predb websocketparse-rls.fishparse scene release namesearch-discogs-api.fishsearch discogs release using Discogs REST APIsearch-discogs-elastic.fishsearch discogs release using ElasticSearchout-fallback.jqfallback search helperout-ids.jqfilter ids from json outputout-simple.jqfilter genre from json output
usage
parse rls name as tab separated values
$ echo 'Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC' | ./parse-rls.fish | column -t -s "$(printf '\t')"
Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC Kraftwerk Autobahn CD Remastered 2009
parse rls name as json
$ echo 'Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC' | ./parse-rls.fish -j | jq .
{
"artist": "Kraftwerk",
"barcode": null,
"catno": null,
"edition": "Remastered",
"format": "CD",
"rls": "Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC",
"title": "Autobahn",
"year": "2009"
}
parse rls name, search local ElasticSearch, output discogs ids
$ echo 'Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC' | ./parse-rls.fish | ./search-discogs-elastic.fish | ./out-ids.jq
{"artist_id":4654,"master_id":2994,"release_id":1966322,"rls":"Kraftwerk-Autobahn-Remastered-CD-FLAC-2009-BCC"}
get rls names from websocket, parse rls name, search with api.discogs.com, write .json
$ ./in-ws-predb.ovh.sh | ./parse-rls.fish | search-discogs-api.fish > out.api.json
parse rls name, search local ElasticSearch, write json, filter empty results and convert json to tsv, fallback search with Discogs API, write json
$ echo 'Band_Of_Horses-Things_Are_Great-CD-2022-FATHEAD' | ./parse-rls.fish | ./search-discogs-elastic.fish | \
tee out.es.json | ./out-fallback.jq | ./search-discogs-api.fish > out.api.json
$ jq ._search_result_count out.es.json out.api.json
0
1