Installation
=============

If you are using zc.buildout and the plone.recipe.zope2instance
recipe to manage your project, just do this:

* Add ``currency.converter`` to the list of eggs to install, e.g.:

    |    [buildout]
    |    eggs =
    |        currency.converter

* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:

    |    [instance]
    |    recipe = plone.recipe.zope2instance
    |    zcml =
    |        currency.converter

* Re-run buildout, e.g. with:

    |    $ ./bin/buildout

Setting Time Server
-------------------------
To fetch the currency data regularly like every day, describe to the instance section of buildout.cfg the next way.

    |    [instance]
    |    zope-conf-additional =
    |        <clock-server>
    |          method /your_portal/@@get-currency
    |          period 86400
    |          user admin
    |          password admin_pass
    |          host localhost
    |        </clock-server>

* Change your_portal to your plone site id
* Period is seconds between eache fetch of the currency data. 86400 seconds are the 24 hour. The data is usually updated daily on week days.
* Describe admin name to admin and its password to admin_pass.
* host is host name of your server.

Upgrading/reinstalling
--------------------------------
When you reinstall or upgrade to new version, the persisted data is not migrated to new environment, so please visit your_portal/@@manage-currency after reinstall or upgrade to get the current data or if you have set the time server, you can wait till the server fetches those values for you.
