<div id="top"></div>
<!-- PROJECT SHIELDS -->
![PyPI](https://img.shields.io/pypi/v/spotify-utils?style=for-the-badge)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spotify-utils?style=for-the-badge)
![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline-status/sustineo/spotify-utils?style=for-the-badge)
![GitLab issues](https://img.shields.io/gitlab/issues/open/sustineo/spotify-utils?style=for-the-badge)
![GitLab merge requests](https://img.shields.io/gitlab/merge-requests/open-raw/sustineo/spotify-utils?style=for-the-badge)
![GitLab](https://img.shields.io/gitlab/license/sustineo/spotify-utils?style=for-the-badge)
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://gitlab.com/sustineo/spotify-utils">
<img src="https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/media_player.svg" alt="Logo" width="200" height="200">
</a>
<h2 align="center">spotify-utils</h2>
<p align="center">
An awesome and easy-to-use CLI for various Spotify® utility tasks!
<br />
<a href=https://gitlab.com/sustineo/spotify-utils/-/issues">Report Bug</a>
·
<a href="https://gitlab.com/sustineo/spotify-utils/-/issues">Request Feature</a>
</p>
</div>
<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
</ul>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
<li><a href="#roadmap">Roadmap</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#acknowledgments">Acknowledgments</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ol>
</details>
<!-- ABOUT THE PROJECT -->
## About The Project
There are many Spotify® clients out there; however, I didn't find one that really suited my needs so I created this one. I want to create a Spotify® CLI which is easy-to-use, packed with useful functionalities and with a sophisticated documentation built-in.
Key features:
- Playlists
- List information about playlists of the authenticated user in various output formats (Console, JSON)
- Find duplicate tracks across all playlists
- Export playlist information in various formats (JSON, HTML template)
- More coming soon
Of course, this CLI will not serve all needs, especially during development. So I'll be adding more features in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed!
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- GETTING STARTED -->
## Getting Started
### Prerequisites
- Python 3.8 or higher
### Installation
```bash
pip install spotify-utils
```
### Configuration
All methods require user authorization. You will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/applications) to get the credentials necessary to make authorized calls (a client id and client secret). [Click here](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/) to go to the step-by-step guide for creating a Spotify® application.
The CLI uses the Authorization Code flow, which the user logs into once. It provides an access token that can be refreshed.
Environment variables are being used for configuration. In order for the CLI to function properly you need to provide the following environment variables (use export instead of SET on Linux):
```powershell
set SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'
set SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'
set SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'
```
In addition the use of an `.env` file is supported:
```
SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'
SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'
SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'
```
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- USAGE EXAMPLES -->
## Usage and examples
In this section you can find usage examples of the CLI
### List all playlists of the current authenticated user in JSON format
```text
spotify-utils playlists list --json
```
```json
[
{
"collaborative":false,
"description":"Car Music Mix 2022 \ud83d\udd25 Best Remixes of Popular Songs 2022 EDM, Bass Boosted by Rise Music",
"external_urls":{
"spotify":"https://open.spotify.com/playlist/0fM4AkfoGygOHVXjsNB7io"
},
... more
}
]
```
### Find duplicates across all playlists and display additional details:
```text
spotify-utils playlists duplicates --verbose
```
Found 43 duplicate tracks across 20 playlists
| | name | artists | playlists | track_id |
|---|----------------|-------------------------|------------------------|------------------------|
| 0 | Piercing Light | League of Legends, Mako | Rock, Sonos Mainstream | 0163ud7I4Vb0ID5K7WBkq9 |
| 1 |Edge Of The Earth | Thirty Seconds To Mars| Rock, Pop|0g9IOJwdElaCZEvcqGRP4b |
| ... |... |... |... |... |
### Export playlist as beautiful HTML file
```text
spotify-utils playlists export --html
```
![HTML export](https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/examples/html_export.png)
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- ROADMAP -->
## Roadmap
- [ ] Improve help sections of the CLI
- [ ] Add additional functionality
See the [open issues](https://gitlab.com/sustineo/spotify-utils/-/issues) for a full list of proposed features (and known issues).
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- CONTRIBUTING -->
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- LICENSE -->
## License
Distributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- CONTACT -->
## Contact
Fabian Eulitz - [@sustineo\_](https://twitter.com/sustineo_) - dev@sustineo.de
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- ACKNOWLEDGMENTS -->
## Acknowledgments
- [Typer](https://github.com/tiangolo/typer)
- [Spotipy](https://github.com/plamere/spotipy)
- [Vermin](https://github.com/netromdk/vermin)
- [Shields.io](https://shields.io)
- [Choose an Open Source License](https://choosealicense.com)
<p align="right">(<a href="#top">back to top</a>)</p>
## Disclaimer
This project isn’t endorsed by Spotify AB and doesn’t reflect the views or opinions of Spotify AB or anyone officially involved in producing or managing Spotify®
<p align="right">(<a href="#top">back to top</a>)</p>
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/sustineo/spotify-utils",
"name": "spotify-utils",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "spotify, CLI, utilities",
"author": "Fabian Eulitz",
"author_email": "dev@sustineo.de",
"download_url": "https://files.pythonhosted.org/packages/63/e0/386affcc0f5cfb276be2957a1227166d081cef00e08eb403e693012f7e21/spotify_utils-1.0.13.tar.gz",
"platform": null,
"description": "<div id=\"top\"></div>\n<!-- PROJECT SHIELDS -->\n\n![PyPI](https://img.shields.io/pypi/v/spotify-utils?style=for-the-badge)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spotify-utils?style=for-the-badge)\n![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline-status/sustineo/spotify-utils?style=for-the-badge)\n![GitLab issues](https://img.shields.io/gitlab/issues/open/sustineo/spotify-utils?style=for-the-badge)\n![GitLab merge requests](https://img.shields.io/gitlab/merge-requests/open-raw/sustineo/spotify-utils?style=for-the-badge)\n![GitLab](https://img.shields.io/gitlab/license/sustineo/spotify-utils?style=for-the-badge)\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n <a href=\"https://gitlab.com/sustineo/spotify-utils\">\n <img src=\"https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/media_player.svg\" alt=\"Logo\" width=\"200\" height=\"200\">\n </a>\n\n <h2 align=\"center\">spotify-utils</h2>\n\n <p align=\"center\">\n An awesome and easy-to-use CLI for various Spotify® utility tasks!\n <br />\n <a href=https://gitlab.com/sustineo/spotify-utils/-/issues\">Report Bug</a>\n \u00b7\n <a href=\"https://gitlab.com/sustineo/spotify-utils/-/issues\">Request Feature</a>\n </p>\n</div>\n\n<!-- TABLE OF CONTENTS -->\n<details>\n <summary>Table of Contents</summary>\n <ol>\n <li>\n <a href=\"#about-the-project\">About The Project</a>\n <ul>\n <li><a href=\"#built-with\">Built With</a></li>\n </ul>\n </li>\n <li>\n <a href=\"#getting-started\">Getting Started</a>\n <ul>\n <li><a href=\"#prerequisites\">Prerequisites</a></li>\n <li><a href=\"#installation\">Installation</a></li>\n </ul>\n </li>\n <li><a href=\"#usage\">Usage</a></li>\n <li><a href=\"#roadmap\">Roadmap</a></li>\n <li><a href=\"#contributing\">Contributing</a></li>\n <li><a href=\"#license\">License</a></li>\n <li><a href=\"#contact\">Contact</a></li>\n <li><a href=\"#acknowledgments\">Acknowledgments</a></li>\n <li><a href=\"#disclaimer\">Disclaimer</a></li>\n </ol>\n</details>\n\n<!-- ABOUT THE PROJECT -->\n\n## About The Project\n\nThere are many Spotify® clients out there; however, I didn't find one that really suited my needs so I created this one. I want to create a Spotify® CLI which is easy-to-use, packed with useful functionalities and with a sophisticated documentation built-in.\n\nKey features:\n\n- Playlists\n - List information about playlists of the authenticated user in various output formats (Console, JSON)\n - Find duplicate tracks across all playlists\n - Export playlist information in various formats (JSON, HTML template)\n- More coming soon\n\nOf course, this CLI will not serve all needs, especially during development. So I'll be adding more features in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed!\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- GETTING STARTED -->\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.8 or higher\n\n### Installation\n\n```bash\npip install spotify-utils\n```\n\n### Configuration\n\nAll methods require user authorization. You will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/applications) to get the credentials necessary to make authorized calls (a client id and client secret). [Click here](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/) to go to the step-by-step guide for creating a Spotify® application.\n\nThe CLI uses the Authorization Code flow, which the user logs into once. It provides an access token that can be refreshed.\n\nEnvironment variables are being used for configuration. In order for the CLI to function properly you need to provide the following environment variables (use export instead of SET on Linux):\n\n```powershell\nset SPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'\nset SPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'\nset SPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'\n```\n\nIn addition the use of an `.env` file is supported:\n\n```\nSPOTIFY_UTILS_CLIENT_ID='your-spotify-client-id'\nSPOTIFY_UTILS_CLIENT_SECRET='your-spotify-client-secret'\nSPOTIFY_UTILS_REDIRECT_URI='your-app-redirect-url'\n```\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- USAGE EXAMPLES -->\n\n## Usage and examples\n\nIn this section you can find usage examples of the CLI\n\n### List all playlists of the current authenticated user in JSON format\n\n```text\nspotify-utils playlists list --json\n```\n\n```json\n[\n {\n \"collaborative\":false,\n \"description\":\"Car Music Mix 2022 \\ud83d\\udd25 Best Remixes of Popular Songs 2022 EDM, Bass Boosted by Rise Music\",\n \"external_urls\":{\n \"spotify\":\"https://open.spotify.com/playlist/0fM4AkfoGygOHVXjsNB7io\"\n },\n ... more\n }\n]\n```\n\n### Find duplicates across all playlists and display additional details:\n\n```text\nspotify-utils playlists duplicates --verbose\n```\n\nFound 43 duplicate tracks across 20 playlists\n| | name | artists | playlists | track_id |\n|---|----------------|-------------------------|------------------------|------------------------|\n| 0 | Piercing Light | League of Legends, Mako | Rock, Sonos Mainstream | 0163ud7I4Vb0ID5K7WBkq9 |\n| 1 |Edge Of The Earth | Thirty Seconds To Mars| Rock, Pop|0g9IOJwdElaCZEvcqGRP4b |\n| ... |... |... |... |... |\n\n### Export playlist as beautiful HTML file\n\n```text\nspotify-utils playlists export --html\n```\n\n![HTML export](https://gitlab.com/sustineo/spotify-utils/-/raw/main/docs/assets/examples/html_export.png)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ROADMAP -->\n\n## Roadmap\n\n- [ ] Improve help sections of the CLI\n- [ ] Add additional functionality\n\nSee the [open issues](https://gitlab.com/sustineo/spotify-utils/-/issues) for a full list of proposed features (and known issues).\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- CONTRIBUTING -->\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- LICENSE -->\n\n## License\n\nDistributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- CONTACT -->\n\n## Contact\n\nFabian Eulitz - [@sustineo\\_](https://twitter.com/sustineo_) - dev@sustineo.de\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ACKNOWLEDGMENTS -->\n\n## Acknowledgments\n\n- [Typer](https://github.com/tiangolo/typer)\n- [Spotipy](https://github.com/plamere/spotipy)\n- [Vermin](https://github.com/netromdk/vermin)\n- [Shields.io](https://shields.io)\n- [Choose an Open Source License](https://choosealicense.com)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n## Disclaimer\n\nThis project isn\u2019t endorsed by Spotify AB and doesn\u2019t reflect the views or opinions of Spotify AB or anyone officially involved in producing or managing Spotify®\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "An awesome and easy-to-use CLI for various Spotify\u00ae utility tasks",
"version": "1.0.13",
"project_urls": {
"Homepage": "https://gitlab.com/sustineo/spotify-utils",
"Repository": "https://gitlab.com/sustineo/spotify-utils"
},
"split_keywords": [
"spotify",
" cli",
" utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0e2c9a2250eead747270638ce9ce3ac4d0ecf17e305f6dc89d8e1af0c2b79ec1",
"md5": "a64a2bd5d7aac7fda9a1ab013e4fe2c6",
"sha256": "4942c90d04b89c6e09730748aa64b7194a4102aefe154e8f47b174e9485f3af5"
},
"downloads": -1,
"filename": "spotify_utils-1.0.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a64a2bd5d7aac7fda9a1ab013e4fe2c6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 23489,
"upload_time": "2024-06-02T19:42:19",
"upload_time_iso_8601": "2024-06-02T19:42:19.493281Z",
"url": "https://files.pythonhosted.org/packages/0e/2c/9a2250eead747270638ce9ce3ac4d0ecf17e305f6dc89d8e1af0c2b79ec1/spotify_utils-1.0.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "63e0386affcc0f5cfb276be2957a1227166d081cef00e08eb403e693012f7e21",
"md5": "fbcbc53394da878ad34e0b12602819f4",
"sha256": "4c578d241b65c881138450db3960d7d180e1c4b0bf1f48feec492e745153cc74"
},
"downloads": -1,
"filename": "spotify_utils-1.0.13.tar.gz",
"has_sig": false,
"md5_digest": "fbcbc53394da878ad34e0b12602819f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 23533,
"upload_time": "2024-06-02T19:42:21",
"upload_time_iso_8601": "2024-06-02T19:42:21.135423Z",
"url": "https://files.pythonhosted.org/packages/63/e0/386affcc0f5cfb276be2957a1227166d081cef00e08eb403e693012f7e21/spotify_utils-1.0.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-02 19:42:21",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "sustineo",
"gitlab_project": "spotify-utils",
"lcname": "spotify-utils"
}