Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michael-simons/scrobbles4j
https://github.com/michael-simons/scrobbles4j
analytics japlscript jdk17 music quarkus sql
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/michael-simons/scrobbles4j
- Owner: michael-simons
- License: apache-2.0
- Created: 2021-09-29T21:54:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T04:29:03.000Z (about 1 month ago)
- Last Synced: 2024-10-15T04:58:53.490Z (about 1 month ago)
- Topics: analytics, japlscript, jdk17, music, quarkus, sql
- Language: Java
- Homepage: https://info.michael-simons.eu/2021/10/03/yet-another-incarnation-of-my-ongoing-scrobbles/
- Size: 738 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.txt
Awesome Lists containing this project
README
= Scrobbles4j
:sectanchors:[abstract]
--
A set of modules around tracking, displaying and analyzing musical habits ("scrobbling") via Java.
--image:https://github.com/michael-simons/scrobbles4j/workflows/build/badge.svg[link=https://github.com/michael-simons/scrobbles4j/actions]
== 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
[source,bash]
----
./mvnw clean verify
----.On Windows
[source,bash]
----
mvnw.cmd clean verify
----=== Run the client with the desired sources and sinks
[source,bash]
----
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:
[source,bash]
----
./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:
[source,bash]
----
./mvnw quarkus:dev
----To point it to your own instance run:
[source,bash]
----
./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 https://twitter.com/jordisola_/status/1444225890800525316[ᴊᴏʀᴅɪ]
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.