Amusing CLI to help download music independently or from your exported apple music library.
Project description
๐ง Amusing ๐ธ
A CLI to help download music independently or from your exported apple music library.
Why should you use Amusing?
- To download your entire Apple Music Library and store it locally in one go
- To search and download individual songs from YouTube
- To keep track of your ever growing music collection
๐ ๏ธ Install it!
$ pip install amusing-app
โจ Getting set up
There are three things to know before moving on to the next section:
-
The CLI takes in a
appconfig.yaml
file similar to what's indicated inappconfig.example.yaml
. You can simply rename it. The file looks like this:root_download_path: "..." db_name: "..."
-
A dedicated sqlite database called
db_name
will be created inroot_download_path/db_name.db
to store two tablesSong
andAlbum
as defined inamusing/db/models.py
. All songs downloaded locally will be getting a row in theSong
table and a row for their corresponding album in theAlbum
table. -
The songs are downloaded in
root_download_path/songs
directory. -
That's it. You're done. Let's look at the commands available next.
๐ฌ Available commands
There are currently 6 commands available, excluding the amusing --version
.
The first time you run a command (eg. --help), an Amusing
directory will be created in your pathlib.Path.home()/Downloads
folder. For eg., on MacOS, it's in /Users/Username/Downloads
.
$ amusing --help
Created a new config file: /Users/username/Downloads/Amusing/appconfig.yaml
Usage: amusing [OPTIONS] COMMAND [ARGS]...
Amusing CLI to help download music independently or from your exported apple music library.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --version -v โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ download Parse the entire AM library and download songs and make/update the db as needed. โ
โ showsimilar Look up the db and show if similar/exact song(s) are found. โ
โ showsimilaralbum Look up the db and show albums similar to the album searched. โ
โ showsimilarartist Look up the db and show songs for similar/exact artist searched. โ
โ song Search and download the song and add it to the db. Use --force to overwrite the existing song in the db. Creates a new โ
โ album if not already present. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
To parse an exported Library.xml
file from your Apple Music account, use:
$ amusing download --help
Usage: amusing download [OPTIONS] [PATH]
Parse the entire AM library and download songs and make/update the db as needed.
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ path [PATH] The path to the Library.xml exported from Apple Music. [default: ./Library.xml] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
# Example
$ amusing download "your/path/to/Library.xml"
To download a song individually, use:
$ amusing song --help
Usage: amusing song [OPTIONS] NAME ARTIST ALBUM
Search and download the song and add it to the db. Use --force to overwrite the existing song in the db. Creates a new album if not already
present.
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ * name TEXT Name of the song. [default: None] [required] โ
โ * artist TEXT Aritst of the song. [default: None] [required] โ
โ * album TEXT Album the song belongs to. [default: None] [required] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --force --no-force Overwrite the song if present. [default: no-force] โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
# Example, the search keywords need not be exact of course:
$ amusing song "Run" "One Republic" "Human"
Search for a similar song, album or artist in your db/downloads:
$ amusing showsimilar "Someday"
Song to look up: someday
โโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Song โ Artist โ Album โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Someday โ OneRepublic โ Human (Deluxe) โ
โ Someday At Christmas โ Justin Bieber โ Under the Mistletoe (Deluxe Edition) โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
$ amusing showsimilarartist "OneRepublic"
Artist to look up: OneRepublic
โโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Song โ Artist โ Album โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Run โ OneRepublic โ Human (Deluxe) โ
โ Someday โ OneRepublic โ Human (Deluxe) โ
โ No Vacancy โ OneRepublic โ No Vacancy - Single โ
โ RUNAWAY โ OneRepublic โ RUNAWAY - Single โ
โ Sunshine โ OneRepublic โ Sunshine - Single โ
โ I Ain't Worried โ OneRepublic โ Top Gun: Maverick (Music from the Motion Picture) โ
โ West Coast โ OneRepublic โ West Coast - Single โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
$ amusing showsimilaralbum "Human"
Album to look up: Human
โโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโ
โ Album โ Number of songs โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Human (Deluxe) โ 2 โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโ
TODO ๐
- Provide an option to choose which searched result is downloaded.
- Provide a command to show all songs in an album
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file amusing_app-0.1.2.tar.gz
.
File metadata
- Download URL: amusing_app-0.1.2.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.2 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878929058743c3b703f22e66b46fd3dd8cfc86927f8b71ea0c0fa4c611ddade6 |
|
MD5 | 0271649206ae0ffbca5a320f9a9e182b |
|
BLAKE2b-256 | ca892c99075d0827bc9e0eeaa8a8f321bc606f1185a05cf59fb7f99b0a9d432b |
File details
Details for the file amusing_app-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: amusing_app-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.2 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af52cd2f3452c045f2a46810569c2a48ea54093a620a68b8d66b051c9c4831a |
|
MD5 | 8c4d3ed3d13a455a6ceefffde8767402 |
|
BLAKE2b-256 | 2e8fd54b9740b58a8b0dfc59a8faae9aa532933b74372161638227001d0ea6af |