Shpotifyは、Mac上のコマンドラインからSpotifyを制御するためのシンプルなBash/Appleスクリプトです。
これを面白いと思うなら、私がしている他のことについて学ぶためにTwitterで私をフォローしてください。
まだ使用していない場合は、Spotifyデスクトップアプリケーションをダウンロードしてインストールしてください。
Shpotifyをインストールする最も簡単な方法は、HomeBrewパッケージマネージャーを使用することです。
brew install shpotify
HomeBrewを使用しない場合は、いくつかの簡単な手順に従ってスクリプトを手動でインストールできます。
gitを使用してこのリポジトリのコピーを取得するか、zipアーカイブをダウンロードします。
リポジトリを取得したフォルダーに移動し(必要に応じてUNZIP)、 spotifyと呼ばれるファイルが実行可能であることを確認してください。
cd shpotify
chmod +x spotify
ファイルspotify PATH内の便利な場所にコピーするか、 PATHを設定して、ファイルが配置されているフォルダーを含めます。
Shpotifyは、名前で音楽を見つけるためにSpotifyのAPIに接続する必要があります。この機能が必要な可能性が非常に高いです!
これを機能させるには、最初にSpotifyの開発者サイトにサインアップ(またはInto)し、アプリケーションを作成する必要があります。そうしたら、 Client IDとClient Secret値を見つけて、 ${HOME}/.shpotify.cfgでshpotify構成ファイルに入力できます。
必ずあなたの価値を引用して、追加のスペースを追加しないでください。完了した場合、それは次のように見えるはずです(ただし、あなた自身の価値があります):
CLIENT_ID="abc01de2fghijk345lmnop"
CLIENT_SECRET="qr6stu789vwxyz"
shpotifyを使用すると、次のコマンドでSpotifyを制御できます。
spotify play Resumes playback where Spotify last left off.
spotify play <song name> Finds a song by name and plays it.
spotify play album <album name> Finds an album by name and plays it.
spotify play artist <artist name> Finds an artist by name and plays it.
spotify play list <playlist name> Finds a playlist by name and plays it.
spotify play uri <uri> Play songs from specific uri.
spotify next Skips to the next song in a playlist.
spotify prev Returns to the previous song in a playlist.
spotify replay Replays the current track from the beginning.
spotify pos <time> Jump to a specific time (in seconds) in the current song.
spotify pause Pauses (or resumes) Spotify playback.
spotify stop Stops playback.
spotify quit Stops playback and quits Spotify.
spotify vol up Increases the volume by 10%.
spotify vol down Decreases the volume by 10%.
spotify vol <amount> Sets the volume to an amount between 0 and 100.
spotify vol [show] Shows the current volume.
spotify status Shows the play status, including the current song details.
spotify status artist Shows the currently playing artist.
spotify status album Shows the currently playing album.
spotify status track Shows the currently playing track.
spotify share Displays the current song's Spotify URL and URI.
spotify share url Displays the current song's Spotify URL and copies it to the clipboard.
spotify share uri Displays the current song's Spotify URI and copies it to the clipboard.
spotify toggle shuffle Toggles shuffle playback mode.
spotify toggle repeat Toggles repeat playback mode.
Shpotifyは、主にHarish Narayananによって作成および維持されています。
オープンソースプロジェクトであるため、以下を含む多くの役立つ人々からの多数の貢献が含まれています。
貢献にも興味がある場合は、人々が以前に報告してプルリクエストを提出した問題のいくつかに対処することを検討してください。ありがとう!
Copyright(c)2012–2024 Harish Narayanan。
このソフトウェアと関連するドキュメントファイル(「ソフトウェア」)のコピーを入手して、制限なしにソフトウェアを扱うために、このソフトウェアを制限する権利を含め、ソフトウェアのコピーをコピー、変更、公開、配布、販売する、ソフトウェアのコピーを許可する人を許可する人を許可することを含めて、許可が無料で許可されます。
上記の著作権通知とこの許可通知は、ソフトウェアのすべてのコピーまたはかなりの部分に含まれるものとします。
このソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むがこれらに限定されない、明示的または黙示的なものを保証することなく、「現状のまま」提供されます。いかなる場合でも、著者または著作権所有者は、契約、不法行為、またはその他の訴訟、ソフトウェアまたはソフトウェアの使用またはその他の取引に関連する、またはその他の契約、またはその他の請求、またはその他の責任について責任を負いません。