[Erp5-report] r40162 gabriel - in /erp5/trunk/utils/cloudooo/cloudooo: ./ interfaces/

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 10 13:14:14 CET 2010


Author: gabriel
Date: Wed Nov 10 13:14:14 2010
New Revision: 40162

URL: http://svn.erp5.org?rev=40162&view=rev
Log:
add granulate interface(implemented by Rafael and Hugo Maia)

Added:
    erp5/trunk/utils/cloudooo/cloudooo/interfaces/granulate.py
Modified:
    erp5/trunk/utils/cloudooo/cloudooo/CHANGES.txt

Modified: erp5/trunk/utils/cloudooo/cloudooo/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/CHANGES.txt?rev=40162&r1=40161&r2=40162&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/CHANGES.txt [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/CHANGES.txt [utf8] Wed Nov 10 13:14:14 2010
@@ -1,3 +1,7 @@
+1.0.10 (unreleased)
+===================
+  - Add granulate interface.
+
 1.0.9
 =====
   - use pkg_resources to get helper scripts.
@@ -7,13 +11,11 @@
 
 1.0.8
 =====
-
   - Remove all attributes that works with cloudooo script paths.
   - Use all scripts according to your python eggs.
   - Fixed problem when a spreadsheet will be converted to html.  
 
 1.0.7
 =====
-
   - Remove entry points, treat those as ordinary files.
   - Search all script files using pkg_resources.

Added: erp5/trunk/utils/cloudooo/cloudooo/interfaces/granulate.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/interfaces/granulate.py?rev=40162&view=auto
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/interfaces/granulate.py (added)
+++ erp5/trunk/utils/cloudooo/cloudooo/interfaces/granulate.py [utf8] Wed Nov 10 13:14:14 2010
@@ -0,0 +1,69 @@
+##############################################################################
+#
+# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
+#                    Hugo H. Maia Vieira <hugomaia at tiolive.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+from zope.interface import Interface
+
+class ITableGranulator(Interface):
+  """Provides methods to granulate a document into tables."""
+
+  def getTableItemList(file):
+    """Returns the list of table IDs in the form of (id, title)."""
+
+  def getColumnItemList(file, table_id):
+    """Return the list of columns in the form of (id, title)."""
+
+  def getLineItemList(file, table_id):
+    """Returns the lines of a given table as (key, value) pairs."""
+
+
+class IImageGranulator(Interface):
+  """Provides methods to granulate a document into images."""
+
+  def getImageItemList(file):
+    """Return the list of images in the form of (id, title)."""
+
+  def getImage(file, image_id, format=None, resolution=None, **kw):
+    """Return the given image."""
+
+
+class ITextGranulator(Interface):
+  """Provides methods to granulate a document into chapters and paragraphs."""
+
+  def getParagraphItemList(file):
+    """Returns the list of paragraphs in the form of (id, class) where class may
+    have special meaning to define TOC/TOI."""
+
+  def getParagraphItem(file, paragraph_id):
+    """Returns the paragraph in the form of (text, class)."""
+
+  def getChapterItemList(file):
+    """Returns the list of chapters in the form of (id, level)."""
+
+  def getChapterItem(file, chapter_id):
+    """Return the chapter in the form of (title, level)."""
+




More information about the Erp5-report mailing list