michael-simons / scrobbles4j

Home Page:https://info.michael-simons.eu/2021/10/03/yet-another-incarnation-of-my-ongoing-scrobbles/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scrobbles4j

A set of modules around tracking, displaying and analyzing musical habits ("scrobbling") via Java.

badge

Requirements

For building the project

  • JDK 17

For using the client

  • An Apple macOS device, running iTunes, Apple Music or the Spotify app.

Building and running

Build the whole project

On Linux or macOS
./mvnw clean verify
On Windows
mvnw.cmd clean verify

Run the client with the desired sources and sinks

java \
-p model/target/modules:\
client/app/target/modules:\
client/sources/apple.music/target/modules:\
client/sinks/logger/target/modules \
-m scrobbles4j.client.app/scrobbles4j.client.app.Launcher

Or use a prebuild binary will all available sources and sinks:

./client/bundle/target/maven-jlink/default/bin/scrobbles4j

The Maven command above also creates a ZIP-Bundle, find it under ./client/bundle/target/scrobbles4j.zip.

Run the server

This will bring up MariaDB inside a container:

./mvnw quarkus:dev

To point it to your own instance run:

./mvnw quarkus:dev \
  -Dquarkus.datasource.jdbc.url=jdbc:mariadb://127.0.0.1:3306/music\?useJDBCCompliantTimezoneShift=true\&useUnicode=true\&serverTimezone=UTC\&useGmtMillisForDatetimes=true\&useLegacyDatetimeCode=false\&useTimezone=true \
  -Dquarkus.datasource.username=root \
  -Dquarkus.datasource.password=secret

One live instance is here: http://charts.michael-simons.eu.

Note
As the scrobbler backend is not yet implemented, the live data behind the instance above comes straight from my old scrobbler at https://dailyfratze.de. As a matter of fact, Scrobbles4j owns a separate scheme in the database, with read only access and a couple of views onto the original source. CQRS on the database level. Thanks ᴊᴏʀᴅɪ for a fitting description.

Misc

A local database can be brought up independent of Quarkus like this:

docker run -v `pwd`/var/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=music -e MYSQL_USER=music -e MYSQL_PASSWORD=music --publish=3306:3306  mariadb:10.9

It will store it’s data in a local folder, so it will be there after the container has been deleted and restarted.

About

https://info.michael-simons.eu/2021/10/03/yet-another-incarnation-of-my-ongoing-scrobbles/

License:Apache License 2.0


Languages

Language:Java 85.3%Language:HTML 14.3%Language:CSS 0.3%