MoeData - MoeData.toolforge.org
Import tracklists from Spotify to Wikidata
$ ssh USER@login.tools.wmflabs.org
$ become MYTOOL
$ mkdir ~/public_html
$ git clone https://github.com/DiFronzo/MoeData.git
$ cd MoeData
$ npm run build
$ cp -r build/* ../public_html/
$ cd ..
$ vim service.template
Add the following in service.template
:
backend: kubernetes
type: php7.3
canonical: true
$ vim .lighttpd.conf
Add the following in .lighttpd.conf
:
# Look for files on disk and if not found return our index
url.rewrite-if-not-file = (
"(.*)" => "/index.html",
)
$ webservice --backend=kubernetes --canonical php7.3 start
$ webservice start
To use the dockerfile, you could do the following (in root folder):
docker build -f dockerfile -t moedata:prod .
Then run the build:
docker run -it --rm -p 1337:80 moedata:prod
When deployed use the url /album/%SPOTIFY CODE%&qid=%WIKIDATA ITEM%
.
- Example
/album/7e7t0MCrNDcJZsPwUKjmOc&qid=Q96782371
gives Pop Smokes album Shoot for the Stars, Aim for the Moon.