# Music Kraken
[![Woodpecker CI Status](https://ci.elara.ws/api/badges/59/status.svg)](https://ci.elara.ws/repos/59)
- [Installation](#installation)
- [Quick-Guide](#quick-guide)
- [How to search properly](#query)
- [CONTRIBUTE](#contribute)
- [Matrix Space](#matrix-space)
---
## Installation
You can find and get this project from either [PyPI](https://pypi.org/project/music-kraken/) as a Python-Package,
or simply the source code from [Gitea](https://gitea.elara.ws/music-kraken/music-kraken-core). **
**NOTES**
- Even though everything **SHOULD** work cross-platform, I have only tested it on Ubuntu.
- If you enjoy this project, feel free to give it a star on GitHub.
### From source
```sh
git clone https://gitea.elara.ws/music-kraken/music-kraken-core.git
python3 -m pip install -e music-kraken-core/
```
To update the program, if installed like this, go into the `music-kraken-core` directory and run `git pull`.
### Get it running on other Systems
Here are the collected issues, that are related to running the program on different systems. If you have any issues, feel free to open a new one.
#### Windows + WSL
Add ` ~/.local/bin` to your `$PATH`. [#2][i2]
## Quick-Guide
The **Genre** you define at the start, is the folder my program will download the files into, as well as the value of the ID3 genre field.
When it drops you into the **shell** 2 main things are important:
1. You search with `s: `
2. You choose an option with just the index number of the option
3. You download with `d: `, where the options are comma separated
### Query
The syntax for the query is really simple.
```mk
> s: #a
searches for the artist
> s: #a #r
searches for the release (album) by the artist
> s: #r Me #t
searches for the track from the release
```
The escape character is as usual `\`.
---
## Contribute
I am happy about every pull request. To contribute look [here](contribute.md).
## Matrix Space
I decided against creating a discord server, due to various communities get often banned from discord. A good and free Alternative are Matrix Spaces. I recommend the use of the Client [Element](https://element.io/download). It is completely open source.
**Click [this invitation](https://matrix.to/#/#music-kraken:matrix.org) _([https://matrix.to/#/#music-kraken:matrix.org](https://matrix.to/#/#music-kraken:matrix.org))_ to join.**
---
# Programming Interface / Use as Library
This application is $100\%$ centered around Data. Thus, the most important thing for working with musik kraken is, to understand how I structured the data.
## Quick Overview
- explanation of the [Data Model](#data-model)
- how to use the [Data Objects](#data-objects)
- further Dokumentation of _hopefully_ [most relevant classes](documentation/objects.md)
- the [old implementation](documentation/old_implementation.md)
```mermaid
---
title: Quick Overview (outdated)
---
sequenceDiagram
participant pg as Page (eg. YouTube, MB, Musify, ...)
participant obj as DataObjects (eg. Song, Artist, ...)
participant db as DataBase
obj ->> db: write
db ->> obj: read
pg -> obj: find a source for any page, for object.
obj -> pg: add more detailed data from according page.
obj -> pg: if available download audio to target.
```
[i10]: https://github.com/HeIIow2/music-downloader/issues/10
[i2]: https://github.com/HeIIow2/music-downloader/issues/2