Skip to content

Commit

Permalink
Various improvements to the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoirotte committed Dec 27, 2016
1 parent 2c38031 commit c0b2c9b
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 46 deletions.
6 changes: 2 additions & 4 deletions docs/src/Configuration.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.. _`configuration`:

Erebot's configuration
======================
Configuration
=============

Erebot's configuration is stored in an XML file.
This file is usually called :file:`Erebot.xml` but can be renamed
Expand Down
47 changes: 14 additions & 33 deletions docs/src/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ There are several ways to achieve that. Each method is described below.
You cannot mix the different methods. Especially, **you must use the same
method to install modules as the one you selected for Erebot itself**.

.. note::

We recommend using the `PHAR installation`_ method
or the `Composer installation`_ method, depending on
whether your project already uses `Composer`_ or not.


.. _`PHAR installation`:

Installation using PHAR archives
Expand All @@ -28,13 +21,13 @@ file. However, PHAR's archive does not contain any module.
Thus, to get a working installation, you must install additional Erebot
modules. At a minimum, this includes the following modules:

- `Erebot_Module_IrcConnector`_
- `Erebot_Module_AutoConnect`_
- `Erebot_Module_PingReply`_
- `Erebot_Module_AutoConnect <./projects/autoconnect/>`_
- `Erebot_Module_IrcConnector <./projects/ircconnector/>`_
- `Erebot_Module_PingReply <./projects/pingreply/>`_

Installing Erebot from a PHAR archive involves only a few steps:

- Make sure your installation fulfills all of the `prerequisites`_.
- Make sure your installation fulfills all of the :doc:`/Prerequisites`.

.. note::

Expand All @@ -53,9 +46,9 @@ Installing Erebot from a PHAR archive involves only a few steps:
- Download the PHAR archive and its signature for each of the following
modules:

- `Erebot_Module_AutoConnect <github.com/Erebot/Module_AutoConnect/releases/latest/>`
- `Erebot_Module_IrcConnector <github.com/Erebot/Module_IrcConnector/releases/latest/>`
- `Erebot_Module_PingReply <github.com/Erebot/Module_PingReply/releases/latest/>`
- `Erebot_Module_AutoConnect <https://github.com/Erebot/Module_AutoConnect/releases/latest/>`_
- `Erebot_Module_IrcConnector <https://github.com/Erebot/Module_IrcConnector/releases/latest/>`_
- `Erebot_Module_PingReply <https://github.com/Erebot/Module_PingReply/releases/latest/>`_

.. note::

Expand All @@ -75,12 +68,12 @@ Your tree should now look like this:
* :file:`Erebot-{X.Y.Z}.phar`
* :file:`Erebot-{X.Y.Z}.phar.pubkey`
* modules/
* :file:`Module_AutoConnect-{X.Y.Z}.phar`
* :file:`Module_AutoConnect-{X.Y.Z}.phar.pubkey`
* :file:`Module_IrcConnector-{X.Y.Z}.phar`
* :file:`Module_IrcConnector-{X.Y.Z}.phar.pubkey`
* :file:`Module_PingReply-{X.Y.Z}.phar`
* :file:`Module_PingReply-{X.Y.Z}.phar.pubkey`
* :file:`Erebot_Module_AutoConnect-{X.Y.Z}.phar`
* :file:`Erebot_Module_AutoConnect-{X.Y.Z}.phar.pubkey`
* :file:`Erebot_Module_IrcConnector-{X.Y.Z}.phar`
* :file:`Erebot_Module_IrcConnector-{X.Y.Z}.phar.pubkey`
* :file:`Erebot_Module_PingReply-{X.Y.Z}.phar`
* :file:`Erebot_Module_PingReply-{X.Y.Z}.phar.pubkey`
* *eventually, additional PHAR archives with their signature*

Once the PHAR archives have been retrieved, you may wish to change file
Expand Down Expand Up @@ -170,7 +163,7 @@ Final steps
-----------

Once Erebot (core files + a few modules) has been installed, you can
`write a configuration file`_ for Erebot (usually named :file:`Erebot.xml`).
`write a configuration file <Configuration.html>`_ for Erebot (usually named :file:`Erebot.xml`).

When this is done, the bot can be started, assuming that PHP can be found
in your :envvar:`PATH` using one of the following commands.
Expand Down Expand Up @@ -211,18 +204,6 @@ Use the following command to get help on those options.
This way, if Erebot was installed using PHAR archives, the bot can be
started simply by double-clicking on :file:`Erebot-{version}.phar`.


.. _`prerequisites`:
.. _`required dependencies`:
Prerequisites.html
.. _`Erebot_Module_AutoConnect`:
projects/autoconnect/
.. _`Erebot_Module_IrcConnector`:
/projects/ircconnector/
.. _`Erebot_Module_PingReply`:
/projects/pingreply/
.. _`write a configuration file`:
Configuration.html
.. _`Composer`:
https://getcomposer.org/

Expand Down
2 changes: 0 additions & 2 deletions docs/src/Prerequisites.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _`prerequisites`:

Prerequisites
=============

Expand Down
54 changes: 54 additions & 0 deletions docs/src/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Usage

.. program:: Erebot

Options
-------

.. option:: -c <FILE>, --config <FILE>

Use the given configuration <FILE> instead of the default :file:`Erebot.xml`.
Expand Down Expand Up @@ -47,3 +50,54 @@ Usage

Display the bot's version and exit.


Environment variables
---------------------

Several environment variables related to language settings control the way
the bot produces its output. The first variable to appear in the environment
takes precedence over the others.

.. envvar:: LANGUAGE

Defines the system's supported languages, as a colon-separated list
of country names with optional regions.
Eg.

.. sourcecode:: shell

LANGUAGE=en_US:en

.. envvar:: LC_ALL

Defines supported languages for various types of formatting operations,
like message formatting, date/time formatting and so on.
Setting this variable is equivalent to setting each of the other
``LC_*`` variables individually to the same value.

.. envvar:: LC_MESSAGES

Defines supported languages when outputting textual messages.

.. envvar:: LC_MONETARY

Defines supported languages when outputting monetary values.

.. envvar:: LC_TIME

Defines supported languages when outputting dates/times.

.. envvar:: LC_NUMERIC

Defines supported languages when outputting other numeric values
(eg. floating-point values).

.. envvar:: LANG

Defines the system's supported languages and encodings, as a colon-separated
list of country names with their optional region and their encoding.
Eg.

.. sourcecode:: shell

LANG=en_US.utf8
16 changes: 9 additions & 7 deletions docs/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ PHP 5.3.3 onwards.
You can find more information about this project on the following websites:

* https://www.erebot.net/ |---| The official website.
* https://github.com/Erebot/Erebot/ |---| Project page on GitHub.
* https://packages.erebot.net/ |---| Repository for the project.
* https://ci.erebot.net/ |---| Our Continuous Integration server.
* http://travis-ci.org/Erebot/Erebot |---| Travis Continuous Integration.
* https://github.com/Erebot/Erebot/ |---| Source repository.
* http://travis-ci.org/Erebot/Erebot |---| Continuous Integration.

Contents:

.. toctree::
:maxdepth: 2
:maxdepth: 1

Prerequisites
Installation
Expand All @@ -35,9 +33,9 @@ Contents:
generic/Installation


Badges: |badges-travis| |badges-versioneye| |badges-coveralls|
Badges: |badges-travis| |badges-versioneye| |badges-coveralls| |badges-hhvm|

.. |badges-travis| image:: https://travis-ci.org/Erebot/Erebot.png?branch=master
.. |badges-travis| image:: https://travis-ci.org/Erebot/Erebot.svg?branch=master
:alt: Travis-CI (unknown)
:target: http://travis-ci.org/Erebot/Erebot

Expand All @@ -49,6 +47,10 @@ Badges: |badges-travis| |badges-versioneye| |badges-coveralls|
:alt: Coveralls (unknown)
:target: https://coveralls.io/r/Erebot/Erebot?branch=master

.. |badges-hhvm| image:: http://php-eye.com/badge/Erebot/Erebot/hhvm.svg
:alt: Tested on HHVM (unknown)
:target: https://php-eye.com/package/erebot/erebot

.. |---| unicode:: U+02014 .. em dash
:trim:

Expand Down

0 comments on commit c0b2c9b

Please sign in to comment.