Skip to content

Commit 059085b

Browse files
committed
docs: Add install documentation
1 parent 07df4bb commit 059085b

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ New releases will be pushed from **python3.4** to **master** whenever we have a
2020

2121
Firstly, CloudBot will only run on **Python 3.4 or higher**. Because we use the asyncio module, you will not be able to use any other versions of Python.
2222

23-
To install CloudBot on *nix (linux, etc), see [here](https://github.com/CloudBotIRC/CloudBot/wiki/Installing-on-*nix)
23+
To install CloudBot on *nix (linux, etc), see [here](docs/installing/nix.md)
2424

25-
To install CloudBot on Windows, see [here](https://github.com/CloudBotIRC/CloudBot/wiki/Installing-on-Windows)
25+
To install CloudBot on Windows, see [here](docs/installing/win.md)
2626

2727

2828
### Running CloudBot
@@ -59,7 +59,7 @@ If you think you have found a bug/have a idea/suggestion, please **open a issue*
5959

6060
## Changelog
6161

62-
See [CHANGELOG.md](https://github.com/CloudBotIRC/CloudBot/blob/master/CHANGELOG.md)
62+
See [CHANGELOG.md](CHANGELOG.md)
6363

6464
## License
6565

docs/installing/nix.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
### Downloading
2+
3+
#### Archive
4+
Download CloudBot from [https://github.com/TotallyNotRobots/CloudBot/zipball/gonzobot.zip](https://github.com/TotallyNotRobots/CloudBot/archive/gonzobot.zip) and unzip, or execute the following commands:
5+
```bash
6+
curl -Ls https://github.com/TotallyNotRobots/CloudBot/archive/gonzobot.zip > CloudBot.zip
7+
unzip CloudBot.zip
8+
cd CloudBot-gonzobot
9+
```
10+
11+
#### Git
12+
13+
Alternately, you can also clone CloudBot by using:
14+
```bash
15+
git clone https://github.com/TotallyNotRobots/CloudBot.git
16+
cd CloudBot
17+
```
18+
19+
### Installing Dependencies
20+
21+
All of CloudBot's python dependencies are stored in the `requirements.txt` file, and can be installed with pip.
22+
23+
But first, you will need `git`, `python3.5-dev` and `libenchant1c2a`, `libxml2-dev`, `libxslt-dev` and `zlib1g-dev`. Install these with your system's package manager.
24+
25+
For example, on a Debian-based system, you could use:
26+
```bash
27+
[sudo] apt-get install -y python3.5-dev git libenchant-dev libxml2-dev libxslt-dev zlib1g-dev
28+
```
29+
30+
You will also need to install `pip`, which can be done by following [this guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#installing-pip)
31+
32+
It is also recommended that you create a virtual environment for the bot to isolate it from system library updates. First, [install the venv package](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#installing-virtualenv) if required, and then [create the virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment)
33+
34+
We will refer to the virtual environment directory as `<VENV_DIR>` from here on.
35+
36+
Once the virtual environment is created, [activate it](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#activating-a-virtual-environment).
37+
38+
Finally, install the python dependencies using `pip` using the following command in the CloudBot directory:
39+
```bash
40+
pip install -Ur requirements.txt
41+
```
42+
43+
Now you are ready to run the bot! This can be done simply by executing the cloudbot module like so
44+
```bash
45+
python -m cloudbot
46+
```
47+
or without activating the virtual environment, use
48+
```bash
49+
<VENV_DIR>/bin/python -m cloudbot
50+
```

docs/installing/win.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Getting Ready
2+
3+
We recommend that use you use a *unix system to run CloudBot in production, or Vagrant when developing CloudBot. However, it is possible to install natively on Windows.
4+
5+
First, make sure you have Python 3.5 installed. It can be downloaded at [python.org](https://www.python.org/downloads/release/python-341/).
6+
7+
Next, you need to install `pip`.
8+
9+
You can usually install `pip` via the following python command in cmd:
10+
```
11+
python3 -m ensurepip
12+
```
13+
14+
If that doesn't work, follow [this guide](http://simpledeveloper.com/how-to-install-easy_install/) and then run `easy_install pip` in cmd.
15+
16+
### Downloading
17+
18+
Download CloudBot from [https://github.com/TotallyNotRobots/CloudBot/zipball/gonzobot.zip](https://github.com/TotallyNotRobots/CloudBot/archive/gonzobot.zip).
19+
20+
Unzip the resulting file, and continue to read this document.
21+
22+
### Installing Dependencies
23+
24+
Before you can run the bot, you need to install a few Python dependencies. All of CloudBot's dependencies are stored in the `requirements.txt` file.`
25+
26+
These can be installed with `pip` (The Python package manager) by running the following command in the bot directory:
27+
28+
pip install -r requirements.txt
29+
30+
Because installing `lxml` can be quite difficult on Windows (you may get errors running the command above) due to it requiring compilation, you can find a pre-built distribution at [http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml](http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml)

0 commit comments

Comments
 (0)