readme upadate

This commit is contained in:
√(noham)²
2024-03-18 13:10:50 +01:00
parent 0f028a0f1a
commit c722db5d58
9 changed files with 204 additions and 116 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -1,11 +1,70 @@
# AppleMusicExporter
AppleMusicExporter est un projet conçu pour exporter les musiques depuis Apple Music en temps réel. AppleMusicExporter utilise [AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) pour les interactions avec Apple Music.
![music player](Music-Player.gif)
![diagramme](Diagramme.drawio.png)
![test](Diagramme.drawio)
## Dépendances :
### Back :
- flask
- python-dotenv (optionnel)
- requests
### User :
- colorthief
- python-dotenv
- requests
## Install :
### Back :
```bash
git clone https://github.com/NohamR/AM-Exporter.git
cd back
```
Créer le fichier .users avec les utilisateurs et leurs mots de passe hashés ([.user.example](back/.users.example)).
```bash
docker build -t amexporter .
```
```bash
docker run -d -p 3005:3005 amexporter
```
Ou
```bash
docker-compose up -d
```
### User :
```bash
git clone https://github.com/NohamR/AM-Exporter.git
cd user
python install -r requirements.txt
```
Configuer [music-exp.plist](user/music-exp.plist) sur l'exemple de [music-exp.plist.example](user/music-exp.plist.example) :
PYTHON_PATH
WORKING_DIRECTORY
```bash
./install.sh
```
Logs can but found in the working direcrtory :
```bash
cd WORKING_DIRECTORY
tail -f error_logfile.log
tail -f logfile.log
```
### Front :
Un exemple d'implémentation de l'api est disponible dans [front-example](front-example).
![screen.png](front-example/screen.png)
## Uninstall :
```bash
cd user
./unistall.sh
```
# To do :
- readme
- make script proper
- comment
tail -f logfile.log
- comment

3
back/.users.example Normal file
View File

@@ -0,0 +1,3 @@
{
"user": "hashed_password"
}

View File

@@ -1,4 +1,4 @@
name: applemusicexporter
name: amexporter
services:
app:
cpu_shares: 90
@@ -11,7 +11,7 @@ services:
- PGID=1000
- PUID=1000
- TZ=Europe/Paris
image: applemusicexporter
image: amexporter
labels:
icon: https://noh.am/static/assets/music.png
ports:
@@ -21,7 +21,7 @@ services:
restart: unless-stopped
# volumes:
# - type: bind
# source: /DATA/AppData/applemusicexporter
# source: /DATA/AppData/amexporter
# target: /hard
x-casaos:
envs:
@@ -42,7 +42,7 @@ services:
container_name: ""
networks:
default:
name: applemusicexporter
name: amexporter
x-casaos:
architectures:
- amd64
@@ -55,9 +55,9 @@ x-casaos:
main: app
port_map: "3005"
scheme: http
store_app_id: applemusicexporter
store_app_id: amexporter
tagline:
en_us: applemusicexporter
en_us: amexporter
title:
custom: applemusicexporter
en_us: applemusicexporter
custom: amexporter
en_us: amexporter

View File

@@ -1,2 +1,2 @@
Flask==3.0.2
Flask_Cors==4.0.0
Flask_Cors==4.0.0

BIN
front-example/screen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>am.noh.music-exp</string>
<key>ProgramArguments</key>
<array>
<string>PYTHON_PATH</string>
<string>export.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>logfile.log</string>
<key>StandardErrorPath</key>
<string>error_logfile.log</string>
<key>WorkingDirectory</key>
<string>WORKING_DIRECTORY</string>
</dict>
</plist>

3
user/requirements.txt Normal file
View File

@@ -0,0 +1,3 @@
colorthief==0.2.1
python-dotenv==1.0.1
Requests==2.31.0