--- a/src/source/appinstall.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/appinstall.rst Wed May 09 17:33:41 2018 +0200
@@ -229,7 +229,7 @@
.. _zodbinit:
Initializing the ZODB database
-==============================
+------------------------------
After, you have downloaded and installed all required packages, you have to initialize the database so that all
required components are available.
@@ -244,78 +244,5 @@
configuration file.
-Initializing Elasticsearch index
-================================
-
-If you want to use an Elasticsearch index, you have to initialize index settings and mappings; the Ingest attachment
-plug-in is also required to handle attachments correctly.
-
-Elasticsearch integration is defined through the *PyAMS_content_es* package. Configuration files are available in this
-package, for attachment pipeline, index settings and mappings:
-
-.. code-block:: bash
-
- (env) $ cd /var/local/src/pyams/pyams_content_es
- (env) $ curl --noproxy localhost -XDELETE http://localhost:9200/pyams (1)
- (env) $ curl --noproxy localhost -XPUT http://localhost:9200/pyams -d @index-settings.json
-
- (env) $ curl --noproxy localhost -XPUT http://localhost:9200/pyams/WfNewsEvent/_mapping -d @mappings/WfNewsEvent.json
- (env) $ curl --noproxy localhost -XPUT http://localhost:9200/pyams/WfTopic/_mapping -d @mappings/WfTopic.json
- (env) $ curl --noproxy localhost -XPUT http://localhost:9200/pyams/WfBlogPost/_mapping -d @mappings/WfBlogPost.json
-
-(1) If 'pyams' is defined as Elasticsearch index name.
-Initializing NLTK
-=================
-
-Some NLTK (Natural Language Toolkit) tokenizers and stopwords utilities are used to index fulltext contents elements.
-This package requires downloading and configuration of several elements which are done as follow:
-
-.. code-block:: bash
-
- (end) $ ./bin/py
- >>> import nltk
- >>> nltk.download()
- NLTK Downloader
- ---------------------------------------------------------------------------
- d) Download l) List u) Update c) Config h) Help q) Quit
- ---------------------------------------------------------------------------
- Downloader> c
-
- Data Server:
- - URL: <https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml>
- - 6 Package Collections Available
- - 107 Individual Packages Available
-
- Local Machine:
- - Data directory: /home/tflorac/nltk_data
-
- ---------------------------------------------------------------------------
- s) Show Config u) Set Server URL d) Set Data Dir m) Main Menu
- ---------------------------------------------------------------------------
- Config> d
- New directory> /usr/local/lib/nltk_data (1)
- Config> m
-
- ---------------------------------------------------------------------------
- d) Download l) List u) Update c) Config h) Help q) Quit
- ---------------------------------------------------------------------------
- Downloader> d
-
- Download which package (l=list; x=cancel)?
- Identifier> punkt
- Downloading package punkt to /usr/local/lib/nltk_data...
-
- Downloader> d
-
- Download which package (l=list; x=cancel)?
- Identifier> stopwords
- Downloading package stopwords to /usr/local/lib/nltk_data...
-
-
-(1) On Debian GNU/Linux, you can choose any directory between '*~/nltk_data*' (where '~' is the homedir of user running
-Pyramid application), '*/usr/share/nltk_data*', '*/usr/local/share/nltk_data*', '*/usr/lib/nltk_data*' and
-'*/usr/local/lib/nltk_data*'.
-
-
--- a/src/source/appmanage.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/appmanage.rst Wed May 09 17:33:41 2018 +0200
@@ -10,44 +10,60 @@
When the PyAMS is initialized, it create and register several utilities into the *local registry* and saved into ZODB.
These utilities are created with default values which can be modified through **management interface** when
-the application is started.
+the application is started by default (http://localhost:6543/admin).
Local registry utilities
''''''''''''''''''''''''
+
One of PyAMS pre-requisites is to use the ZODB, at least to store the site root application,
it's configuration and a set of local utilities.
Some important utilities include:
-- a **catalog**: the catalog has the responsibility to index every content properties which are required to make quick
- and efficient searches. Catalog indexes are automatically created on database upgrade; management interface
- allows administrator to get indexes properties, to get the number of indexed objects and values for a given index, and
- to delete an index before recreating it by running the database upgrade script another time (see :ref:`scripts`).
+**Catalog**:
+ The catalog has the responsibility to index every content properties which are required to make quick
+ and efficient searches. Catalog indexes are automatically created on database upgrade; management interface
+ allows administrator to get indexes properties, to get the number of indexed objects and values for a given index, and
+ to delete an index before recreating it by running the database upgrade script another time (see :ref:`scripts`).
-- an **internal IDs** utility:
+**Internal IDs** utility:
+ List of unique identifier used to localise and access easily to a resource or object declared in zo database.
-- a **language negotiator**:
+**Language negotiator**:
+ Allows the management of several languages for different contents
-- a **portal templates** container:
+**Portal templates** container:
+ Allows you to define and save, one or more reuse template.
+ These templates can be shared with the entire application for build new site.
-- a **security manager**:
+**Security manager**:
+ Manage role and permission grant to a user
-- a **sequential IDs** utility:
+**Sequential IDs** utility:
+
-- a **server timezone** utility:
+**Server timezone** utility:
+ Setup the timezone server
-- a **user profiles** container:
+**User profiles** container:
+
+
Optional utilities can also include:
-- an **Elasticsearch content indexer**:
+**Elasticearch content indexer**:
-- a **maps manager**:
+Verifier la connection entre le server ElasticSearch et la l'application PyAMS
-- a **medias converter**:
+**Maps manager**:
+Systeme de cartografie, avec OpenStreeMaps, WMS, GeoPortable, ESRI ou encore Google Maps
+permet de créer des zones catographique²
-- a **tasks scheduler**:
+**Medias converter**:
+
+**Tasks scheduler**:
+
--- a/src/source/conf.py Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/conf.py Wed May 09 17:33:41 2018 +0200
@@ -89,7 +89,7 @@
master_doc = 'index'
# General information about the project.
-project = 'PyAMS User Guide'
+project = 'PyAMS Documentation'
copyright = '2018, Thierry Florac'
author = 'Thierry Florac'
@@ -148,7 +148,7 @@
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
-htmlhelp_basename = 'PyAMSUserGuidedoc'
+htmlhelp_basename = 'PyAMSDocumentation'
# -- Options for LaTeX output ---------------------------------------------
@@ -175,7 +175,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'PyAMSUserGuide.tex', 'PyAMS User Guide Documentation',
+ (master_doc, 'PyAMSDocumentation.tex', 'PyAMS Documentation',
'Thierry Florac', 'manual'),
]
@@ -185,7 +185,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'pyamsuserguide', 'PyAMS User Guide Documentation',
+ (master_doc, 'PyAMSDocumentation', 'PyAMS Documentation',
[author], 1)
]
@@ -196,8 +196,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- (master_doc, 'PyAMSUserGuide', 'PyAMS User Guide Documentation',
- author, 'PyAMSUserGuide', 'One line description of project.',
+ (master_doc, 'PyAMSDocumentation', 'PyAMS Documentation',
+ author, 'PyAMSDocumentation', 'PyAMS a CMS based on Pyramid and Zope',
'Miscellaneous'),
]
--- a/src/source/extend.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/extend.rst Wed May 09 17:33:41 2018 +0200
@@ -7,6 +7,8 @@
:maxdepth: 2
package_layout
+ appextend
+ zmi_integration
traverser
tales
--- a/src/source/index.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/index.rst Wed May 09 17:33:41 2018 +0200
@@ -2,16 +2,12 @@
sphinx-quickstart on Tue Nov 15 16:18:42 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
-
.. _index:
-
Contents
---------
-
-
.. toctree::
:maxdepth: 2
:caption: Getting started
@@ -29,14 +25,13 @@
.. toctree::
:maxdepth: 2
- :caption: Custom install documentation
+ :caption: Installation
ZODB Server <zodb>
- PyAMS Installation <appinstall>
+ Installing PyAMS <appinstall>
Configuring and Running PyAMS <app>
- PyAMS Site management (ZMI)<manage>
-
-
+ Managing PyAMS environment <manage>
+ Additional Plugins <plugins>
.. toctree::
--- a/src/source/introduction.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/introduction.rst Wed May 09 17:33:41 2018 +0200
@@ -52,3 +52,39 @@
If you want to create a PyAMS application instance easily, just follow the :ref:`quickstart` guide!
If you want learn more about a custom installation follow :ref:`install` procedure.
+
+
+
+1.1. Overview
+
+Zope 2 is a free and open-source, object-oriented web application server written in the Python programming language. The term ZOPE is an acronym for “Z Object Publishing Environment” (the Z doesn’t really mean anything in particular). However, nowadays ZOPE is simply written as Zope. It has three distinct audiences.
+
+
+Developers
+ Individuals who wish to extend Zope to create highly customized solutions. This audience is likely interested in creating highly reusable custom code that makes Zope do something new and interesting. They will likely make heavy use of “through the file-system” style development.
+
+
+This guide is intended to document Zope for the second audience, Developers, as defined above. If you fit more into the “user” audience defined above, you’ll probably want to start by reading The Zope Book .
+
+Throughout this guide, it is assumed that you know how to program in the Python programming language. Most of the examples in this guide will be in Python. There are a number of great resources and books for learning Python; the best online resource is the python.org web site and many books can be found on the shelves of your local bookstore.
+1.2. Organization of the book
+
+This book describes Zope’s services to the developer from a hands on, example-oriented standpoint. This book is not a complete reference to the Zope API, but rather a practical guide to applying Zope’s services to develop and deploy your own web applications. This book covers the following topics:
+
+Getting Started
+ This chapter provides a brief overview of installation and getting started with application development.
+Components and Interfaces
+ Zope use a component-centric development model. This chapter describes the component model in Zope and how Zope components are described through interfaces.
+Object Publishing
+ Developing applications for Zope involves more than just creating a component, that component must be publishable on the web. This chapter describes publication, and how your components need to be designed to be published.
+Zope Products
+ New Zope components are distributed and installed in packages called “Products”. This chapter explains Products in detail.
+Persistent Components
+ Zope provides a built-in, transparent Python object database called ZODB. This chapter describes how to create persistent components, and how they work in conjunction with the ZODB.
+Acquisition
+ Zope relies heavily on a dynamic technique called acquisition. This chapter explores acquisition thoroughly.
+Security
+ When your component is used by many different people through the web, security becomes a big concern. This chapter describes Zope’s security API and how you can use it to make security assertions about your object.
+Debugging and Testing
+ Zope has built in debugging and testing support. This chapter describes these facilities and how you can debug and test your components.
+
--- a/src/source/packages.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/packages.rst Wed May 09 17:33:41 2018 +0200
@@ -32,7 +32,7 @@
PyAMS Alchemy <pyams_alchemy/pyams_alchemy>
PyAMS Cache <pyams_cache/pyams_cache>
- PyAMS Content_es <pyams_content_es/pyams_content_es>
+ PyAMS Content with ElasticSearch <pyams_content_es/pyams_content_es>
PyAMS Default theme <pyams_default_theme/pyams_default_theme>
PyAMS File <pyams_file/pyams_file>
PyAMS GIS <pyams_gis/pyams_gis>
@@ -41,7 +41,7 @@
PyAMS Mail <pyams_mail/pyams_mail>
PyAMS Media <pyams_media/pyams_media>
PyAMS Notify <pyams_notify/pyams_notify>
- PyAMS Notify <pyams_notify_ws/pyams_notify_ws>
+ PyAMS Notify with WebSocket<pyams_notify_ws/pyams_notify_ws>
PyAMS Scheduler <pyams_scheduler/pyams_scheduler>
PyAMS Thesaurus <pyams_thesaurus/pyams_thesaurus>
PyAMS Security <pyams_security/pyams_security>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/source/plugins.rst Wed May 09 17:33:41 2018 +0200
@@ -0,0 +1,170 @@
+.. _plugins:
+
+PyAMS additional features and services
+++++++++++++++++++++++++++++++++++++++
+
+
+Elasticsearch 5.4
+=================
+
+At first you need to install ElasticSearch (ES), currently PyAMS is compatible with the version 5.4, the Ingest attachment
+plug-in is also required to handle attachments correctly.
+
+Visit https://www.elastic.co/ to learn how to install Elasticsearch Server, and how install `ingest-attachment` plug-in
+
+
+.. tips:: Documentation for installing ElasticSearch 5.4
+
+ - https://www.elastic.co/guide/en/elasticsearch/reference/5.4/gs-installation.html
+ - https://www.elastic.co/guide/en/elasticsearch/plugins/5.4/ingest-attachment.html
+
+
+After ElasticSearch installation, following steps describe how to configure ES with PyAMS;
+
+Initializing Elasticsearch index
+--------------------------------
+
+If you want to use an Elasticsearch index, you have to initialize index settings and mappings;
+Elasticsearch integration is defined through the *PyAMS_content_es* package.
+
+
+1. Enable Service:
+''''''''''''''''''
+
+In Pyramid INI application file *(etc/development.ini)*:
+
+.. code-block:: bash
+
+ # ElasticSearch settings
+ elastic.server = http://127.0.0.1:9200
+ elastic.index = pyams
+
+.. code-block:: bash
+
+ # PyAMS content elasticsearch index settings
+ pyams_content.es.tcp_handler = 127.0.0.1:5557
+ pyams_content.es.start_handler = false
+ pyams_content.es.allow_auth = admin:admin
+ pyams_content.es.allow_clients = 127.0.0.1
+
+
+2. Initialize Elasticsearch Database:
+'''''''''''''''''''''''''''''''''''''
+
+Configuration files for attachment pipeline, index settings and mappings are available `pyams_content_es` package or in PyAMS installation folder:
+
+
+.. code-block:: bash
+
+ (env) $ cd docs/elasticsearch
+ (env) $ curl --noproxy localhost -XPUT http://localhost:9200/_ingest/pipeline/attachment -d @attachment-pipeline.json
+
+
+With ``elastic.index = pyams`` defined as Elasticsearch index name : *"http://localhost:9200/pyams"* :
+
+.. code-block:: shell
+
+ (env) $ curl -XDELETE http://localhost:9200/pyams
+
+ (env) $ curl -XPUT http://localhost:9200/pyams -d @index-settings.json
+
+ (env) $ curl -XPUT http://localhost:9200/pyams/WfTopic/_mapping -d @mappings/WfTopic.json
+ (env) $ curl -XPUT http://localhost:9200/pyams/WfNewsEvent/_mapping -d @mappings/WfNewsEvent.json
+ (env) $ curl -XPUT http://localhost:9200/pyams/WfBlogPost/_mapping -d @mappings/WfBlogPost.json
+
+
+*Troubleshooting*: If you have a 406 error try to add ``-H 'Content-Type: application/json'`` in curl option
+
+
+3. Create or update index:
+''''''''''''''''''''''''''
+
+You have to index PyAMS objects into ES database. From a shell:
+
+.. code-block:: bash
+
+ (env) $ ./bin/pyams_es_index ../etc/development.ini
+
+
+
+-------------------------------
+
+Natural Language Toolkit - NLTK
+===============================
+
+
+With the package *PyAMS_nltk* PyAMS can use the NLTK features
+
+.. seealso::
+
+ Visit https://www.nltk.org/ to learn more about NLTK
+
+
+
+
+Initializing NLTK
+-----------------
+
+Some NLTK (Natural Language Toolkit) tokenizers and stopwords utilities are used to index fulltext contents elements.
+This package requires downloading and configuration of several elements which are done as follow:
+
+
+*1. Run the Python shell with PyAMS environment:*
+
+.. code-block:: bash
+
+ (env) $ ./bin/py
+
+
+*2. In the Python shell:*
+
+.. code-block:: python
+
+ >>> import nltk
+ >>> nltk.download()
+
+.. code-block:: python
+
+ NLTK Downloader
+ ---------------------------------------------------------------------------
+ d) Download l) List u) Update c) Config h) Help q) Quit
+ ---------------------------------------------------------------------------
+ Downloader> c
+
+ Data Server:
+ - URL: <https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml>
+ - 6 Package Collections Available
+ - 107 Individual Packages Available
+
+ Local Machine:
+ - Data directory: /home/tflorac/nltk_data
+ ---------------------------------------------------------------------------
+ s) Show Config u) Set Server URL d) Set Data Dir m) Main Menu
+ ---------------------------------------------------------------------------
+ Config> d
+ New directory> /usr/local/lib/nltk_data
+
+.. tip::
+
+ On Debian GNU/Linux, you can choose any directory between '*~/nltk_data*' (where '~' is the homedir of user running
+ Pyramid application), '*/usr/share/nltk_data*', '*/usr/local/share/nltk_data*', '*/usr/lib/nltk_data*' and
+ '*/usr/local/lib/nltk_data*'
+
+
+.. code-block:: pycon
+
+ Config> m
+ ---------------------------------------------------------------------------
+ d) Download l) List u) Update c) Config h) Help q) Quit
+ ---------------------------------------------------------------------------
+ Downloader> d
+
+ Download which package (l=list; x=cancel)?
+ Identifier> punkt
+ Downloading package punkt to /usr/local/lib/nltk_data...
+
+ Downloader> d
+
+ Download which package (l=list; x=cancel)?
+ Identifier> stopwords
+ Downloading package stopwords to /usr/local/lib/nltk_data...
--- a/src/source/quickstart.rst Fri Apr 27 15:44:46 2018 +0200
+++ b/src/source/quickstart.rst Wed May 09 17:33:41 2018 +0200
@@ -154,8 +154,8 @@
1. The variable **$((INSTALL))** is the path to current folder; it will be replaced automatically by cookiecutter
after application creation
- 2. You will be invited to setup additional services like **Elasticsearch** but you must install them on
- your own.
+ 2. You will be invited to setup additional PyAMS plugins like **Elasticsearch** but you must install related services on
+ your own. See also :ref:`plugins`
.. code-block:: bash