admirer

command module
v0.0.0-...-2d45b6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 1 Imported by: 0

README

Admirer

Go version Go CI License Go Reference

A command line utility to sync loved tracks between music services.

Installation

Compiled binaries will be provided for version 1.0.0.

Note: Admirer is currently only tested on Linux.

Building from source

Please install Go 1.20 first, set the GOPATH environment variable and ensure $GOPATH/bin is present in $PATH.

go install github.com/dietrichm/admirer@latest

Usage

Usage:
  admirer [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  list        List loved tracks on specified service
  login       Log in on external service
  status      Retrieve status for services
  sync        Sync recently loved tracks from one service to another

Flags:
  -h, --help   help for admirer

Use "admirer [command] --help" for more information about a command.
Supported services

Last.fm and Spotify have an initial implementation.

In the future, I would like to add support for ListenBrainz and CSV/JSON files as well (#27).

Authentication

Before using any of the provided services, you need to create your own API application on said service and export your new API client ID and secret as environment variables:

Service Creating your app Environment variables
Last.fm Create an account here LASTFM_CLIENT_ID and LASTFM_CLIENT_SECRET
Spotify Manage and create an app here SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET

When this is done, continue with the following steps.

  1. Run admirer login <service> to retrieve an authentication URL.
  2. By visiting this URL, the service will ask confirmation and redirect back to a non existing URL https://admirer.test/....
  3. Copy and paste the desired query parameter from the URL into the CLI input and press Enter.
  4. If all goes well, you will retrieve confirmation that you have been logged in.

Note 1: after #23, API client IDs and secrets will be queried during login and stored along with other authentication secrets.

Note 2: #25 will add an internal HTTP server to retrieve the authentication callback automatically.

Use cases

Listing recently loved or added tracks

Using the list command, you can retrieve a list of your most recently loved or added tracks on said service.

Syncing recently loved tracks between services

Using the sync command, you can synchronise recently loved tracks from one service to another. For example to mark as loved on Last.fm the same tracks that were added to your library on Spotify, or vice versa.

License

Copyright 2020, Dietrich Moerman.

Released under the terms of the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
application
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
infrastructure
authentication
Package authentication is a generated GoMock package.
Package authentication is a generated GoMock package.
config
Package config is a generated GoMock package.
Package config is a generated GoMock package.
services/lastfm
Package lastfm is a generated GoMock package.
Package lastfm is a generated GoMock package.
services/spotify
Package spotify is a generated GoMock package.
Package spotify is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL