https://github.com/floscha/tonietools
https://github.com/floscha/tonietools
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/floscha/tonietools
- Owner: floscha
- License: mit
- Created: 2021-05-08T13:37:51.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-30T12:08:16.000Z (over 4 years ago)
- Last Synced: 2025-01-02T20:42:16.500Z (over 1 year ago)
- Language: Python
- Size: 1.63 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :package: TonieTools
A handy tool to import songs from Spotify and YouTube to your Creative Tonie using a web UI or CLI.


[](https://github.com/psf/black)
[](https://github.com/prettier/prettier)

## Usage
### Docker
Then, run the following command to see how the CLI works:
```bash
docker run --rm --name tonietools --env-file .env tonietools --help
```
To start the web server, run
```bash
docker run --rm --name tonietools -p 8000:8000 --env-file .env tonietools
```
The web UI can then be accessed under [localhost:8000](localhost:8000).
This assumes that you use a *.env* file containing the environmental variables as listed in the following template:
```
TONIE_MAIL=
TONIE_PASSWORD=
TONIE_HOUSEHOLD=
TONIE_ID=
```
Alternatively, you can add environmental variables to the `docker run` command individually as `-e TONIE_MAIL=`.
### CLI
#### Spotify
`tonietools spotify `
## Development
### Docker
Build the provided Docker image like so:
```bash
docker build . -t tonietools
```
Start a bash session in the Docker container:
```bash
docker run --rm -it --entrypoint /bin/bash --env-file .env --name tonietools tonietools
```
### No Docker
Install FFmpeg:
- OSX: `brew install ffmpeg`
- Ubuntu: `apt-get install ffmpeg`
Setup a new virtual environment and install dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install -e .
```
When planning to commit to GitHub, activate pre-commit with `pre-commit install`.
To run the pre-commit hooks, use `pre-commit run --all-files`.