Gather Scrobble
===============
Inspired by
`gathertown/mod-spotify-as-status <https://github.com/gathertown/mod-spotify-as-status>`__.
Scrobble your ``last.fm`` or ``Spotify`` activity to the ``Gather``
status.
.. figure:: https://github.com/pyanderson/gather-scrobble/blob/main/images/gather-scrobble-at-terminal.gif
:alt: gather-scrobble
gather-scrobble
.. figure:: https://github.com/pyanderson/gather-scrobble/blob/main/images/gather-status.png
:alt: gather-status
gather-status
Installation
------------
.. code:: bash
pip install gather-scrobble
As this library has a CLI, you may have permissions issues when
installing, so try it with the ``--user`` flag:
.. code:: bash
pip install gather-scrobble --user
Documentation
-------------
Configuration
~~~~~~~~~~~~~
Itβs necessary to configure the following credentials:
Gather Credentials
^^^^^^^^^^^^^^^^^^
Access `Gather API keis <https://app.gather.town/apikeys>`__ to get your
``API_KEY``.
last.fm Credentials
^^^^^^^^^^^^^^^^^^^
**If you will scrobble from last.fm.**
Create a `last.fm API
account <https://www.last.fm/api/account/create>`__ to get your
``API_KEY`` and ``API_SECRET``.
Spotify Credentials
^^^^^^^^^^^^^^^^^^^
**If you will scrobble from Spotify.**
Access your `Spotify account
dashboard <https://developer.spotify.com/dashboard/applications>`__ and
create a new app (in case you donβt have one or do not want to use an
existing one). And get your ``CLIENT_ID`` and ``CLIENT_SECRET``.
Also add a redirect URI in the ``Edit Settings``. Suggested value:
``http://127.0.0.1:9090``.
The spotispy will instantiate a server to receive the access token. More
info `here <https://spotipy.readthedocs.io/en/2.22.1/#redirect-uri>`__.
You can configure your credentials in 4 ways and with respective
priorities:
keyring (recommended)
^^^^^^^^^^^^^^^^^^^^^
.. code:: bash
keyring set gather-scrobble GATHER_API_KEY
keyring set gather-scrobble LASTFM_API_KEY
keyring set gather-scrobble LASTFM_API_SECRET
keyring set gather-scrobble LASTFM_USERNAME
keyring set gather-scrobble SPOTIFY_CLIENT_ID
keyring set gather-scrobble SPOTIFY_CLIENT_SECRET
keyring set gather-scrobble SPOTIFY_CLIENT_REDIRECT_URI
environment variables
^^^^^^^^^^^^^^^^^^^^^
.. code:: bash
export GATHER_API_KEY=<GATHER_API_KEY>
export LASTFM_API_KEY=<LASTFM_API_KEY>
export LASTFM_API_SECRET=<LASTFM_API_SECRET>
export LASTFM_USERNAME=<LASTFM_USERNAME>
export SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>
export SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>
export SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>
.ini file
^^^^^^^^^
.. code:: ini
[settings]
GATHER_API_KEY=<GATHER_API_KEY>
LASTFM_API_KEY=<LASTFM_API_KEY>
LASTFM_API_SECRET=<LASTFM_API_SECRET>
LASTFM_USERNAME=<LASTFM_USERNAME>
SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>
SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>
SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>
.env file
^^^^^^^^^
.. code:: dotenv
GATHER_API_KEY=<GATHER_API_KEY>
LASTFM_API_KEY=<LASTFM_API_KEY>
LASTFM_API_SECRET=<LASTFM_API_SECRET>
LASTFM_USERNAME=<LASTFM_USERNAME>
SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>
SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>
SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>
Usage
~~~~~
Help
^^^^
.. code:: bash
$ gather-scrobble --help
Gather Scrobble v0.0.1
Usage:
gather-scrobble start <space_id> [--source SOURCE] [--emojis EMOJIS]
gather-scrobble info
gather-scrobble test <space_id>
Arguments:
<space_id> Gather space id.
Options:
-h --help Show this screen.
-s --source SOURCE Scrobble source, if not defined the tool will try
all available sources configured.
Can be: lastfm, spotify, or any.
If 'any' it will use the first source configured in
the priority: lastfm -> spotify [default: any]
-e --emojis EMOJIS It is possible to customize the emojis, by setting
the list of emojis that will be chosen randomly,
and also you don't like emojis, you can set an
empty string here. [default: πΌπ΅πΆπ§π»π·πΈπΉ]
Info
^^^^
Before starting, check if you have configured the services:
.. code:: bash
$ gather-scrobble info
Gather Scrobble
βββββββββββββ³βββββββββββββββ
β Service β Configured β
β£βββββββββββββββββββββββββββ«
β Gather β True β
β£βββββββββββββββββββββββββββ«
β last.fm β True β
β£βββββββββββββββββββββββββββ«
β Spotify β False β
βββββββββββββ»βββββββββββββββ
Test
^^^^
And test your configuration:
.. code:: bash
$ gather-scrobble test "aAa0aAaAaaA0Aaaa/Name"
Testing connection with Gather...
Success
Testing connection with last.fm...
Success
Testing connection with Spotify...
Success
βββββββββββββ³βββββββββββββ
β Service β Working? β
β£βββββββββββββββββββββββββ«
β Gather β True β
β£βββββββββββββββββββββββββ«
β last.fm β True β
β£βββββββββββββββββββββββββ«
β Spotify β True β
βββββββββββββ»βββββββββββββ
Start
^^^^^
The first time you scrobble for any of the sources, the user will be
asked to authorize your application to access data from the respective
scrobble sources.
.. code:: bash
$ gather-scrobble start "aAa0aAaAaaA0Aaaa/Name"
πΈ - Evil Papagali - Massacration πππππ
FAQ
~~~
- How to get the ``space_id`` value? First enter in the space you want
to scrobble, the ``space_id`` will be in the URL after the ``/app/``.
E.g., in the URL βhttps://app.gather.town/app/aAa0aAaAaaA0Aaaa/Nameβ
the ``space_id`` is ``aAa0aAaAaaA0Aaaa/Name``.
Raw data
{
"_id": null,
"home_page": "https://github.com/pyanderson/gather-scrobble",
"name": "gather-scrobble",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "gather,gather-town,lastfm,spotify,scrobble",
"author": "Anderson de Sousa Lima",
"author_email": "anderson.sl93@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/db/57/c86bc82f535458cb5209902e854a2866ac0a17fa70f3c63b9e73610427c4/gather-scrobble-0.0.2.tar.gz",
"platform": null,
"description": "Gather Scrobble\n===============\n\nInspired by\n`gathertown/mod-spotify-as-status <https://github.com/gathertown/mod-spotify-as-status>`__.\n\nScrobble your ``last.fm`` or ``Spotify`` activity to the ``Gather``\nstatus.\n\n.. figure:: https://github.com/pyanderson/gather-scrobble/blob/main/images/gather-scrobble-at-terminal.gif\n :alt: gather-scrobble\n\n gather-scrobble\n\n.. figure:: https://github.com/pyanderson/gather-scrobble/blob/main/images/gather-status.png\n :alt: gather-status\n\n gather-status\n\nInstallation\n------------\n\n.. code:: bash\n\n pip install gather-scrobble\n\nAs this library has a CLI, you may have permissions issues when\ninstalling, so try it with the ``--user`` flag:\n\n.. code:: bash\n\n pip install gather-scrobble --user\n\nDocumentation\n-------------\n\nConfiguration\n~~~~~~~~~~~~~\n\nIt\u2019s necessary to configure the following credentials:\n\nGather Credentials\n^^^^^^^^^^^^^^^^^^\n\nAccess `Gather API keis <https://app.gather.town/apikeys>`__ to get your\n``API_KEY``.\n\nlast.fm Credentials\n^^^^^^^^^^^^^^^^^^^\n\n**If you will scrobble from last.fm.**\n\nCreate a `last.fm API\naccount <https://www.last.fm/api/account/create>`__ to get your\n``API_KEY`` and ``API_SECRET``.\n\nSpotify Credentials\n^^^^^^^^^^^^^^^^^^^\n\n**If you will scrobble from Spotify.**\n\nAccess your `Spotify account\ndashboard <https://developer.spotify.com/dashboard/applications>`__ and\ncreate a new app (in case you don\u2019t have one or do not want to use an\nexisting one). And get your ``CLIENT_ID`` and ``CLIENT_SECRET``.\n\nAlso add a redirect URI in the ``Edit Settings``. Suggested value:\n``http://127.0.0.1:9090``.\n\nThe spotispy will instantiate a server to receive the access token. More\ninfo `here <https://spotipy.readthedocs.io/en/2.22.1/#redirect-uri>`__.\n\nYou can configure your credentials in 4 ways and with respective\npriorities:\n\nkeyring (recommended)\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: bash\n\n keyring set gather-scrobble GATHER_API_KEY\n keyring set gather-scrobble LASTFM_API_KEY\n keyring set gather-scrobble LASTFM_API_SECRET\n keyring set gather-scrobble LASTFM_USERNAME\n keyring set gather-scrobble SPOTIFY_CLIENT_ID\n keyring set gather-scrobble SPOTIFY_CLIENT_SECRET\n keyring set gather-scrobble SPOTIFY_CLIENT_REDIRECT_URI\n\nenvironment variables\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: bash\n\n export GATHER_API_KEY=<GATHER_API_KEY>\n export LASTFM_API_KEY=<LASTFM_API_KEY>\n export LASTFM_API_SECRET=<LASTFM_API_SECRET>\n export LASTFM_USERNAME=<LASTFM_USERNAME>\n export SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>\n export SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>\n export SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>\n\n.ini file\n^^^^^^^^^\n\n.. code:: ini\n\n [settings]\n GATHER_API_KEY=<GATHER_API_KEY>\n LASTFM_API_KEY=<LASTFM_API_KEY>\n LASTFM_API_SECRET=<LASTFM_API_SECRET>\n LASTFM_USERNAME=<LASTFM_USERNAME>\n SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>\n SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>\n SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>\n\n.env file\n^^^^^^^^^\n\n.. code:: dotenv\n\n GATHER_API_KEY=<GATHER_API_KEY>\n LASTFM_API_KEY=<LASTFM_API_KEY>\n LASTFM_API_SECRET=<LASTFM_API_SECRET>\n LASTFM_USERNAME=<LASTFM_USERNAME>\n SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID>\n SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET>\n SPOTIFY_CLIENT_REDIRECT_URI=<SPOTIFY_CLIENT_REDIRECT_URI>\n\nUsage\n~~~~~\n\nHelp\n^^^^\n\n.. code:: bash\n\n $ gather-scrobble --help\n Gather Scrobble v0.0.1\n Usage:\n gather-scrobble start <space_id> [--source SOURCE] [--emojis EMOJIS]\n gather-scrobble info\n gather-scrobble test <space_id>\n\n Arguments:\n <space_id> Gather space id.\n\n Options:\n -h --help Show this screen.\n -s --source SOURCE Scrobble source, if not defined the tool will try\n all available sources configured.\n Can be: lastfm, spotify, or any.\n If 'any' it will use the first source configured in\n the priority: lastfm -> spotify [default: any]\n -e --emojis EMOJIS It is possible to customize the emojis, by setting\n the list of emojis that will be chosen randomly,\n and also you don't like emojis, you can set an\n empty string here. [default: \ud83c\udfbc\ud83c\udfb5\ud83c\udfb6\ud83c\udfa7\ud83d\udcfb\ud83c\udfb7\ud83c\udfb8\ud83c\udfb9]\n\n \n\nInfo\n^^^^\n\nBefore starting, check if you have configured the services:\n\n.. code:: bash\n\n $ gather-scrobble info\n Gather Scrobble\n \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n \u2503 Service \u2503 Configured \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 Gather \u2503 True \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 last.fm \u2503 True \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 Spotify \u2503 False \u2503\n \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u253b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251b\n\nTest\n^^^^\n\nAnd test your configuration:\n\n.. code:: bash\n\n $ gather-scrobble test \"aAa0aAaAaaA0Aaaa/Name\"\n Testing connection with Gather...\n Success\n Testing connection with last.fm...\n Success\n Testing connection with Spotify...\n Success\n\n \u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n \u2503 Service \u2503 Working? \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 Gather \u2503 True \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 last.fm \u2503 True \u2503\n \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u254b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252b\n \u2503 Spotify \u2503 True \u2503\n \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u253b\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251b\n\nStart\n^^^^^\n\nThe first time you scrobble for any of the sources, the user will be\nasked to authorize your application to access data from the respective\nscrobble sources.\n\n.. code:: bash\n\n $ gather-scrobble start \"aAa0aAaAaaA0Aaaa/Name\"\n \ud83c\udfb8 - Evil Papagali - Massacration \ud834\udd1b\ud834\udd19\ud834\udd18\ud834\udd1b\ud834\udd19\n\nFAQ\n~~~\n\n- How to get the ``space_id`` value? First enter in the space you want\n to scrobble, the ``space_id`` will be in the URL after the ``/app/``.\n E.g., in the URL \u201chttps://app.gather.town/app/aAa0aAaAaaA0Aaaa/Name\u201d\n the ``space_id`` is ``aAa0aAaAaaA0Aaaa/Name``.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Gather WebSocket service client",
"version": "0.0.2",
"split_keywords": [
"gather",
"gather-town",
"lastfm",
"spotify",
"scrobble"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba8c629665d25a4fb24cfd1d4af40e9ddc042789e1889ef57cc0597a7e771936",
"md5": "cbb016a4a10df3dcbdc801bf6243ee22",
"sha256": "1f1e80a9b881b578a2c68f774f77f32ea10e8de94200fa1ceaeac6f574e4874f"
},
"downloads": -1,
"filename": "gather_scrobble-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cbb016a4a10df3dcbdc801bf6243ee22",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9790,
"upload_time": "2023-03-26T20:57:12",
"upload_time_iso_8601": "2023-03-26T20:57:12.473834Z",
"url": "https://files.pythonhosted.org/packages/ba/8c/629665d25a4fb24cfd1d4af40e9ddc042789e1889ef57cc0597a7e771936/gather_scrobble-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db57c86bc82f535458cb5209902e854a2866ac0a17fa70f3c63b9e73610427c4",
"md5": "114d7db23329da8c03c12277035a8279",
"sha256": "d1f285d4117bdbc62886e42ad8edb39ee3785e5bbc2f53184ca383f33eaa83e9"
},
"downloads": -1,
"filename": "gather-scrobble-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "114d7db23329da8c03c12277035a8279",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10554,
"upload_time": "2023-03-26T20:57:14",
"upload_time_iso_8601": "2023-03-26T20:57:14.349319Z",
"url": "https://files.pythonhosted.org/packages/db/57/c86bc82f535458cb5209902e854a2866ac0a17fa70f3c63b9e73610427c4/gather-scrobble-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-26 20:57:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "pyanderson",
"github_project": "gather-scrobble",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gather-scrobble"
}