[doc/book] hide most XXXs stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 23 Apr 2010 17:07:55 +0200
branchstable
changeset 5393 875bdc0fe8ce
parent 5388 9167751463d4
child 5394 105011657405
[doc/book] hide most XXXs
doc/book/en/admin/multisources.rst
doc/book/en/annexes/cookbook.rst
doc/book/en/annexes/faq.rst
doc/book/en/annexes/index.rst
doc/book/en/annexes/rql/implementation.rst
doc/book/en/annexes/rql/language.rst
doc/book/en/development/cubes/layout.rst
doc/book/en/development/devrepo/notifications.rst
doc/book/en/index.rst
--- a/doc/book/en/admin/multisources.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/admin/multisources.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -3,4 +3,4 @@
 
 Data sources include SQL, LDAP, RQL, mercurial and subversion.
 
-XXX feed me
+.. XXX feed me
--- a/doc/book/en/annexes/cookbook.rst	Fri Apr 23 14:55:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-.. -*- coding: utf-8 -*-
-
-Cook book
-=========
-
-We gathered together some of our tricks and scripts that could make
-life easier.
-
-
-* How to import LDAP users in *CubicWeb*?
-
-  [XXX distribute this script with cubicweb instead]
-
-  Here is a very useful script which enables you to import LDAP users
-  into your *CubicWeb* instance by running the following:
-
-.. sourcecode:: python
-
-    import os
-    import pwd
-    import sys
-
-    from logilab.common.db import get_connection
-
-    def getlogin():
-        """avoid usinng os.getlogin() because of strange tty / stdin problems
-        (man 3 getlogin)
-        Another solution would be to use $LOGNAME, $USER or $USERNAME
-        """
-        return pwd.getpwuid(os.getuid())[0]
-
-
-    try:
-        database = sys.argv[1]
-    except IndexError:
-        print 'USAGE: python ldap2system.py <database>'
-        sys.exit(1)
-
-    if raw_input('update %s db ? [y/n]: ' % database).strip().lower().startswith('y'):
-        cnx = get_connection(user=getlogin(), database=database)
-        cursor = cnx.cursor()
-
-        insert = ('INSERT INTO euser (creation_date, eid, modification_date, login, firstname, surname, last_login_time, upassword) '
-                  "VALUES (%(mtime)s, %(eid)s, %(mtime)s, %(login)s, %(firstname)s, %(surname)s, %(mtime)s, './fqEz5LeZnT6');")
-        update = "UPDATE entities SET source='system' WHERE eid=%(eid)s;"
-        cursor.execute("SELECT eid,type,source,extid,mtime FROM entities WHERE source!='system'")
-        for eid, type, source, extid, mtime in cursor.fetchall():
-            if type != 'CWUser':
-                print "don't know what to do with entity type", type
-                continue
-            if source != 'ldapuser':
-                print "don't know what to do with source type", source
-                continue
-            ldapinfos = dict(x.strip().split('=') for x in extid.split(','))
-            login = ldapinfos['uid']
-            firstname = ldapinfos['uid'][0].upper()
-            surname = ldapinfos['uid'][1:].capitalize()
-            if login != 'jcuissinat':
-                args = dict(eid=eid, type=type, source=source, login=login,
-                            firstname=firstname, surname=surname, mtime=mtime)
-                print args
-                cursor.execute(insert, args)
-                cursor.execute(update, args)
-
-        cnx.commit()
-        cnx.close()
-
-
-* How to load data from a script?
-
-  The following script aims at loading data within a script assuming pyro-nsd is
-  running and your instance is configured with ``pyro-server=yes``, otherwise
-  you would not be able to use dbapi.
-
-.. sourcecode:: python
-
-    from cubicweb import dbapi
-
-    cnx = dbapi.connection(database='instance-id', user='admin', password='admin')
-    cur = cnx.cursor()
-    for name in ('Personal', 'Professional', 'Computers'):
-        cur.execute('INSERT Blog B: B name %s', name)
-    cnx.commit()
-
-
--- a/doc/book/en/annexes/faq.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/annexes/faq.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -290,6 +290,66 @@
 
 You can find additional information in the section :ref:`LDAP`.
 
+How to import LDAP users in |cubicweb| ?
+----------------------------------------
+
+  Here is a useful script which enables you to import LDAP users
+  into your *CubicWeb* instance by running the following:
+
+.. sourcecode:: python
+
+    import os
+    import pwd
+    import sys
+
+    from logilab.common.db import get_connection
+
+    def getlogin():
+        """avoid usinng os.getlogin() because of strange tty / stdin problems
+        (man 3 getlogin)
+        Another solution would be to use $LOGNAME, $USER or $USERNAME
+        """
+        return pwd.getpwuid(os.getuid())[0]
+
+
+    try:
+        database = sys.argv[1]
+    except IndexError:
+        print 'USAGE: python ldap2system.py <database>'
+        sys.exit(1)
+
+    if raw_input('update %s db ? [y/n]: ' % database).strip().lower().startswith('y'):
+        cnx = get_connection(user=getlogin(), database=database)
+        cursor = cnx.cursor()
+
+        insert = ('INSERT INTO euser (creation_date, eid, modification_date, login, '
+                  ' firstname, surname, last_login_time, upassword) '
+                  "VALUES (%(mtime)s, %(eid)s, %(mtime)s, %(login)s, %(firstname)s, "
+                  "%(surname)s, %(mtime)s, './fqEz5LeZnT6');")
+        update = "UPDATE entities SET source='system' WHERE eid=%(eid)s;"
+        cursor.execute("SELECT eid,type,source,extid,mtime FROM entities WHERE source!='system'")
+        for eid, type, source, extid, mtime in cursor.fetchall():
+            if type != 'CWUser':
+                print "don't know what to do with entity type", type
+                continue
+            if source != 'ldapuser':
+                print "don't know what to do with source type", source
+                continue
+            ldapinfos = dict(x.strip().split('=') for x in extid.split(','))
+            login = ldapinfos['uid']
+            firstname = ldapinfos['uid'][0].upper()
+            surname = ldapinfos['uid'][1:].capitalize()
+            if login != 'jcuissinat':
+                args = dict(eid=eid, type=type, source=source, login=login,
+                            firstname=firstname, surname=surname, mtime=mtime)
+                print args
+                cursor.execute(insert, args)
+                cursor.execute(update, args)
+
+        cnx.commit()
+        cnx.close()
+
+
 I get NoSelectableObject exceptions, how do I debug selectors ?
 ---------------------------------------------------------------
 
--- a/doc/book/en/annexes/index.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/annexes/index.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -13,7 +13,6 @@
    :numbered:
 
    faq
-   cookbook
    cubicweb-ctl
    rql/index
    mercurial
--- a/doc/book/en/annexes/rql/implementation.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/annexes/rql/implementation.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -128,7 +128,7 @@
 
 - The current implementation does not support linking two relations of type 'is'
   with an OR. I do not think that the negation is supported on this type of
-  relation (XXX FIXME to be confirmed).
+  relation (XXX to be confirmed).
 
 - Relations defining the variables must be left to those using them.  For
   example::
--- a/doc/book/en/annexes/rql/language.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/annexes/rql/language.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -92,8 +92,7 @@
     Any X WHERE X name IN ( 'chauvat', 'fayolle', 'di mascio', 'thenault')
 
 
-XXX nico: "A trick <> 'bar'" wouldn't it be more convenient than
-"NOT A trick 'bar'" ?
+.. XXX nico: "A trick <> 'bar'" wouldn't it be more convenient than "NOT A trick 'bar'" ?
 
 .. _PriorityOperators:
 
--- a/doc/book/en/development/cubes/layout.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/development/cubes/layout.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -96,13 +96,7 @@
   the cube.
 
 
-At least you should have:
-
-* the file ``__pkginfo__.py``
-* the schema definition
-  XXX false, we may want to have cubes which are only adding a service,
-  no persistent data (eg embedding for instance)
-
+At least you should have the file ``__pkginfo__.py``.
 
 
 The :file:`__init__.py` and :file:`site_cubicweb.py` files
@@ -110,30 +104,31 @@
 
 The :file:`__pkginfo__.py` file
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-XXX contains metadata describing your cubes
-    distname / modname
-    version / numversion
-    __use__
-    __recommend__
+
+It contains metadata describing your cubes, mostly useful for
+packaging.
 
 
 :file:`migration/precreate.py` and :file:`migration/postcreate.py`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-XXX detail steps of instance creation
+
+.. XXX detail steps of instance creation
 
 
 External resources such as image, javascript and css files
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-XXX naming convention external_resources file
+
+.. XXX naming convention external_resources file
 
 
 Out-of the box testing
 ~~~~~~~~~~~~~~~~~~~~~~
-XXX MANIFEST.in, __pkginfo__.include_dirs, debian
 
+.. XXX MANIFEST.in, __pkginfo__.include_dirs, debian
 
 
 Packaging and distribution
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-XXX MANIFEST.in, __pkginfo__.include_dirs, debian
 
+.. XXX MANIFEST.in, __pkginfo__.include_dirs, debian
+
--- a/doc/book/en/development/devrepo/notifications.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/development/devrepo/notifications.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -3,4 +3,4 @@
 Notifications management
 ========================
 
-XXX FILLME
+.. XXX FILLME
--- a/doc/book/en/index.rst	Fri Apr 23 14:55:10 2010 +0200
+++ b/doc/book/en/index.rst	Fri Apr 23 17:07:55 2010 +0200
@@ -40,9 +40,6 @@
 .. _`mailing-list`: http://lists.cubicweb.org/mailman/listinfo/cubicweb
 .. _blog: http://www.cubicweb.org/blog/1238
 
-Table of Contents
-=================
-
 .. toctree::
    :maxdepth: 2