{ "info": { "author": "Nolan Conaway", "author_email": "nolanbconaway@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: MacOS", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# shlack\n\n[![GitHub Actions status](https://github.com/nolanbconaway/shlack/workflows/Main%20Workflow/badge.svg)](https://github.com/nolanbconaway/shlack/actions)\n[![codecov](https://codecov.io/gh/nolanbconaway/shlack/branch/master/graph/badge.svg?token=uKrscnbfoV)](https://codecov.io/gh/nolanbconaway/shlack)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/shlack)](https://pypi.org/project/shlack/)\n[![PyPI](https://img.shields.io/pypi/v/shlack)](https://pypi.org/project/shlack/)\n\nshlack is a command line tool which sends slack messages. It is a lot like [jarjar](https://github.com/AusterweilLab/jarjar) but with [a few (important?) differences](shlack-and-jarjar.md).\n\n## Quickstart\n\nFirst, [set up a slack app](#setting-up-a-slack-app) for shlack and have the oauth API token handy.\n\nThen install shlack to your python 2.7, 3.5, 3.6, or 3.7 environment:\n\n``` sh\npip install shlack\n```\n\nOr\n\n``` sh\npip install git+https://github.com/nolanbconaway/shlack.git\n```\n\nExport your slack oauth token:\n\n``` sh\n$ export SLACK_OAUTH_API_TOKEN='...'\n```\n\nNow send yourself a message! shlack will read your token from the variable you exported.\n\n``` sh\n$ shlack message 'Hello!' --channel '@nolan'\n```\n\nIn your slack workspace:\n\n

\n \n

\n\nAdd an attachment:\n\n``` sh\n$ shlack message 'Hello!' -c '@nolan' --attach 'Date' \"$(date)\"\n```\n\n

\n \n

\n\nshlack can also send you a notification after a long-running task has completed.\n\n``` sh\n$ shlack task 'sleep 10 && echo done' --channel '@nolan'\n```\n\n

\n \n

\n\nRunning that will spin up a process detached from your terminal session, so you can grab some lunch :-).\n\nNeed help? Just ask:\n\n``` sh\n$ shlack task --help\n```\n\n## Setting up a Slack App\n\nStart by heading over to the [apps page](https://api.slack.com/apps) and hit the \"create new app\" button.\n\nName your app whatever you want (I called mine, `shlack` ) and assign it to your workspace of choice if you have multiple workspaces. Then hit \"create app\".\n\nSlack should take you to an app management page. Hit the \"Permissions\" button (or the \"OAuth & Permissions\" tab on the sidebar).\n\nScroll down to the \"Scopes\" section. Add the following two scopes:\n\n1. `chat:write:bot` . Shlack needs this to post messages.\n2. `files:write:user` . Shlack needs this to upload files when e.g., your task output is very long.\n\nHit the \"Save Changes\" button once those two scopes are selected. Then scroll to the top of the page and hit the \"Install App to Workspace\" button. Slack will ask you to allow the app to access the scopes you set up.\n\nThe page will refresh and at the top you'll find a new OAuth Access Token. Copy that and put it somewhere for later.\n\nNow you can style the app as you see fit :). Hit the \"Basic Information\" tab at the top of the sidebar and scroll down to the \"Display Information\" section. Style to your liking. I use this photo which I found by searching \"dog with cowboy hat\" on the internet.\n\n

\n \n

\n\nThen you're done! Enjoy your shlack app.\n\n## Todo\n\n* [ ] Write some tooling to help users through errors when their display names are not the same as their usernames. Maybe a command to search users. Maybe just some documentation.\n* [ ] Surface child PID to user in `shlack task` .\n* [ ] get URLs in attachments to unfurl.\n* [ ] migrate to blocks https://api.slack.com/messaging/attachments-to-blocks\n* [x] pypi\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nolanbconaway/shlack", "keywords": "slack,cli", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "shlack", "package_url": "https://pypi.org/project/shlack/", "platform": "", "project_url": "https://pypi.org/project/shlack/", "project_urls": { "Homepage": "https://github.com/nolanbconaway/shlack" }, "release_url": "https://pypi.org/project/shlack/0.1.1/", "requires_dist": [ "slacker", "click" ], "requires_python": "", "summary": "Yet another slack command line interface.", "version": "0.1.1" }, "last_serial": 5935959, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0792d42e34ac91c737a1984891bb1971", "sha256": "a37c69f32cab6e5156e2d34589de005be656a13441676a73e7f4d0fe9e8198ee" }, "downloads": -1, "filename": "shlack-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0792d42e34ac91c737a1984891bb1971", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8840, "upload_time": "2019-10-06T20:27:33", "url": "https://files.pythonhosted.org/packages/a6/84/c2ac7059fdf6f2132ea089ec46d1bd199a078f4c78dd06cbc5bb650ee284/shlack-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4063d9ca4f4dfaf760c79fc593ebc8f", "sha256": "f9b218dd06a8a713d6373198b02395365b2cea7b717b19bd1173aaa3e30cd29b" }, "downloads": -1, "filename": "shlack-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b4063d9ca4f4dfaf760c79fc593ebc8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8761, "upload_time": "2019-10-06T20:27:35", "url": "https://files.pythonhosted.org/packages/c3/71/e074d08e5351c6d3f87350ee19bfc8308f3cf13a1ec68528bd86469d1135/shlack-0.0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7341eda0ada7694943ad0772720e2fcc", "sha256": "8648fdeebf552fab864001f0cd6b5c3c05e6a30ce0b44dc4d43ceea3c548f402" }, "downloads": -1, "filename": "shlack-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7341eda0ada7694943ad0772720e2fcc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8902, "upload_time": "2019-10-06T20:47:24", "url": "https://files.pythonhosted.org/packages/e9/80/add2e6fa7b27a7a4878506a531799b7c648dd515e9451f53c77c4ec0b29f/shlack-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbd8a0431234612f1a525042b80a30fe", "sha256": "9d9220f142616d5393e78d01aae04a7d0a50f4de65c8063a5818c5535276efeb" }, "downloads": -1, "filename": "shlack-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dbd8a0431234612f1a525042b80a30fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8789, "upload_time": "2019-10-06T20:47:25", "url": "https://files.pythonhosted.org/packages/48/f8/77513064c4c4274dec5132fd517e8d522c62615f6c7b203c86c9eeda598e/shlack-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7341eda0ada7694943ad0772720e2fcc", "sha256": "8648fdeebf552fab864001f0cd6b5c3c05e6a30ce0b44dc4d43ceea3c548f402" }, "downloads": -1, "filename": "shlack-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7341eda0ada7694943ad0772720e2fcc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8902, "upload_time": "2019-10-06T20:47:24", "url": "https://files.pythonhosted.org/packages/e9/80/add2e6fa7b27a7a4878506a531799b7c648dd515e9451f53c77c4ec0b29f/shlack-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbd8a0431234612f1a525042b80a30fe", "sha256": "9d9220f142616d5393e78d01aae04a7d0a50f4de65c8063a5818c5535276efeb" }, "downloads": -1, "filename": "shlack-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dbd8a0431234612f1a525042b80a30fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8789, "upload_time": "2019-10-06T20:47:25", "url": "https://files.pythonhosted.org/packages/48/f8/77513064c4c4274dec5132fd517e8d522c62615f6c7b203c86c9eeda598e/shlack-0.1.1.tar.gz" } ] }