
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
If you use slack, it's sometimes useful to get an idea of the geographic distribution of members.
And because we're online, while geographic distance is important to know it's often the timezone that's more relevant for working out when might be sensible to contact someone, or see how a commmunity is distributed.
This is what slack timezoner does. Right now all it does is print out a count of members in your community, by timezone.
## Usage
You need to create an app for a single team. See below for more
https://slack.dev/python-slackclient/auth.html#
You can create an app at the link below:
This is detailed in slack's extensive documentation. You need a Web API token
https://api.slack.com/web#authentication
If it helps it should be visible at a link that looks like the pattern below, and it will be called OAuth Access Token
in the web UI:
https://api.slack.com/apps/YOUR_APP_ID/oauth
This project includes a minimal, single-file Django app, to serve the summary as JSON, to display using some charting or tabular renderer.
python ./minimal.py runserver
Alternatively, you can also import the library and use it programatically in python code:
import slack_timezoner.group_by_timezones
tzc = group_by_timezones.TimeZoneCounter()
# returns a Counter datastructure
res = tzc.summary()
This was thrown together in a hurry, and I'd like to adapt this to allow running the same kind of summaries for any public channel in slack workspace.
You can list all the channels in workspace with this API call: https://api.slack.com/methods/conversations.list
Once you have that, you can get a list of the members like so: https://api.slack.com/methods/conversations.members
This returns a list of member ids like so:
{
"ok": true,
"members": [
"U023BECGF",
"U061F7AUR",
"W012A3CDE"
],
"response_metadata": {
"next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ=="
}
}
You can then look up the timezones, with this call to recontruct a datastructure similar to the one used in the TimeZoneCounter already.
https://slack.dev/python-slackclient/basic_usage.html#listing-team-members
This is currently used in the ClimateAction.tech slack. If you're interested in helping out, please file an issue, or join the slack there.
You can join the link below:
FAQs
A toy app to give a breakdown of timezone distribution in a slack workgroup
We found that slack-timezoner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.