Shpotify adalah skrip Bash/Apple sederhana untuk mengontrol Spotify dari baris perintah pada Mac.
Jika Anda menganggap ini menarik, Anda harus mengikuti saya di Twitter untuk mempelajari hal -hal lain yang saya lakukan.
Unduh dan instal aplikasi Spotify Desktop jika Anda belum melakukannya.
Cara termudah untuk menginstal shpotify adalah dengan menggunakan manajer paket homebrew:
brew install shpotify
Jika Anda tidak menggunakan Homebrew, Anda dapat menginstal skrip secara manual dengan mengikuti beberapa langkah sederhana:
Ambil salinan repositori ini, baik dengan git atau unduh arsip zip.
Arahkan ke folder tempat Anda mengambil repositori (unzip jika diperlukan) dan pastikan file yang disebut spotify dapat dieksekusi:
cd shpotify
chmod +x spotify
Salin file spotify ke lokasi yang nyaman di PATH Anda, atau atur PATH Anda untuk menyertakan folder tempat file berada.
Shpotify perlu terhubung ke API Spotify untuk menemukan musik dengan nama. Sangat mungkin Anda menginginkan fitur ini!
Agar ini berfungsi, pertama -tama Anda harus mendaftar (atau ke) situs pengembang Spotify dan membuat aplikasi . Setelah selesai, Anda dapat menemukan Client ID dan nilai Client Secret dan memasukkannya ke dalam file konfigurasi shpotify Anda di ${HOME}/.shpotify.cfg .
Pastikan untuk mengutip nilai -nilai Anda dan tidak menambahkan spasi tambahan. Setelah selesai, itu akan terlihat seperti yang berikut (tetapi dengan nilai -nilai Anda sendiri):
CLIENT_ID="abc01de2fghijk345lmnop"
CLIENT_SECRET="qr6stu789vwxyz"
Dengan Shpotify Anda dapat mengontrol Spotify dengan perintah berikut:
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 terutama ditulis dan dikelola oleh Harish Narayanan.
Karena ini adalah proyek open source, ini berisi banyak kontribusi dari banyak orang yang membantu, termasuk:
Jika Anda tertarik untuk berkontribusi juga, harap pertimbangkan untuk mengatasi beberapa masalah yang telah dilaporkan orang sebelumnya dan mengajukan permintaan tarik. Terima kasih!
Hak Cipta (C) 2012–2024 Harish Narayanan.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus dimasukkan dalam semua salinan atau bagian substansial dari perangkat lunak.
Perangkat lunak ini disediakan "sebagaimana adanya", tanpa jaminan apa pun, tersurat maupun tersirat, termasuk tetapi tidak terbatas pada jaminan dapat diperjualbelikan, kebugaran untuk tujuan tertentu dan nonpringement. Dalam hal apa pun penulis atau pemegang hak cipta tidak akan bertanggung jawab atas klaim, kerusakan atau tanggung jawab lainnya, baik dalam tindakan kontrak, gugatan atau sebaliknya, timbul dari, di luar atau sehubungan dengan perangkat lunak atau penggunaan atau transaksi lain dalam perangkat lunak.