spotidry


Namespotidry JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/mikeboiko/spotidry
SummaryA boring Spotify CLI client
upload_time2024-09-04 16:26:51
maintainerNone
docs_urlNone
authorMike Boiko
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spotidry

- [Spotidry](#spotidry)
- [Summary](#summary)
- [Installation](#installation)
- [Setup](#setup)
  - [Spotify API](#spotify-api)
  - [Configuration](#configuration)
  - [Tmux Integration](#tmux-integration)
  - [Polybar Integration](#polybar-integration)
- [Usage](#usage)
- [Roadmap](#roadmap)
- [Contributions](#contributions)

# Summary

Spotidry is a real dry & boring command-line client for Spotify.

My main motivation for this project is to have a simple client that allows me to save the currently-playing song to my Liked Tracks. I also added play/pause/next/previous commands.

One of the best use cases for `spotidry` is to integrate it into a polybar/tmux/vim status line. You can also map some key-bindings or foot-pedals to send `spotidry` command.

Below, is a demo video showing some basic `spotidry` commands, along with a tmux integration.

![](https://raw.githubusercontent.com/mikeboiko/spotidry/gif/resources/spotidry.gif)

# Installation

Install `spotidry` from PyPI:

```sh
pip install --user spotidry
```

Note: I have only tested `spotidry` on Linux.

# Setup

## Spotify API

You will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/login) to get the credentials necessary to make authorized calls (a client id and client secret).

You can set your redirect URI to something like "http://127.0.0.1:9999"

## Configuration

Configure your Spotify API variables in `~/.config/spotidry/spotidry.yaml`

```json
client_id: "<ID>"
client_secret: "<SECRET>"
redirect_uri: "http://127.0.0.1:9999"
```

## Tmux Integration

I'm using the popular [.tmux](https://github.com/gpakosz/.tmux) config.

I have configured `spotidry` to update 1/s in `~/.tmux/.tmux.conf.local`:

```
tmux_conf_theme_status_right='#(spotidry 2>/dev/null; sleep 1) #{prefix}#{pairing} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
```

## Polybar Integration

Add the following module to `~/.config/polybar/config.ini`

```
[module/spotidry]
type = custom/script
exec = ~/.local/bin/spotidry
exec-if = test -f ~/.local/bin/spotidry
click-left = ~/.local/bin/spotidry --next 2> /dev/null
click-middle = ~/.local/bin/spotidry --save 2> /dev/null
click-right = ~/.local/bin/spotidry --play 2> /dev/null
interval = 1
```

![Polybar screenshot](https://raw.githubusercontent.com/mikeboiko/spotidry/gif/resources/polybar.png)

# Usage

The first time you run `spotidry`, you will be prompted to authorize the app in your browser.

Run `spotidry --help` to see all commands/options.

```
usage: spotidry [-h] [-v] [-s] [-p] [-n] [--previous]

Spotify CLI client

options:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -s, --save     toggle liked track status
  -p, --play     play/pause track
  -n, --next     play next track
  --previous     play previous track/skip to beggining of current track
```

Note, in order to re-authorize, delete `~/.cache/spotidry.json`... yes, I will provide a CLI flag for this eventually.

# Roadmap

- [x] Save currently playing song to Liked Tracks
- [ ] Add volume controls/status
- [ ] Add output string customization
- [ ] Add socks/https proxy option

# Contributions

Contributions are always welcome!

Feel free to submit an issue or a pull request.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mikeboiko/spotidry",
    "name": "spotidry",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Mike Boiko",
    "author_email": "mike@boiko.ca",
    "download_url": "https://files.pythonhosted.org/packages/f7/54/42cd796c461a05201e03cb19887f85caee0d56ca5c307d82c865db21ca0a/spotidry-0.0.3.tar.gz",
    "platform": null,
    "description": "# Spotidry\n\n- [Spotidry](#spotidry)\n- [Summary](#summary)\n- [Installation](#installation)\n- [Setup](#setup)\n  - [Spotify API](#spotify-api)\n  - [Configuration](#configuration)\n  - [Tmux Integration](#tmux-integration)\n  - [Polybar Integration](#polybar-integration)\n- [Usage](#usage)\n- [Roadmap](#roadmap)\n- [Contributions](#contributions)\n\n# Summary\n\nSpotidry is a real dry & boring command-line client for Spotify.\n\nMy main motivation for this project is to have a simple client that allows me to save the currently-playing song to my Liked Tracks. I also added play/pause/next/previous commands.\n\nOne of the best use cases for `spotidry` is to integrate it into a polybar/tmux/vim status line. You can also map some key-bindings or foot-pedals to send `spotidry` command.\n\nBelow, is a demo video showing some basic `spotidry` commands, along with a tmux integration.\n\n![](https://raw.githubusercontent.com/mikeboiko/spotidry/gif/resources/spotidry.gif)\n\n# Installation\n\nInstall `spotidry` from PyPI:\n\n```sh\npip install --user spotidry\n```\n\nNote: I have only tested `spotidry` on Linux.\n\n# Setup\n\n## Spotify API\n\nYou will need to register your app at [My Dashboard](https://developer.spotify.com/dashboard/login) to get the credentials necessary to make authorized calls (a client id and client secret).\n\nYou can set your redirect URI to something like \"http://127.0.0.1:9999\"\n\n## Configuration\n\nConfigure your Spotify API variables in `~/.config/spotidry/spotidry.yaml`\n\n```json\nclient_id: \"<ID>\"\nclient_secret: \"<SECRET>\"\nredirect_uri: \"http://127.0.0.1:9999\"\n```\n\n## Tmux Integration\n\nI'm using the popular [.tmux](https://github.com/gpakosz/.tmux) config.\n\nI have configured `spotidry` to update 1/s in `~/.tmux/.tmux.conf.local`:\n\n```\ntmux_conf_theme_status_right='#(spotidry 2>/dev/null; sleep 1) #{prefix}#{pairing} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '\n```\n\n## Polybar Integration\n\nAdd the following module to `~/.config/polybar/config.ini`\n\n```\n[module/spotidry]\ntype = custom/script\nexec = ~/.local/bin/spotidry\nexec-if = test -f ~/.local/bin/spotidry\nclick-left = ~/.local/bin/spotidry --next 2> /dev/null\nclick-middle = ~/.local/bin/spotidry --save 2> /dev/null\nclick-right = ~/.local/bin/spotidry --play 2> /dev/null\ninterval = 1\n```\n\n![Polybar screenshot](https://raw.githubusercontent.com/mikeboiko/spotidry/gif/resources/polybar.png)\n\n# Usage\n\nThe first time you run `spotidry`, you will be prompted to authorize the app in your browser.\n\nRun `spotidry --help` to see all commands/options.\n\n```\nusage: spotidry [-h] [-v] [-s] [-p] [-n] [--previous]\n\nSpotify CLI client\n\noptions:\n  -h, --help     show this help message and exit\n  -v, --version  show program's version number and exit\n  -s, --save     toggle liked track status\n  -p, --play     play/pause track\n  -n, --next     play next track\n  --previous     play previous track/skip to beggining of current track\n```\n\nNote, in order to re-authorize, delete `~/.cache/spotidry.json`... yes, I will provide a CLI flag for this eventually.\n\n# Roadmap\n\n- [x] Save currently playing song to Liked Tracks\n- [ ] Add volume controls/status\n- [ ] Add output string customization\n- [ ] Add socks/https proxy option\n\n# Contributions\n\nContributions are always welcome!\n\nFeel free to submit an issue or a pull request.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A boring Spotify CLI client",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/mikeboiko/spotidry/issues",
        "Homepage": "https://github.com/mikeboiko/spotidry"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2055e6cd98f79399e7e58953de3e63dd3ec36c1babd50b0e2f25b002caf12cbc",
                "md5": "bb26f87e40c1415daaf16f43e9ddc997",
                "sha256": "5428a2057060769e7300e5b9da79ee943c4d8919a4321dee73abad4862f011ce"
            },
            "downloads": -1,
            "filename": "spotidry-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb26f87e40c1415daaf16f43e9ddc997",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5994,
            "upload_time": "2024-09-04T16:26:50",
            "upload_time_iso_8601": "2024-09-04T16:26:50.786848Z",
            "url": "https://files.pythonhosted.org/packages/20/55/e6cd98f79399e7e58953de3e63dd3ec36c1babd50b0e2f25b002caf12cbc/spotidry-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f75442cd796c461a05201e03cb19887f85caee0d56ca5c307d82c865db21ca0a",
                "md5": "71f7087e474bc827e66ffc7fbaa3244a",
                "sha256": "0913eabcc4649245d0857be939b4f65a961905685ed90ce1515cd42759d9ad05"
            },
            "downloads": -1,
            "filename": "spotidry-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "71f7087e474bc827e66ffc7fbaa3244a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5292,
            "upload_time": "2024-09-04T16:26:51",
            "upload_time_iso_8601": "2024-09-04T16:26:51.753015Z",
            "url": "https://files.pythonhosted.org/packages/f7/54/42cd796c461a05201e03cb19887f85caee0d56ca5c307d82c865db21ca0a/spotidry-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-04 16:26:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mikeboiko",
    "github_project": "spotidry",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spotidry"
}
        
Elapsed time: 0.65939s