last-shout


Namelast-shout JSON
Version 0.9.1 PyPI version JSON
download
home_pageNone
SummaryPost Last.fm statistics to Twitter and/or Mastodon
upload_time2025-01-28 21:03:18
maintainerBrian Pepple
docs_urlNone
authorBrian Pepple
requires_python<3.14,>=3.11
licenseGPL-3.0-or-later
keywords lastfm twitter python music mastodon
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Last-Shout

[![PyPI - Version](https://img.shields.io/pypi/v/last-shout.svg)](https://pypi.org/project/last-shout/)
[![PyPI - Python](https://img.shields.io/pypi/pyversions/last-shout.svg)](https://pypi.org/project/last-shout/)
[![Pre-Commit](https://img.shields.io/badge/Pre--Commit-Enabled-informational?logo=pre-commit)](https://github.com/pre-commit/pre-commit)

A command line tool to toot a user's top artist statistics from Last.fm to Mastodon.

## Installation

Installing the latest version from Github:

```bash
pipx install last-shout
```

## Getting started

In order to use Last-Shout, you need at a minimum to get authentication keys for [Last.fm](https://www.last.fm) and
Mastodon.

## Help

```bash
 usage: last-shout [-h] [-u USER] [--last-access-key LAST_ACCESS_KEY] [--set-lastfm] [-n NUMBER] [-p PERIOD] [-t] [--bluesky-handle BLUESKY_HANDLE] [--bluesky-password BLUESKY_PASSWORD] [--set-bluesky] [--create-mastodon-app]
                  [--create-mastodon-user] [--toot] [--skeet] [--version]

 A program to post last.fm statistics to Twitter and/or Mastodon.

 options:
  -h, --help            show this help message and exit
  -u, --user USER       Last.fm username (default: None)
  --last-access-key LAST_ACCESS_KEY
                        Last.fm access key (default: None)
  --set-lastfm          Set Last.fm credentials (default: False)
  -n, --number NUMBER   Number of last.fm top artists (default: 10)
  -p, --period PERIOD   The time period over which to retrieve top artists. Options are: overall | 7day | 1month | 3month | 6month | 12month (default: 7day)
  -t, --tweet           Post Last.fm stats to Twitter (default: False)
  --bluesky-handle BLUESKY_HANDLE
                        Bluesky handle (default: None)
  --bluesky-password BLUESKY_PASSWORD
                        Bluesky password (default: None)
  --set-bluesky         Set Bluesky credentials (default: False)
  --create-mastodon-app
                        Create mastodon application (default: False)
  --create-mastodon-user
                        Create Mastodon user token (default: False)
  --toot                Post Last.fm stats to Mastodon (default: False)
  --skeet               Post Last.fm stats to Bluesky (default: False)
  --version             Show the version number and exit
```

## Set Systemd Timer

Once you've set your credentials in the application, most users will want it to run on regular intervals, and if you're
running a Linux distribution with systemd you can set-up a timer to do that.

Start by a systemd unit file for it in `~/.config/systemd/user/last-shout-weekly.service`

```text
[Unit]
Description=Run weekly Last-Shout
After=network.target

[Service]
Type=oneshot
WorkingDirectory=%h
ExecStart=%h/.local/bin/last-shout --toot --skeet

[Install]
WantedBy=default.target
```

Now let's create a time for it in `~/.config/systemd/user/last-shout-weekly.timer`:

```text
[Unit]
Description=Start the Systemd service last-shout-weekly.service every Friday at 11:30

[Timer]
OnCalendar=Fri 11:30
Persistent=true

[Install]
WantedBy=timers.target
```

Then run the following to enable it:

```bash
systemctl --user enable --now last-shout-weekly.timer
```

Then reload the user daemon:

```bash
systemctl --user daemon-reload
```

Now run the following to verify the timer is enabled by running:

```bash
systemctl --user list-timers
```

If everything is alright you should see output similar to this:

```bash
bpepple@faramir:~$ systemctl --user list-timers
NEXT                          LEFT LAST                              PASSED UNIT                         ACTIVATES                     
Tue 2025-01-28 16:53:50 EST    23h Mon 2025-01-27 16:53:50 EST 4min 21s ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Fri 2025-01-31 11:30:00 EST 3 days Fri 2025-01-24 11:30:06 EST            - last-shout-weekly.timer      last-shout-weekly.service
-                                - Mon 2025-01-27 16:50:50 EST     7min ago grub-boot-success.timer      grub-boot-success.service

3 timers listed.

```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "last-shout",
    "maintainer": "Brian Pepple",
    "docs_url": null,
    "requires_python": "<3.14,>=3.11",
    "maintainer_email": "bdpepple@gmail.com",
    "keywords": "lastfm, twitter, python, music, mastodon",
    "author": "Brian Pepple",
    "author_email": "bdpepple@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/31/2f/099cab8a032cdfee3631ee1d0adf6cd6a0435b207528cea89e5109243e97/last_shout-0.9.1.tar.gz",
    "platform": null,
    "description": "# Last-Shout\n\n[![PyPI - Version](https://img.shields.io/pypi/v/last-shout.svg)](https://pypi.org/project/last-shout/)\n[![PyPI - Python](https://img.shields.io/pypi/pyversions/last-shout.svg)](https://pypi.org/project/last-shout/)\n[![Pre-Commit](https://img.shields.io/badge/Pre--Commit-Enabled-informational?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\nA command line tool to toot a user's top artist statistics from Last.fm to Mastodon.\n\n## Installation\n\nInstalling the latest version from Github:\n\n```bash\npipx install last-shout\n```\n\n## Getting started\n\nIn order to use Last-Shout, you need at a minimum to get authentication keys for [Last.fm](https://www.last.fm) and\nMastodon.\n\n## Help\n\n```bash\n usage: last-shout [-h] [-u USER] [--last-access-key LAST_ACCESS_KEY] [--set-lastfm] [-n NUMBER] [-p PERIOD] [-t] [--bluesky-handle BLUESKY_HANDLE] [--bluesky-password BLUESKY_PASSWORD] [--set-bluesky] [--create-mastodon-app]\n                  [--create-mastodon-user] [--toot] [--skeet] [--version]\n\n A program to post last.fm statistics to Twitter and/or Mastodon.\n\n options:\n  -h, --help            show this help message and exit\n  -u, --user USER       Last.fm username (default: None)\n  --last-access-key LAST_ACCESS_KEY\n                        Last.fm access key (default: None)\n  --set-lastfm          Set Last.fm credentials (default: False)\n  -n, --number NUMBER   Number of last.fm top artists (default: 10)\n  -p, --period PERIOD   The time period over which to retrieve top artists. Options are: overall | 7day | 1month | 3month | 6month | 12month (default: 7day)\n  -t, --tweet           Post Last.fm stats to Twitter (default: False)\n  --bluesky-handle BLUESKY_HANDLE\n                        Bluesky handle (default: None)\n  --bluesky-password BLUESKY_PASSWORD\n                        Bluesky password (default: None)\n  --set-bluesky         Set Bluesky credentials (default: False)\n  --create-mastodon-app\n                        Create mastodon application (default: False)\n  --create-mastodon-user\n                        Create Mastodon user token (default: False)\n  --toot                Post Last.fm stats to Mastodon (default: False)\n  --skeet               Post Last.fm stats to Bluesky (default: False)\n  --version             Show the version number and exit\n```\n\n## Set Systemd Timer\n\nOnce you've set your credentials in the application, most users will want it to run on regular intervals, and if you're\nrunning a Linux distribution with systemd you can set-up a timer to do that.\n\nStart by a systemd unit file for it in `~/.config/systemd/user/last-shout-weekly.service`\n\n```text\n[Unit]\nDescription=Run weekly Last-Shout\nAfter=network.target\n\n[Service]\nType=oneshot\nWorkingDirectory=%h\nExecStart=%h/.local/bin/last-shout --toot --skeet\n\n[Install]\nWantedBy=default.target\n```\n\nNow let's create a time for it in `~/.config/systemd/user/last-shout-weekly.timer`:\n\n```text\n[Unit]\nDescription=Start the Systemd service last-shout-weekly.service every Friday at 11:30\n\n[Timer]\nOnCalendar=Fri 11:30\nPersistent=true\n\n[Install]\nWantedBy=timers.target\n```\n\nThen run the following to enable it:\n\n```bash\nsystemctl --user enable --now last-shout-weekly.timer\n```\n\nThen reload the user daemon:\n\n```bash\nsystemctl --user daemon-reload\n```\n\nNow run the following to verify the timer is enabled by running:\n\n```bash\nsystemctl --user list-timers\n```\n\nIf everything is alright you should see output similar to this:\n\n```bash\nbpepple@faramir:~$ systemctl --user list-timers\nNEXT                          LEFT LAST                              PASSED UNIT                         ACTIVATES                     \nTue 2025-01-28 16:53:50 EST    23h Mon 2025-01-27 16:53:50 EST 4min 21s ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service\nFri 2025-01-31 11:30:00 EST 3 days Fri 2025-01-24 11:30:06 EST            - last-shout-weekly.timer      last-shout-weekly.service\n-                                - Mon 2025-01-27 16:50:50 EST     7min ago grub-boot-success.timer      grub-boot-success.service\n\n3 timers listed.\n\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Post Last.fm statistics to Twitter and/or Mastodon",
    "version": "0.9.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/bpepple/last-shout/issues",
        "Homepage": "https://github.com/bpepple/last-shout"
    },
    "split_keywords": [
        "lastfm",
        " twitter",
        " python",
        " music",
        " mastodon"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d5adac92b506cfa5385c5aaf6822c7aa6c67a2ba09bd4bdcd3afe7c2fa3eaa0",
                "md5": "6fa7176798574af8f1ce769d4663a595",
                "sha256": "26e0c0abfb96bf1891e7fbfe104d01d357935aa3455b1573cb20d52253f3ff9a"
            },
            "downloads": -1,
            "filename": "last_shout-0.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6fa7176798574af8f1ce769d4663a595",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.11",
            "size": 20656,
            "upload_time": "2025-01-28T21:03:17",
            "upload_time_iso_8601": "2025-01-28T21:03:17.141169Z",
            "url": "https://files.pythonhosted.org/packages/1d/5a/dac92b506cfa5385c5aaf6822c7aa6c67a2ba09bd4bdcd3afe7c2fa3eaa0/last_shout-0.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "312f099cab8a032cdfee3631ee1d0adf6cd6a0435b207528cea89e5109243e97",
                "md5": "90e22bc0cb6eaa8c5b1ae784e281fdeb",
                "sha256": "ddb2d1a8457dbf14df126c6a72be5284b8b3abce88318eee5b32591c1c07d19f"
            },
            "downloads": -1,
            "filename": "last_shout-0.9.1.tar.gz",
            "has_sig": false,
            "md5_digest": "90e22bc0cb6eaa8c5b1ae784e281fdeb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.11",
            "size": 20828,
            "upload_time": "2025-01-28T21:03:18",
            "upload_time_iso_8601": "2025-01-28T21:03:18.134290Z",
            "url": "https://files.pythonhosted.org/packages/31/2f/099cab8a032cdfee3631ee1d0adf6cd6a0435b207528cea89e5109243e97/last_shout-0.9.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-28 21:03:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bpepple",
    "github_project": "last-shout",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "last-shout"
}
        
Elapsed time: 2.07371s