Skip to content

Commit

Permalink
docs: Add install documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed Nov 12, 2019
1 parent 07df4bb commit 059085b
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ New releases will be pushed from **python3.4** to **master** whenever we have a

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.

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

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


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

## Changelog

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

## License

Expand Down
50 changes: 50 additions & 0 deletions docs/installing/nix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### Downloading

#### Archive
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:
```bash
curl -Ls https://github.com/TotallyNotRobots/CloudBot/archive/gonzobot.zip > CloudBot.zip
unzip CloudBot.zip
cd CloudBot-gonzobot
```

#### Git

Alternately, you can also clone CloudBot by using:
```bash
git clone https://github.com/TotallyNotRobots/CloudBot.git
cd CloudBot
```

### Installing Dependencies

All of CloudBot's python dependencies are stored in the `requirements.txt` file, and can be installed with pip.

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.

For example, on a Debian-based system, you could use:
```bash
[sudo] apt-get install -y python3.5-dev git libenchant-dev libxml2-dev libxslt-dev zlib1g-dev
```

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)

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)

We will refer to the virtual environment directory as `<VENV_DIR>` from here on.

Once the virtual environment is created, [activate it](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#activating-a-virtual-environment).

Finally, install the python dependencies using `pip` using the following command in the CloudBot directory:
```bash
pip install -Ur requirements.txt
```

Now you are ready to run the bot! This can be done simply by executing the cloudbot module like so
```bash
python -m cloudbot
```
or without activating the virtual environment, use
```bash
<VENV_DIR>/bin/python -m cloudbot
```
30 changes: 30 additions & 0 deletions docs/installing/win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Getting Ready

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.

First, make sure you have Python 3.5 installed. It can be downloaded at [python.org](https://www.python.org/downloads/release/python-341/).

Next, you need to install `pip`.

You can usually install `pip` via the following python command in cmd:
```
python3 -m ensurepip
```

If that doesn't work, follow [this guide](http://simpledeveloper.com/how-to-install-easy_install/) and then run `easy_install pip` in cmd.

### Downloading

Download CloudBot from [https://github.com/TotallyNotRobots/CloudBot/zipball/gonzobot.zip](https://github.com/TotallyNotRobots/CloudBot/archive/gonzobot.zip).

Unzip the resulting file, and continue to read this document.

### Installing Dependencies

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.`

These can be installed with `pip` (The Python package manager) by running the following command in the bot directory:

pip install -r requirements.txt

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 comments on commit 059085b

Please sign in to comment.