Skip to content

Commit

Permalink
Update the docs (enduser & API)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoirotte committed Feb 5, 2017
1 parent dc0ab94 commit 342baf9
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 261 deletions.
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 22 additions & 60 deletions docs/src/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ file.

Installing Plop as a PHAR archive only involves a few steps:

1. Make sure your installation fulfills all of the `prerequisites`_.
1. Make sure your installation fulfills all of the :ref:`prerequisites <Prerequisites>`.

.. note::

Expand All @@ -33,27 +33,14 @@ Installing Plop as a PHAR archive only involves a few steps:
to run Plop's PHAR archive.

2. Download the PHAR archive for Plop. You can grab the latest
version from https://pear.erebot.net/get/Plop-latest.phar.
You **MUST** also download the public signature for the archive.
The signature for the latest version is available at
https://pear.erebot.net/get/Plop-latest.phar.pubkey.

.. note::

The whole installation process using PHAR archives can be automated
using the following commands:

.. sourcecode:: bash

$ wget https://packages.erebot.net/get/Plop-latest.phar \
https://packages.erebot.net/get/Plop-latest.phar.pubkey
version from https://github.com/Erebot/Plop/releases/latest/.

.. warning::

Even though the command above should work on most installations,
a few known problems may occur due to incompatibilities with certain
PHP features and extensions. To avoid such issues, it is usually a good
idea to check the following items:
The PHAR archive should work properly on most installations.
However, a few issues have been discovered in the past with certain
PHP features and extensions. In case the archive does not work
on your computer,it is usually a good idea to check the following items:

- Make sure ``detect_unicode`` is set to ``Off`` in your :file:`php.ini`.
This is especially important on MacOS where this setting tends to be
Expand Down Expand Up @@ -96,38 +83,18 @@ Installation using `Composer`_
------------------------------

`Composer`_ is a simple dependency resolver / package manager aimed at
PHP 5.3.0 or later. Their website contains extensive documentation on how to
use it in your project to handle dependencies.

With that in mind, using composer to install Plop is very simple and only
involves the following steps:

1. Install `Composer`_ on your machine:

.. sourcecode:: console
PHP 5.3.0 or later.

me@home:~$ curl -s http://getcomposer.org/installer | php
If your project already uses Composer, installing Plop is very simple.
You just need to add a requirement on Plop's package:

2. Create a file named :file:`composer.json` in your current directory.

3. Copy/paste the following snippet in that file and save:

.. sourcecode:: js

{
"require": {
"Erebot/Plop": "*"
}
}

4. Let composer do the rest:

.. sourcecode:: console
.. sourcecode:: bash

me@home:~$ php composer.phar install
me@localhost:~/myproject/$ php /path/to/composer.phar require erebot/plop

You may now proceed to the :ref:`next step <Using Plop>`, which makes
actual use of Plop's logging capabilities.
That's it! Plop is now installed and you may proceed
to the :ref:`next step <Using Plop>`, which makes actual use
of Plop's logging capabilities.


Installation from sources
Expand All @@ -142,9 +109,12 @@ the tools provided by your distribution:
# For apt-based distributions such as Debian or Ubuntu
$ apt-get install git

# For yum-based distributions such as Fedora / RHEL (RedHat)
# For yum-based distributions such as Fedora / RHEL / CentOS
$ yum install git

# For dnf-based distributions such as newer Fedora releases
$ dnf install git

# For urpmi-based distributions such as MES (Mandriva)
$ urpmi git

Expand All @@ -154,10 +124,11 @@ the tools provided by your distribution:
an equivalent git client. Also, make sure that :program:`git` is present
on your account's :envvar:`PATH`. If not, you'll have to replace
:command:`git` by the full path to :file:`git.exe` on every invocation
(e.g. :command:`"C:\Program Files\Git\bin\git.exe" clone ...`)
(e.g. :command:`"C:\\Program Files\\Git\\bin\\git.exe" clone ...`)

Also, make sure you have all the `required dependencies`_ installed as well.
Now, retrieve Plop's code from its repository, using the following command:
Also, make sure you have all the :ref:`required dependencies <Prerequisites>`
installed as well. Now, retrieve Plop's code from its repository,
using the following command:

.. sourcecode:: bash

Expand All @@ -167,17 +138,8 @@ You may now proceed to the :ref:`next step <Using Plop>`, which makes
actual use of Plop's logging capabilities.


.. _`pear`:
http://pear.php.net/package/PEAR
.. _`Pyrus`:
http://pyrus.net/
.. _`PEAR channel`:
https://pear.erebot.net/
.. _`Git for Windows`:
http://code.google.com/p/msysgit/downloads/list
.. _`prerequisites`:
.. _`required dependencies`:
Prerequisites.html
.. _`Composer`:
http://getcomposer.org/

Expand Down
10 changes: 1 addition & 9 deletions docs/src/Prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ Prerequisites
This page assumes that the reader has a working PHP setup (either installed
using some distribution's package manager or manually) and lists
the dependencies required to use Plop.

In case you compiled PHP yourself, you may need to recompile it to include
additional extensions (see the list of required PHP dependencies in the section
entitled `Getting started`_ for more information).

Plop is known to work with most PHP versions.
Plop should run correctly on both Windows (XP or later) and Linux (most distros).
The code is tested using an automated process on Windows Vista (64 bits),
Windows 7 (64 bits), Windows 8.1 (64 bits), Debian Stable (64 bits)
and CentOS 6 (64 bits), as reflected by our `Continuous Integration server`_.

.. contents:: :local:


Expand Down Expand Up @@ -111,7 +106,4 @@ You may also consult the output of ``phpinfo()`` for the same purpose.
.. |---| unicode:: U+02014 .. em dash
:trim:

.. _`Continuous Integration server`:
https://ci.erebot.net/components/

.. vim: ts=4 et
Loading

0 comments on commit 342baf9

Please sign in to comment.