Change the README to use pipenv
This commit is contained in:
parent
c1d5701d0e
commit
2060f4fc87
20
README.md
20
README.md
|
@ -6,27 +6,27 @@ Want to create a custom Slack emoji for every pokemon? Slack doesn't currently e
|
|||
|
||||
## Creating Emoji
|
||||
|
||||
You'll need Python and `pip` to get started. I recommend using [virtualenv](https://virtualenv.pypa.io/en/latest/) and possibly [virtualenvwrapper](https://virtualenvwrapper.readthedocs.org/en/latest/) as well. Standard best-practice Python stuff.
|
||||
You'll need Python and `pip` to get started. I recommend using [pipenv](https://docs.pipenv.org/).
|
||||
|
||||
Prepare a directory that contains an image for each emoji you want to create. Remember to respect Slack's specifications for valid emoji images: no greater than 128px in width or height, no greater than 64K in image size. The base filename of each image file should be the name of the emoji (the bit you'll type inside `:` to display it).
|
||||
|
||||
Clone the project, create a new virtualenv, and install the prereqs:
|
||||
Clone the project and install its prereqs:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/smashwilson/slack-emojinator.git
|
||||
cd slack-emojinator
|
||||
mkvirtualenv slack-emojinator
|
||||
pip install -r requirements.txt
|
||||
pipenv install
|
||||
```
|
||||
|
||||
You'll need to provide your team name (the bit before ".slack.com" in your admin URL) and your session cookie (grab it from your browser). Copy `.env.example`, fill them in, and source it.
|
||||
|
||||
To grab your Slack session cookie:
|
||||
* [Open your browser's dev tools](http://webmasters.stackexchange.com/a/77337) and copy the value of `document.cookie`
|
||||
* Go to the Network tab
|
||||
* Re-load page like https://{teamname}.slack.com/customize/emoji
|
||||
* Find call to `emoji` (it is most likely the very top request)
|
||||
* Scroll to `Request-Headers` and copy the value of Cookie and add to .env
|
||||
|
||||
* [Open your browser's dev tools](http://webmasters.stackexchange.com/a/77337) and copy the value of `document.cookie`.
|
||||
* Go to the Network tab.
|
||||
* Re-load your workspace's `https://{teamname}.slack.com/customize/emoji` page.
|
||||
* Find the call to `emoji` (it is most likely the very top request).
|
||||
* Scroll to `Request-Headers`, copy the value of "Cookie," and add to your `.env` file.
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
|
@ -37,7 +37,7 @@ source .env
|
|||
Now you're ready to go. Use a shell glob to invoke `upload.py` with the emoji files as ARGV:
|
||||
|
||||
```bash
|
||||
python upload.py ${EMOJI_DIR}/*.png
|
||||
pipenv run upload.py ${EMOJI_DIR}/*.png
|
||||
```
|
||||
|
||||
:sparkles:
|
||||
|
|
Loading…
Reference in New Issue