Skip to content

Commit

Permalink
Merge pull request #18 from platers/gui
Browse files Browse the repository at this point in the history
GUI
  • Loading branch information
platers authored Aug 14, 2022
2 parents d858cc8 + fba8f26 commit 7f8a5e2
Show file tree
Hide file tree
Showing 41 changed files with 2,715 additions and 2,591 deletions.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing

## Development Setup

1. Fork and clone the repository.
2. Install [poetry](https://python-poetry.org/).
3. In the root directory, run `poetry shell`.
4. Run `poetry install`.
5. `unitunes` should now be runnable.

## Testing

Run `pytest` to run tests. With no arguments, it will skip tests that require service configs.

Add a service config to run more tests.

```bash
pytest -s --spotify spotify_config.json --ytm ytm_config.json # may need to run with -s to paste spotify redirect URL the first time
```
110 changes: 11 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

![unituneslogo](https://github.com/platers/unitunes/blob/master/unitunes.png?raw=true)

A command-line interface tool to manage playlists across music streaming services.
A python GUI and library to sync playlists across music streaming services.

![demo](demo.gif)
![playlist_tab](assets/playlist_tab.png)

## Introduction

Expand All @@ -19,114 +19,26 @@ unitunes stores your playlists in plain text, allowing you to version control yo
| MusicBrainz | | ||
| Spotify ||||
| Youtube Music ||||
| Beatsaber ||||

Want to add support for another service? See [contributing](#contributing).

## Documentation

[Documentation](https://github.com/platers/unitunes/blob/master/docs.md)

## Quickstart

### Installation
## Usage

```bash
pip install unitunes
unitunes
```

### Initialize

```bash
unitunes init
```

This creates a `index.json` file in the current directory.
In settings, set the directory to store your playlists. You can version control this directory with git.

### Add Services
Connect services in the service tab. Enter a service name, and click the button to add the corresponding service. Each service type requires some configuration, Spotify requires a client id and secret, and Youtube Music requires request headers.
![service_tab](assets/service_tab.png)

#### Spotify
Playlists can then be added to the playlist tab.

Follow the instructions at https://spotipy.readthedocs.io/en/2.19.0/#getting-started to obtain client credentials.

Put the credentials in a file like so:

```json
{
"client_id": "...",
"client_secret": "...",
"redirect_uri": "http://example.com"
}
```

Register the service in unitunes:

```bash
unitunes service add spotify spotify_config.json
```

#### Youtube Music

Follow the instructions at https://ytmusicapi.readthedocs.io/en/latest/setup.html#manual-file-creation to create a `ytm_config.json` file.

Register the service in unitunes:

```bash
unitunes service add ytm ytm_config.json
```

### Add Playlists

Initialize UP's from your existing playlists:

```bash
unitunes fetch spotify # use -f to skip confirmation
unitunes fetch ytm
```

### Pull Playlists

Pull all tracks from all playlists.

```bash
unitunes pull
```

### Search Playlists

Search for tracks on another service:

```bash
unitunes search SERVICE_TYPE PLAYLIST_NAME
```

### Push Playlists

Push all changes to streaming services:

```bash
unitunes push
```
After adding playlists, you can sync them. You likely just want to press the `Sync All` button, which will pull, search, and push all playlists.

## Contributing

unitunes is in alpha. Contributions are very welcome. I am looking for collaborators to grow unitunes into a foundation for user controlled music software.

Take a look at the open issues!

### Development Setup

1. Fork and clone the repository.
2. Install [poetry](https://python-poetry.org/).
3. In the root directory, run `poetry shell`.
4. Run `poetry install`.
5. `unitunes` should now be runnable.

#### Testing

Run `pytest` to run tests. With no arguments, it will skip tests that require service configs.

Add a service config to run more tests.

```bash
pytest --spotify spotify_config.json --ytm ytm_config.json # may need to run with -s to paste spotify redirect URL the first time
```
unitunes is rapidly evolving. Take a look at the [contributing guide](CONTRIBUTING.md).
Binary file added assets/playlist_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/service_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed demo.gif
Binary file not shown.
Loading

0 comments on commit 7f8a5e2

Please sign in to comment.