{"id":16384377,"url":"https://github.com/jackcuthbert/slack-fm","last_synced_at":"2025-03-21T02:31:06.643Z","repository":{"id":48272316,"uuid":"220421312","full_name":"JackCuthbert/slack-fm","owner":"JackCuthbert","description":"A tiny self-hosted service that automatically updates your Slack status from your Last.fm profile.","archived":false,"fork":false,"pushed_at":"2021-08-03T19:28:33.000Z","size":2476,"stargazers_count":14,"open_issues_count":27,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T19:52:13.331Z","etag":null,"topics":["lastfm-api","music","self-hosted","slack-api","status-updates"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackCuthbert.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"JackCuthbert"}},"created_at":"2019-11-08T08:27:58.000Z","updated_at":"2023-04-04T11:24:54.000Z","dependencies_parsed_at":"2022-08-23T15:21:19.435Z","dependency_job_id":null,"html_url":"https://github.com/JackCuthbert/slack-fm","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackCuthbert%2Fslack-fm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackCuthbert%2Fslack-fm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackCuthbert%2Fslack-fm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackCuthbert%2Fslack-fm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackCuthbert","download_url":"https://codeload.github.com/JackCuthbert/slack-fm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244725495,"owners_count":20499613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lastfm-api","music","self-hosted","slack-api","status-updates"],"created_at":"2024-10-11T04:11:17.750Z","updated_at":"2025-03-21T02:31:06.343Z","avatar_url":"https://github.com/JackCuthbert.png","language":"TypeScript","funding_links":["https://ko-fi.com/JackCuthbert"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./header.png\" alt=\"slack-fm\" /\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://travis-ci.org/JackCuthbert/slack-fm\"\u003e\n    \u003cimg src=\"https://api.travis-ci.org/JackCuthbert/slack-fm.svg?branch=master\" alt=\"Travis CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/repository/docker/jckcthbrt/slack-fm\"\u003e\n    \u003cimg src=\"https://img.shields.io/docker/pulls/jckcthbrt/slack-fm\" alt=\"Docker Pulls\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://www.producthunt.com/posts/slack-fm?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-slack-fm\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=173963\u0026theme=dark\" alt=\"slack-fm - Self-hosted service to sync Last.fm with your Slack status | Product Hunt Embed\" style=\"width: 250px; height: 54px;\" width=\"250px\" height=\"54px\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\n**Slack-fm** is a tiny self-hosted service that automatically updates your Slack\nstatus from your Last.fm profile. It updates your Slack status when all the\nfollowing conditions are met:\n\n  * the user is not set to \"away\"\n  * a custom status hasn't been set\n  * something is now playing on Last.fm\n  * the time is between 9am and 5pm (configurable)\n  * it's not a weekend (configurable)\n\nTo clear the status it will search Last.fm for the now playing tracks duration\nand use that as the status expiration time. If there is no duration information\nit defaults to a 10 minute expiration (configurable).\n\nIt looks like this:\n\n![Slack Preview](./slack-preview.png)\n\n## Prerequisites\n\n1. Last.fm API key ([get one here](https://www.last.fm/api/account/create))\n1. Last.fm username (this is probably your own username!)\n1. Slack \"legacy\" token ([get one here](https://api.slack.com/custom-integrations/legacy-tokens))\n\n## Configuration\n\nAll configuration is available via environment variables. Values _without_ defaults are required.\n\nVariable | Default | Description\n---------|---------|------\n`LAST_FM_KEY` | | Access to Last.fm data\n`LAST_FM_USERNAME` | | Which user to get track info for\n`SLACK_TOKEN` | | Personal \"legacy\" token for updating your Slack status\n`SLACK_EMOJI` | `:headphones:` | Specify which emoji to use in the status\n`SLACK_SEPARATOR` | `•` | Specify which character to use as a separator between the track name and artist\n`TZ` | `UTC` | Set the timezone\n`ACTIVE_HOURS_START` | `8` | The hour of the day to start updating your Slack status\n`ACTIVE_HOURS_END` | `18` | The hour of the day to stop updating your Slack status\n`UPDATE_INTERVAL` | `1` | The time in minutes to wait until updating your Slack Status\n`UPDATE_WEEKENDS` | `undefined` | Provide any value to enable status updates during the weekend\n`UPDATE_EXPIRATION` | `10` | The time in minutes to use as a default status expiration length\n`SENTRY_DSN` | `undefined` | Optionally provide a Sentry DSN to enable error reporting\n`ENABLE_LOGGING` | `undefined` | Enable verbose console output\n\n## Hosting\n\nI designed this to be easily self hosted, just use the Docker image! It's\nautomatically built and versioned on [Docker Hub](https://hub.docker.com/repository/docker/jckcthbrt/slack-fm/tags) based on GitHub activity.\n\n### Docker run\n\n```bash\ndocker run \\\n  -e SLACK_TOKEN=\u003cYOUR_SLACK_TOKEN\u003e \\\n  -e LAST_FM_KEY=\u003cYOUR_LAST_FM_KEY\u003e \\\n  -e LAST_FM_USERNAME=\u003cLAST_FM_USERNAME\u003e \\\n  -e TZ=\u003cYOUR_TIMEZONE\u003e \\\n  jckcthbrt/slack-fm:latest\n```\n\n### Docker compose\n\n```yml\nversion: '3.7'\nservices:\n  slack_fm:\n    image: jckcthbrt/slack-fm:latest\n    container_name: slack_fm\n    restart: unless-stopped\n    environment:\n      TZ: \u003cYOUR_TIMEZONE\u003e\n      SLACK_TOKEN: \u003cYOUR_SLACK_TOKEN\u003e\n      LAST_FM_KEY: \u003cYOUR_LAST_FM_KEY\u003e\n      LAST_FM_USERNAME: \u003cLAST_FM_USERNAME\u003e\n```\n\n```bash\ndocker-compose up\n```\n\n## Contributing\n\nThis should be relatively simple to set up and run, all that's required is Node\nv12 and some environment variables.\n\n1. Fork this repository and clone your version\n1. Install dependencies with `npm install`\n1. Run the tests with `npm test`\n1. Set up your environment variables as above ([direnv](https://direnv.net) is great for this)\n1. Start the app locally with `npm start`\n1. Commit and push your changes then submit a PR back to this repository\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackcuthbert%2Fslack-fm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackcuthbert%2Fslack-fm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackcuthbert%2Fslack-fm/lists"}