.. _frontguide_scripts: Script Guide ============ .. _frontguide_scripts_pfpopulate: pfpopulate ---------- After a fresh installation, `pfpopulate` is used to populate database and retrieve content from repositories. Usage ````` .. code-block:: bash (virtualenv)$ pfpopulate [options] [ ...] Available options are: * ``--help``: display help and stop. * ``--drop-tables``: drop existing tables before repopulating. * ``--no-pull``: do not synchronize storages. * ``--reset-index``: delete storage indexes. * ``--no-index``: do not index storages. * ``--log-level=LOGLEVEL``: set log level. Available values are: ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR`` or ``CRITICAL``. The default is ``INFO``. Examples ```````` Just after installing your instance, in development mode: .. code-block:: bash (virtualenv)$ pfpopulate development.ini Drop tables and populate database again: .. code-block:: bash (virtualenv)$ pfpopulate --drop-tables development.ini Populate database with exported XML files: .. code-block:: bash (virtualenv)$ pfpopulate production.ini users.pfusr.xml Use a special ``[app:Foo]`` section: .. code-block:: bash (virtualenv)$ pfpopulate development.ini#Foo .. _frontguide_scripts_xmlconfiguration: XML Configuration Files ``````````````````````` `pfpopulate` reads INI file and fills database according to ``Populate`` section (See :ref:`installation_customization_populate`). It is based on an administrator definition and XML configuration files. XML configuration files are also used in import/export operations. A XML configuration file can contain: * one item, for instance a user defined by ```` tag ; * several items of the same type, for instance users defined by a tag ```` containing ```` tags ; * or an entire configuration, with, in this order, ````, ````, ```` and ````. Users ''''' .. code-block:: xml user1sesame Marc HINDÉLAIBILE user1@prismallia.fr fr projects 5 manager user2sesame Luc SAMBOUR user2@prismallia.fr fr storages user3sesame Anne HORAQUE user3@prismallia.fr fr user4sesame Captain O'CLOCK user4@prismallia.fr test1sesame Édith AVULEUR test1@prismallia.fr 2011-12-01 10.0.0.1 10.0.1.1 Required elements are ``login`` attribute and ```` and ```` tags. Other available elements are: * ``status``: ```` attribute ; available values are ``active`` (default), ``draft`` and ``inactive`` * ````: clear password * ````: a ISO 639 value ; the default value if the value of ``default_locale_name`` option of ``[app:PubliForge]`` section * ````: items per page in lists ; default value is 20 * ````: available values are ``projects`` (default) and ``storages`` * ````: an ISO date for account expiration * ````: tag containing ```` tags to restrict access * ````: tag containing ```` tags ; it defines permission groups (see :ref:`frontreference_permissions`) Groups '''''' .. code-block:: xml Managers can create, destroy and modify different elements of the site. manager Editors can modify different elements of the site. editor editor editor editor editor user2 user user3 Members of this group can browse storages which accept this group. user user4 For ````, attribute ``xml:id`` is required as well as the ``