Code Monkey home page Code Monkey logo

scrobbles4j's Introduction

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.

scrobbles4j's People

Contributors

dependabot[bot] avatar michael-simons avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.