{"id":20710913,"url":"https://github.com/entur/officeplanner","last_synced_at":"2025-08-24T14:42:01.113Z","repository":{"id":38241687,"uuid":"501205119","full_name":"entur/officeplanner","owner":"entur","description":"This python script posts a message in multiple slack channels, and responds to the same message with 5 emojies that represent the weekdays.","archived":false,"fork":false,"pushed_at":"2025-03-17T09:20:00.000Z","size":53,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T07:07:50.148Z","etag":null,"topics":["office","planning","self-hosted","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-08T10:35:46.000Z","updated_at":"2025-02-28T10:22:55.000Z","dependencies_parsed_at":"2024-06-21T00:12:24.875Z","dependency_job_id":"ac812990-a8e9-48cf-8c0b-4d694fe2818e","html_url":"https://github.com/entur/officeplanner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/entur/officeplanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fofficeplanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fofficeplanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fofficeplanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fofficeplanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entur","download_url":"https://codeload.github.com/entur/officeplanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fofficeplanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271888869,"owners_count":24839147,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["office","planning","self-hosted","slack"],"created_at":"2024-11-17T02:13:31.524Z","updated_at":"2025-08-24T14:42:01.066Z","avatar_url":"https://github.com/entur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slack team location planner\n\nWe created a simple solution for getting a overview for planning when people in the team are coming into the office, without the need to introduce any new tools or complex 3rd-party slack applications.\n\nThis python script posts a message in multiple slack channels, and responds to the same message with 5 emojies that represent the weekdays.\n\nThe application is self-hosted and uses a Slack bot token, cron jobs can be created from CI tools like Github Actions / CircleCI Cron, run as a Kubernetes cron job or just be run locallly with python/docker.\n\n![Slack team location planner](https://user-images.githubusercontent.com/29174850/172590122-1ad3a908-efa2-4d91-92f1-d4df5f733e4f.png)\n\n![Screenshot from 2022-06-08 09-03-23](https://user-images.githubusercontent.com/29174850/172578268-302858d3-76cf-4b21-99cd-ac9fc89e2201.png)\n\n## Onbarding\n\nTo add a new channel:\n\n- Type `/invite atoffice` in the channel to grant permissions to the bot.\n- Create a new PR.\n- Enter channel name in `channels.txt`, create commit.\n- Merge PR to main.\n\n## Slack Bot configuration\n\nYou need to create a Slack app yourself at \u003chttps://api.slack.com/apps/\u003e\n\nCreate a new Slack app, customize it as you prefer.\n\nThe bot requires the following **bot token scopes**:\n\n- `chat:write`\n- `reactions:write`\n\nInstall the bot to you slack organization after setting permissions, you will get a new slack bot token afterwards.\n\n## Using the script\n\nAs a pre-requsite, you'll need to have 5 custom emojies representing each day in your slack organization. Without the emojies defined in the list below, the script will fail.\n\n- `:monday:`\n- `:tuesday:`\n- `:wednesday:`\n- `:thursday:`\n- `:friday:`\n\n\u003e Example emojies can be found under the `examples/` folder.\n\nTo run the script you need two things, a `.txt` file containing name of the slack channels and a environment variable for the bot token.\n\n### Python\n\nIf you are using python, then a `channels.txt` file should exist next to the `officeplanner.py` script and the `SLACK_BOT_TOKEN` must be populated in the same shell as the one running python.\n\n### Docker\n\nThe latest docker image is available on github packages, and is updated when a PR is pushed to the `main` branch.\n\n```yaml\nghcr.io/entur/officeplanner:main\n```\n\nMount a `.txt` file to `/app/channels.txt` in the docker container.\n\nPopulate a `SLACK_BOT_TOKEN` environment variable with the token you got when creating the slack app.\n\n## Bump versions manually\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install pip-tools\npip-sync\n# bump versions in the requirements.in file\npip-compile\n# test install the new versions\npip-sync\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Fofficeplanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentur%2Fofficeplanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Fofficeplanner/lists"}