|
8 | 8 | **\*Note**: I am not affiliated with or endorsed by Piazza or Slack in any way. Neither |
9 | 9 | is this bot. |
10 | 10 |
|
11 | | -<<<<<<< HEAD |
12 | | -## Installation (adding to your workspace, and updates) |
13 | | -This app isn't registered through the slack app directory. For now, it's meant |
14 | | -to be used by one workspace per install/instance. To add to your workspace, |
15 | | -we need to do two things: |
16 | | -1. Register a new app in your workspace, and add the appropriate permissions. |
17 | | -2. Set the app up on your host. |
18 | | -3. Once PiazzaBot is up and running, add it to any channel you want to use in. |
19 | | - |
20 | | -### Register the app (3-5 min) |
21 | | -1. _[Register a new app](https://api.slack.com/apps?new_app=1) for your |
22 | | -workspace._ Open that link (in a new window/tab). Choose to register the app |
23 | | -from manifest, then copy & paste everything from the `slack-manifest.json` |
24 | | -file in this repo into the window (make sure it's the `json` window and not |
25 | | -the `yaml` window). Click through and confirm the app. This should take you |
26 | | -to the "basic information" settings page. |
27 | | -2. _Install to workspace._ Click the install to workspace button. |
28 | | -3. _Add the piazza icon._ From the "basic information" page, at the bottom |
29 | | -under "display information", upload the icon from this repo as the app icon. |
30 | | -4. _Generate and save App-Level Token._ Under "App Level Tokens", generate a |
31 | | -token with read/write authorizations. Note the token, as we'll need it to set |
32 | | -the app up on your host. |
33 | | -5. _save bot token._ Finally, note the bot token. In the left-side nav, click |
34 | | -into "Features"->"Oauth & Permissions", and note the Bot User OAuth Token. |
35 | | - |
36 | | -### Host the app (3-5 min) |
37 | | - |
38 | | -1. _Clone this repo._ This is the easiest way to handle updates, since you |
39 | | -can just pull from `main` and restart the app whenever there's an update. |
40 | | -Alternatively, if you need to modify the app for your workspace, fork instead. |
41 | | -2. _Install dependencies._ Set up a virtual environment, and install the |
42 | | -required modules from `requirements.txt`. There's an install script `install.sh` |
43 | | -which contains the commands you'll need to run. Either run each command |
44 | | -individually, or try running the script **make sure python3 is installed on |
45 | | -your system before running**. |
46 | | -3. _Add tokens._ create a `.env` file from `.env-sample` and add the |
47 | | -corresponding tokens you noted when registering the app. |
48 | | -4. _Add Course ID._ Go to your course's dashboard (if you're viewing a question, |
49 | | -click the logo). add the long alphanumeric string to your `.env` as the `COURSE_ID`. |
50 | | -5. create new directory `data/` and a blank file `db.json` inside of it. |
51 | | -6. _Run the app._ Run the app! `python app.py` |
52 | | -======= |
53 | 11 | ## Installation |
54 | 12 | PiazzaBot now supports multiple workspaces, so installation is very straightforward. Just click the button above. |
55 | | ->>>>>>> main |
56 | 13 |
|
57 | 14 | ## Contributing |
58 | 15 | Still thinking about the ideal workflow, however I'd like to keep PM on |
|
0 commit comments