[Checkins] SVN: grok/trunk/doc/examples/ imported bookshelf example

Luciano Ramalho luciano at ramalho.org
Sun Jul 15 09:53:41 EDT 2007


Log message for revision 78002:
  imported bookshelf example
  

Changed:
  A   grok/trunk/doc/examples/
  A   grok/trunk/doc/examples/bookshelf/
  A   grok/trunk/doc/examples/bookshelf/TODO.txt
  A   grok/trunk/doc/examples/bookshelf/src/
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/PKG-INFO
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/SOURCES.txt
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/dependency_links.txt
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/entry_points.txt
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/not-zip-safe
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/paster_plugins.txt
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/requires.txt
  A   grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/top_level.txt
  A   grok/trunk/doc/examples/bookshelf/src/TODO.txt
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/__init__.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/app.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/index.pt
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/master.pt
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/article.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/book.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/book_templates/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/configure.zcml
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/__init__.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/collection.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/import.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/doc/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/doc/searching.txt
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/ftesting.zcml
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/__init__.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/catalog.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/test_functional.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf_templates/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf_templates/index.pt
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/testing.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/__init__.py
  A   grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/test_doctests.py

-=-
Added: grok/trunk/doc/examples/bookshelf/TODO.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/TODO.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/TODO.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,5 @@
+- Add doctests and make them pass
+- Import the books from "demo/collection" automatically, via XML-RPC
+- Do some advanced queries, involving more than one attribute and one class
+- Update doc/searching.txt, enhance the text
+- Add some hurry.query code and examples to the tutorial

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/PKG-INFO
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/PKG-INFO	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/PKG-INFO	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,10 @@
+Metadata-Version: 1.0
+Name: BookShelf
+Version: 0.0
+Summary: UNKNOWN
+Home-page: UNKNOWN
+Author: UNKNOWN
+Author-email: UNKNOWN
+License: UNKNOWN
+Description: UNKNOWN
+Platform: UNKNOWN

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/SOURCES.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/SOURCES.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/SOURCES.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,12 @@
+setup.py
+src/BookShelf.egg-info/PKG-INFO
+src/BookShelf.egg-info/SOURCES.txt
+src/BookShelf.egg-info/dependency_links.txt
+src/BookShelf.egg-info/entry_points.txt
+src/BookShelf.egg-info/not-zip-safe
+src/BookShelf.egg-info/paster_plugins.txt
+src/BookShelf.egg-info/requires.txt
+src/BookShelf.egg-info/top_level.txt
+src/bookshelf/__init__.py
+src/bookshelf/app.py
+src/bookshelf/testing.py

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/dependency_links.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/dependency_links.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/dependency_links.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/entry_points.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/entry_points.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/entry_points.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,3 @@
+
+      # Add entry points here
+      
\ No newline at end of file

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/not-zip-safe
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/not-zip-safe	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/not-zip-safe	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/paster_plugins.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/paster_plugins.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/paster_plugins.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+PasteScript

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/requires.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/requires.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/requires.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,2 @@
+setuptools
+grok
\ No newline at end of file

Added: grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/top_level.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/top_level.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/BookShelf.egg-info/top_level.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+bookshelf

Added: grok/trunk/doc/examples/bookshelf/src/TODO.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/TODO.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/TODO.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,6 @@
+- Add more (and different) attributes to Book and Article
+- Add more indexes
+- Show how to perform some advanced queries, involving more than one attribute and one class
+- Add doctests and make them pass
+- Update doc/searching.txt, enhance the text
+- Add some hurry.query code and examples to the tutorial

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/__init__.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/__init__.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/__init__.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+# this directory is a package

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/app.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/app.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/app.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,30 @@
+import grok
+from grok import index
+from bookshelf.shelf import Shelf
+from bookshelf.book import Book
+from bookshelf.article import Article
+from zope.interface import Interface
+
+class BookShelf(grok.Application, grok.Container):
+    def __init__(self):
+        super(BookShelf, self).__init__()
+        self['shelf'] = Shelf()
+
+class Index(grok.View):
+    pass
+
+class BookIndexes(grok.Indexes):
+    grok.site(BookShelf)
+    grok.context(Book)
+
+    title = index.Text()
+
+#class ArticleIndexes(grok.Indexes):
+#    grok.site(BookShelf)
+#    grok.context(Article)
+#
+#    title = index.Text()
+
+class Master(grok.View):
+    """ The master page template macro """
+    grok.context(Interface)

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/index.pt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/index.pt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/index.pt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,14 @@
+<html metal:use-macro="context/@@master/page">
+<head>
+   <title metal:fill-slot="title">Main</title>
+</head>
+<body>
+  <span metal:fill-slot="content_title">Main</span>      
+
+  <div metal:fill-slot="content">
+
+  Main page stuff will be here.
+  
+  </div>	
+</body>
+</html>

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/master.pt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/master.pt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/app_templates/master.pt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,36 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"
+      xmlns:metal="http://xml.zope.org/namespaces/metal"
+      metal:define-macro="page">
+<head>
+  <title metal:define-slot="title">
+    Grok BookShelf
+  </title>
+</head>
+<body>
+  <div class="top">
+    <a tal:attributes="href python:view.application_url()">
+        Grok BookShelf
+    </a>
+    <ul>
+        <li><a tal:attributes="href python:view.application_url('shelf')">catalog</a></li>
+    </ul>
+  </div>
+  <div metal:define-slot="body">
+    <div class="content_menu">
+      <span metal:define-slot="content_menu">
+        <span class="content_title">
+            <span metal:define-slot="content_title">
+            Content title
+            </span>
+        </span>
+        <span metal:define-slot="content_actions" />
+      </span>
+    </div>
+    <div class="content">
+      <div metal:define-slot="content">
+        Your content here...
+      </div>
+    </div>
+  </div>
+</body>
+</html>

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/article.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/article.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/article.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,29 @@
+import grok
+from zope import interface, schema
+
+class IArticle(interface.Interface):
+    title = schema.TextLine(title=u"Title", required=True)
+
+class Article(grok.Model):
+    """
+    A simple article with a title.
+
+    >>> article = Article()
+    >>> article.title
+    >>> article.title = "How to use Catalog"
+    >>> article.title
+    'How to use Catalog'
+
+    """
+    interface.implements(IArticle)
+    title = ''
+
+    def __init__(self, title=None):
+        super(Article, self).__init__()
+        self.title = title
+
+class Edit(grok.EditForm):
+    pass
+
+class Index(grok.DisplayForm):
+    pass

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/book.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/book.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/book.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,29 @@
+import grok
+from zope import interface, schema
+
+class IBook(interface.Interface):
+    title = schema.TextLine(title=u"Title", required=True)
+
+class Book(grok.Model):
+    """
+    A simple book with a title.
+
+    >>> book = Book()
+    >>> book.title
+    >>> book.title = "Web Component Development with Zope 3"
+    >>> book.title
+    'Web Component Development with Zope 3'
+
+    """
+    interface.implements(IBook)
+    title = ''
+
+    def __init__(self, title=None):
+        super(Book, self).__init__()
+        self.title = title
+
+class Edit(grok.EditForm):
+    pass
+
+class Index(grok.DisplayForm):
+    pass

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/configure.zcml
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/configure.zcml	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/configure.zcml	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,5 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:grok="http://namespaces.zope.org/grok">
+  <include package="grok" />
+  <grok:grok package="." />
+</configure>

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/__init__.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/__init__.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/__init__.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+# this directory is a package

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/collection.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/collection.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/collection.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,1738 @@
+# -*- coding: utf-8 -*-
+
+collection = [
+    {'edition': None,
+     'isbn13': u'9788506017241',
+     'issued': u'1999-01-01',
+     'name': u'Michaelis',
+     'publisher': u'Companhia Melhoramentos de Sao Paulo Industri',
+     'title': u'Mini Michaelis Dicionario: Espanhol-Portugues/Portugues-Espanhol'},
+    {'edition': u'1st ed',
+     'isbn13': u'9780877736615',
+     'issued': u'1992-03-10',
+     'name': u'Thomas Cleary',
+     'publisher': u'Shambhala',
+     'title': u'I Ching (Shambhala Pocket Classics)'},
+    {'edition': u'3',
+     'isbn13': u'9780071414449',
+     'issued': u'2003-03-27',
+     'name': u'Juan Kattan-Ibarra',
+     'publisher': u'McGraw-Hill',
+     'title': u'Teach Yourself Spanish Complete Course (book + CD shelfk) (Teach Yourself Language Complete Courses)'},
+    {'edition': None,
+     'isbn13': u'9780028618890',
+     'issued': u'1997-09-23',
+     'name': u'Bryan Prafenberg|Lycos',
+     'publisher': u'MacMillan Reference Books',
+     'title': u"Webster's New World Pocket Internet Directory and Dictionary"},
+    {'edition': u'New Ed',
+     'isbn13': u'9780751302813',
+     'issued': u'2002-01-16',
+     'name': u'John Driscoll',
+     'publisher': u'Dorling Kindersley',
+     'title': u'Learn to Sail in a Weekend (Learn in a Weekend)'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780140449105',
+     'issued': u'2003-05-06',
+     'name': u'Thomas More|Paul Turner (introduction)',
+     'publisher': u'Penguin Classics',
+     'title': u'Utopia (Penguin Classics)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780486273471',
+     'issued': u'1992-12-01',
+     'name': u'Sid Sackson',
+     'publisher': u'Dover Publications',
+     'title': u'A Gamut of Games'},
+    {'edition': u'1st Harvest/HBJ ed',
+     'isbn13': u'9780156235501',
+     'issued': u'1985-06-26',
+     'name': u'Stanislaw Lem',
+     'publisher': u'Harvest Books',
+     'title': u'The Cyberiad'},
+    {'edition': u'1',
+     'isbn13': u'9788531405921',
+     'issued': u'2002-01-01',
+     'name': u'Boris Fausto',
+     'publisher': u'Imprensa Oficial SP',
+     'title': u'Hist\xf3ria Concisa do Brasil'},
+    {'edition': u'1st',
+     'isbn13': u'9780201633610',
+     'issued': u'1995-01-15',
+     'name': u'Erich Gamma|Richard Helm|Ralph Johnson|John Vlissides',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing Series)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9781880908891',
+     'issued': u'1998-09-01',
+     'name': u'Amy Handy',
+     'publisher': u'Todtri Productions, Ltd.',
+     'title': u'The Golden Age of Sail (Golden Age of Transportation)'},
+    {'edition': u'Rev Ed',
+     'isbn13': u'9780851777986',
+     'issued': u'2000-05-01',
+     'name': u'John McKay',
+     'publisher': u'Naval Institute Press',
+     'title': u'The 100-Gun Ship Victory (Anatomy of the Ship S.)'},
+    {'edition': None,
+     'isbn13': u'9780785814269',
+     'issued': u'2001-09-01',
+     'name': u'Brian Turnstall|Nicholas Tracy (editor)',
+     'publisher': u'Book Sales',
+     'title': u'Naval Warfare in the Age of Sail: The Evolution of Fighting Tactics, 1650-1815'},
+    {'edition': None,
+     'isbn13': u'9781840673586',
+     'issued': u'2002-08-01',
+     'name': u'Robert Gardiner',
+     'publisher': u'Caxton Pub Group',
+     'title': u'The Campaign of Trafalgar 1803-1805'},
+    {'edition': u'New Ed',
+     'isbn13': u'9781840673616',
+     'issued': u'2004-01-01',
+     'name': u'Robert Gardiner (editor)',
+     'publisher': u'Caxton Editions',
+     'title': u'Nelson Against Napoleon: From the Nile to Copenhagen 1798-1801 (Caxton Pictorial Histories)'},
+    {'edition': u'Illustrate',
+     'isbn13': u'9780879519322',
+     'issued': u'1999-03-01',
+     'name': u'Graham Blackburn',
+     'publisher': u'Overlook TP',
+     'title': u'The Illustrated Encyclopedia of Ship and Boats'},
+    {'edition': None,
+     'isbn13': u'9780811700139',
+     'issued': u'2003-01-01',
+     'name': u'Colin White',
+     'publisher': u'Stackpole Books',
+     'title': u'The Nelson Encyclopedia'},
+    {'edition': None,
+     'isbn13': u'9780304352463',
+     'issued': u'2000-08-01',
+     'name': u'Andrew Lambert',
+     'publisher': u'Cassell',
+     'title': u'History of Warfare: War at Sea in the Age of Sail'},
+    {'edition': None,
+     'isbn13': u'9780486420721',
+     'issued': u'2002-07-29',
+     'name': u'Jack Coggins',
+     'publisher': u'Dover Publications',
+     'title': u'Ships and Seamen of the American Revolution'},
+    {'edition': None,
+     'isbn13': u'9781841763088',
+     'issued': u'2001-11-25',
+     'name': u'Angus Konstam|Tony Bryan (illustrator)',
+     'publisher': u'Osprey Publishing',
+     'title': u'British Napoleonic Ship-of-the-Line (New Vanguard)'},
+    {'edition': None,
+     'isbn13': u'9780850459982',
+     'issued': u'1990-11-22',
+     'name': u'Rene Chartrand|Francis Back (illustrator)',
+     'publisher': u'Osprey Publishing',
+     'title': u"Napoleon's Sea Soldiers (Men-at-Arms)"},
+    {'edition': None,
+     'isbn13': u'9781841766355',
+     'issued': u'2004-05-25',
+     'name': u'Chris Henry|Brian Delf (illustrator)',
+     'publisher': u'Osprey Publishing',
+     'title': u'Napoleonic Naval Armaments 1792-1815 (New Vanguard)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9781853266867',
+     'issued': u'1999-02-01',
+     'name': u'John Terraine|J. N. Westwood',
+     'publisher': u'Combined Publishing',
+     'title': u'Trafalgar (Wordsworth Collection)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780198605270',
+     'issued': u'2002-10-17',
+     'name': u'Bryan Ranft|J. R. Hill (editor)',
+     'publisher': u'Oxford University Press, USA',
+     'title': u'The Oxford Illustrated History of the Royal Navy'},
+    {'edition': None,
+     'isbn13': u'9789504912033',
+     'issued': u'2004-04-01',
+     'name': u'Marcos Aguinis',
+     'publisher': u'Editorial Seix Barral',
+     'title': u'El Combate Perpetuo'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780486273327',
+     'issued': u'1992-11-17',
+     'name': u'Henry B. Culver',
+     'publisher': u'Dover Publications',
+     'title': u'The Book of Old Ships: From Egyptian Galleys to Clipper Ships (Dover Pictorial Archive)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9781840222029',
+     'issued': u'1999-04-01',
+     'name': u'Ernie Bradford|Ernle Dusgate Selby Bradford',
+     'publisher': u'Wordsworth Military Library',
+     'title': u'Nelson: The Essential Hero (Wordsworth Military Library)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780316289122',
+     'issued': u'1984-09-30',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Mr. Midshipman Hornblower (Hornblower Saga (Paperback))'},
+    {'edition': None,
+     'isbn13': u'9780316290630',
+     'issued': u'1998-11-01',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Lieutenant Hornblower'},
+    {'edition': None,
+     'isbn13': u'9780316290463',
+     'issued': u'1998-11-01',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Hornblower and the Hotspur (Hornblower Series)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780316289443',
+     'issued': u'1990-04-18',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Hornblower During the Crisis (Hornblower Saga (Paperback))'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780316289290',
+     'issued': u'1985-04-30',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Hornblower and the Atropos (Hornblower Saga (Paperback))'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780316289320',
+     'issued': u'1985-09-30',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Hornblower : Beat to Quarters'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780316289368',
+     'issued': u'1985-09-30',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Ship of the Line (Hornblower Saga)'},
+    {'edition': u'Revised',
+     'isbn13': u'9780316289399',
+     'issued': u'1989-04-05',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Flying Colours (Hornblower Saga)'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780316289436',
+     'issued': u'1989-11-02',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Lord Hornblower (Hornblower Saga)'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780316289412',
+     'issued': u'1989-11-02',
+     'name': u'C.S. Forester',
+     'publisher': u'Back Bay Books',
+     'title': u'Admiral Hornblower in the West Indies (Hornblower Saga)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780805055696',
+     'issued': u'1998-10-01',
+     'name': u'Christopher Lloyd',
+     'publisher': u'Owl Books (NY)',
+     'title': u'Lord Cochrane, Seaman, Radical, Liberator: A Life of Thomas, Lord Cochrane, 10th Earl of Dundonald (Heart of Oak Sea Classics Series)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780304356591',
+     'issued': u'2001-06-14',
+     'name': u'Donald Thomas',
+     'publisher': u'Cassell military',
+     'title': u'Cochrane (Cassell Military Paperbacks S.)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780786709236',
+     'issued': u'2001-11-09',
+     'name': u'Robert Harvey',
+     'publisher': u'Carroll & Graf Publishers',
+     'title': u'Cochrane: The Life and Exploits of a Fighting Captain'},
+    {'edition': u'Illustrate',
+     'isbn13': u'9780850529739',
+     'issued': u'2003-08-01',
+     'name': u'Dudley Pope',
+     'publisher': u'Pen and Sword',
+     'title': u'Black Ship'},
+    {'edition': u'1st Owl',
+     'isbn13': u'9780805061369',
+     'issued': u'1999-06-14',
+     'name': u'Dudley Pope',
+     'publisher': u'Owl Books',
+     'title': u'Decision At Trafalgar: The Story of the Greatest British Naval Battle of the Age of Nelson (Heart of Oak Sea Classics Series)'},
+    {'edition': None,
+     'isbn13': u'9789506200961',
+     'issued': u'1998-09-01',
+     'name': u'Enrique Gonzlez Lonzime',
+     'publisher': u'Claridad',
+     'title': u'Breve Historia de Las Batallas Navales'},
+    {'edition': None,
+     'isbn13': u'9780007157860',
+     'issued': u'2003-10-06',
+     'name': u"Patrick O'Brian",
+     'publisher': u'Harpercollins Pub Ltd',
+     'title': u'Master and Commander'},
+    {'edition': None,
+     'isbn13': u'9781582344881',
+     'issued': u'2004-11-01',
+     'name': u'Beau Riffenburgh',
+     'publisher': u'Bloomsbury USA',
+     'title': u"Shackleton's Forgotten Expedition: The Voyage of the Nimrod"},
+    {'edition': None,
+     'isbn13': u'9780965776936',
+     'issued': u'1998-01-01',
+     'name': u'None (None)',
+     'publisher': u'Alfred A. Knopf',
+     'title': u"The Endurance Shackleton's Legendary Antarctic Expedition"},
+    {'edition': u'1 Amer ed',
+     'isbn13': u'9780393057768',
+     'issued': u'2003-04-01',
+     'name': u'Tom Pocock',
+     'publisher': u'W. W. Norton & Company',
+     'title': u'The Terror Before Trafalgar: Nelson, Napoleon, and the Secret War'},
+    {'edition': u'1',
+     'isbn13': u'9781558216501',
+     'issued': u'1997-07-01',
+     'name': u'Captain Henry Paasch',
+     'publisher': u'The Lyons Press',
+     'title': u"Paasch's Illustrated Marine Dictionary"},
+    {'edition': u'3rd',
+     'isbn13': u'9780805066159',
+     'issued': u'2000-10-01',
+     'name': u'Dean King|John B. Hattendorf|J. Worth Estes',
+     'publisher': u'Owl Books',
+     'title': u"A Sea of Words, Third Edition: A Lexicon and Companion to the Complete Seafaring Tales of Patrick O'Brian"},
+    {'edition': u'New Ed',
+     'isbn13': u'9780143031055',
+     'issued': u'2005-03-30',
+     'name': u'Jawaharlal Nehru',
+     'publisher': u'Penguin Books India',
+     'title': u'Glimpses of World History'},
+    {'edition': None,
+     'isbn13': u'9780747556725',
+     'issued': u'2004-01-01',
+     'name': u'Patrick Wilcken',
+     'publisher': u'Bloomsbury',
+     'title': u'Empire Adrift: The Portuguese Court in Rio de Janeiro, 1808-1821'},
+    {'edition': None,
+     'isbn13': u'9780684846095',
+     'issued': u'2000-08-29',
+     'name': u'Stephen E. Ambrose',
+     'publisher': u'Simon & Schuster',
+     'title': u'Nothing Like It In The World : The Men Who Built the Transcontinental Railroad 1863-1869'},
+    {'edition': u'Reprint',
+     'isbn13': u'9781568360225',
+     'issued': u'1994-04-01',
+     'name': u'Peter Hopkirk',
+     'publisher': u'Kodansha Globe',
+     'title': u'The Great Game: The Struggle for Empire in Central Asia (Kodansha Globe)'},
+    {'edition': u'1st Da Capo Press ed',
+     'isbn13': u'9780306805837',
+     'issued': u'1994-09-01',
+     'name': u'B. H. Liddell Hart|Michael Grant',
+     'publisher': u'Da Capo Press',
+     'title': u'Scipio Africanus: Greater Than Napoleon'},
+    {'edition': None,
+     'isbn13': u'9780192802576',
+     'issued': u'2002-05-16',
+     'name': u'Michael Howard',
+     'publisher': u'Oxford University Press, USA',
+     'title': u'Clausewitz: A Very Short Introduction (Very Short Introductions)'},
+    {'edition': None,
+     'isbn13': u'9780394588018',
+     'issued': u'1993-10-19',
+     'name': u'John Keegan',
+     'publisher': u'Knopf',
+     'title': u'A History of Warfare'},
+    {'edition': None,
+     'isbn13': u'9780140166446',
+     'issued': u'1994-10-27',
+     'name': u'Christopher Hibbert',
+     'publisher': u'Gardners Books',
+     'title': u'Florence : The Biography of a City'},
+    {'edition': None,
+     'isbn13': u'9780688053390',
+     'issued': u'1999-06-02',
+     'name': u'Christopher Hibbert',
+     'publisher': u'Harper Perennial',
+     'title': u'The House of Medici: Its Rise and Fall'},
+    {'edition': None,
+     'isbn13': u'9780571221103',
+     'issued': u'2003-05-19',
+     'name': u'Randeep Ramesh (editor)',
+     'publisher': u'Gardners Books',
+     'title': u'The War We Could Not Stop : The Real Story of the Battle for Iraq'},
+    {'edition': None,
+     'isbn13': u'9780596100674',
+     'issued': u'2005-10-01',
+     'name': u'Paul Hudson',
+     'publisher': u"O'Reilly Media",
+     'title': u"PHP in a Nutshell (In a Nutshell (O'Reilly))"},
+    {'edition': u'undefined',
+     'isbn13': u'9788571646575',
+     'issued': u'2000-01-01',
+     'name': u'Darcy Ribeiro',
+     'publisher': u'Companhia das Letras',
+     'title': u'Processo Civilizat\xf3rio, O'},
+    {'edition': u'3rd',
+     'isbn13': u'9781590595350',
+     'issued': u'2005-09-23',
+     'name': u'Michael Kofler',
+     'publisher': u'Apress',
+     'title': u'The Definitive Guide to MySQL 5, Third Edition (Definitive Guide)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780226468044',
+     'issued': u'1990-04-15',
+     'name': u'George Lakoff',
+     'publisher': u'University Of Chicago Press',
+     'title': u'Women, Fire, and Dangerous Things'},
+    {'edition': u'3',
+     'isbn13': u'9780596003302',
+     'issued': u'2002-10-01',
+     'name': u"Shelley Powers|Tim O'Reilly|Mike Loukides|Jerry Peek (editor)",
+     'publisher': u"O'Reilly Media",
+     'title': u'Unix Power Tools, Third Edition'},
+    {'edition': u'2',
+     'isbn13': u'9780201504019',
+     'issued': u'1992-01-23',
+     'name': u'David Harel',
+     'publisher': u'Pearson Education',
+     'title': u'Algorithmics: The Spirit of Computing (2nd Edition)'},
+    {'edition': u'Revised',
+     'isbn13': u'9780716782711',
+     'issued': u'1993-04-01',
+     'name': u'A.K. Dewdney',
+     'publisher': u'W.H. Freeman & Company',
+     'title': u'New Turing Omnibus (New Turning Omnibus : 66 Excursions in Computer Science)'},
+    {'edition': None,
+     'isbn13': u'9780262521482',
+     'issued': u'1990-04-01',
+     'name': u'Alan W. Biermann',
+     'publisher': u'Mit Pr',
+     'title': u'Great Ideas in Computer Science: A Gentle Introduction'},
+    {'edition': None,
+     'isbn13': u'9780716724919',
+     'issued': u'1993-06-01',
+     'name': u'A. K. Dewdney',
+     'publisher': u'W.H. Freeman & Company',
+     'title': u'The Tinkertoy Computer and Other Machinations'},
+    {'edition': None,
+     'isbn13': u'9780078819360',
+     'issued': u'1993-08-01',
+     'name': u'Milind S. Pandit',
+     'publisher': u'Mcgraw-Hill Osborne Media',
+     'title': u'How Computers Really Work'},
+    {'edition': None,
+     'isbn13': u'9780521377096',
+     'issued': u'1989-09-29',
+     'name': u'Thomas C. Hayes|Paul Horowitz',
+     'publisher': u'Cambridge University Press',
+     'title': u'The Art of Electronics (Student Manual with Exercises)'},
+    {'edition': u'2',
+     'isbn13': u'9780521370950',
+     'issued': u'1989-07-28',
+     'name': u'Paul Horowitz|Winfield Hill',
+     'publisher': u'Cambridge University Press',
+     'title': u'The Art of Electronics'},
+    {'edition': u'1',
+     'isbn13': u'9780070580787',
+     'issued': u'2000-04-15',
+     'name': u'Paul Scherz',
+     'publisher': u'McGraw-Hill/TAB Electronics',
+     'title': u'Practical Electronics for Inventors'},
+    {'edition': u'Student',
+     'isbn13': u'9780945053316',
+     'issued': u'2004-02-01',
+     'name': u'Forrest M., III Mims',
+     'publisher': u'Master Publishing, Inc.',
+     'title': u'Electronic Sensor Circuits & Projects'},
+    {'edition': u'1',
+     'isbn13': u'9781593270049',
+     'issued': u'2003-05-01',
+     'name': u'Ton Roosendaal|Carsten Wartmann',
+     'publisher': u'No Starch Press',
+     'title': u'The Official Blender GameKit: Interactive 3D for Artists'},
+    {'edition': None,
+     'isbn13': u'9780262031639',
+     'issued': u'1990-06-05',
+     'name': u'John M. Carroll',
+     'publisher': u'The MIT Press',
+     'title': u'The Nurnberg Funnel: Designing Minimalist Instruction for Practical Computer Skill (Technical Communication, Multimedia, and Information Systems)'},
+    {'edition': None,
+     'isbn13': u'9780262032490',
+     'issued': u'1998-01-23',
+     'name': u'John M. Carroll (editor)',
+     'publisher': u'The MIT Press',
+     'title': u'Minimalism Beyond the Nurnberg Funnel (Technical Communication, Multimedia, and Information Systems)'},
+    {'edition': None,
+     'isbn13': u'9780787947217',
+     'issued': u'2000-02-01',
+     'name': u'George M. Piskurich',
+     'publisher': u'Pfeiffer',
+     'title': u'Rapid Instructional Design : Learning ID Fast and Right'},
+    {'edition': None,
+     'isbn13': u'9780675212625',
+     'issued': u'1993-01-01',
+     'name': u'Patricia L. Smith|Tillman J. Ragan',
+     'publisher': u'Prentice Hall',
+     'title': u'Instructional Design'},
+    {'edition': u'Bk&CD-Rom',
+     'isbn13': u'9780471116882',
+     'issued': u'1996-03-01',
+     'name': u'Allison Druin|Cynthia Solomon',
+     'publisher': u'John Wiley & Sons',
+     'title': u'Designing Multimedia Environments for Children'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780442011642',
+     'issued': u'1992-05-01',
+     'name': u'Nan C. Shu',
+     'publisher': u'Van Nostrand Reinhold Computer',
+     'title': u'Visual Programming'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780140145342',
+     'issued': u'1991-01-01',
+     'name': u'Roger Penrose',
+     'publisher': u'Penguin (Non-Classics)',
+     'title': u"The Emperor's New Mind"},
+    {'edition': u'10th Ann',
+     'isbn13': u'9780465025107',
+     'issued': u'1993-03-01',
+     'name': u'Howard Gardner',
+     'publisher': u'Basic Books',
+     'title': u'Frames of Mind: The Theory of Multiple Intelligences'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780486637600',
+     'issued': u'1979-03-01',
+     'name': u'M.G. Bulmer',
+     'publisher': u'Dover Publications',
+     'title': u'Principles of Statistics'},
+    {'edition': u'1st HarperPerennial Ed',
+     'isbn13': u'9780062731029',
+     'issued': u'1994-02-25',
+     'name': u'Larry Gonick|Woollcott Smith',
+     'publisher': u'Collins',
+     'title': u'Cartoon Guide to Statistics'},
+    {'edition': u'Reprint',
+     'isbn13': u'9781556152238',
+     'issued': u'1989-05-01',
+     'name': u'Bill Landreth',
+     'publisher': u'Tempus Books',
+     'title': u"Out of the Inner Circle: The True Story of a Computer Intruder Capable of Cracking the Nation's Most Secure Computer Systems"},
+    {'edition': None,
+     'isbn13': u'9780078819810',
+     'issued': u'1994-01-01',
+     'name': u'John C. Dvorak',
+     'publisher': u'Mcgraw-Hill Osborne Media',
+     'title': u"Dvorak Predicts: An Insider's Look at the Computer Industry"},
+    {'edition': u'1',
+     'isbn13': u'9781565925823',
+     'issued': u'1999-01-01',
+     'name': u"Brian Behlendorf|Scott Bradner|Jim Hamerly|Kirk McKusick|Tim O'Reilly|Tom Paquin|Bruce Perens|Eric Raymond|Richard Stallman|Michael Tiemann|Linus Torvalds|Paul Vixie|Larry Wall|Bob Young|Chris Dibona (editor)|Sam Ockman (editor)|Mark Stone (editor)",
+     'publisher': u"O'Reilly Media",
+     'title': u"Open Sources: Voices from the Open Source Revolution (O'Reilly Open Source)"},
+    {'edition': u'1st',
+     'isbn13': u'9780060170301',
+     'issued': u'1995-01-01',
+     'name': u'Michelle Slatalla|Joshua Quittner',
+     'publisher': u'Harpercollins',
+     'title': u'Masters of Deception: The Gang That Ruled Cybersshelfe'},
+    {'edition': None,
+     'isbn13': u'9780670865482',
+     'issued': u'1996-09-01',
+     'name': u'Michael Gates Gill|Sheila Paterson',
+     'publisher': u'Viking Adult',
+     'title': u'Fired Up!: From Corporate Kiss Off Entrepreneurial Kick Off Take Charge your Destiny Our Do'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780887306006',
+     'issued': u'1992-08-03',
+     'name': u'Guy Kawasaki',
+     'publisher': u'Collins',
+     'title': u'Selling the Dream'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780679762881',
+     'issued': u'1995-08-29',
+     'name': u'Andrew S. Grove',
+     'publisher': u'Vintage',
+     'title': u'High Output Management (Vintage)'},
+    {'edition': u'1st ed',
+     'isbn13': u'9780679439196',
+     'issued': u'1995-01-31',
+     'name': u'Nicholas Negroponte',
+     'publisher': u'Knopf',
+     'title': u'Being Digital'},
+    {'edition': u'1',
+     'isbn13': u'9788575240052',
+     'issued': u'2001-01-01',
+     'name': u'Steve Krug',
+     'publisher': u'Market Books',
+     'title': u'N\xe3o Me Fa\xe7a Pensar'},
+    {'edition': u'1st',
+     'isbn13': u'9780201502084',
+     'issued': u'1995-12-01',
+     'name': u'Brad Cox',
+     'publisher': u'Addison Wesley Publishing Company',
+     'title': u'Superdistribution: Objects As Property on the Electronic Frontier'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780887307171',
+     'issued': u'1995-10-01',
+     'name': u'Geoffrey A. Moore',
+     'publisher': u'HarperCollins Publishers',
+     'title': u'Crossing the Chasm: Marketing and Selling High-Tech Products to Mainstream Customers'},
+    {'edition': None,
+     'isbn13': u'9780446520188',
+     'issued': u'1996-04-01',
+     'name': u'Red Herring (corporate author)',
+     'publisher': u'Warner Books Inc',
+     'title': u'The Red Herring Guide to the Digital Universe: The Inside Look at Technology Business from Silicon Valley to Hollywood'},
+    {'edition': None,
+     'isbn13': u'9780525937265',
+     'issued': u'1995-10-01',
+     'name': u'Daniel Burstein',
+     'publisher': u'Dutton Books',
+     'title': u'Road Warriors: Dreams and Nightmares Along the Information Highway'},
+    {'edition': None,
+     'isbn13': u'9780465091751',
+     'issued': u'1994-04-01',
+     'name': u'Anne W. Branscomb',
+     'publisher': u'Basic Books',
+     'title': u'Who Owns Information?: From Privacy to Public Access'},
+    {'edition': u'1st',
+     'isbn13': u'9780385482288',
+     'issued': u'1997-05-01',
+     'name': u'Thomas A. Stewart',
+     'publisher': u'Currency',
+     'title': u'Intellectual Capital'},
+    {'edition': u'Updated',
+     'isbn13': u'9780141000510',
+     'issued': u'2001-01-01',
+     'name': u'Steven Levy',
+     'publisher': u'Penguin (Non-Classics)',
+     'title': u'Hackers: Heroes of the Computer Revolution'},
+    {'edition': u'1st',
+     'isbn13': u'9780812928518',
+     'issued': u'1997-10-15',
+     'name': u'Jim Carlton',
+     'publisher': u'Crown Business',
+     'title': u'Apple:: The Inside Story of Intrigue, Egomania, and Business Blunders'},
+    {'edition': u'1',
+     'isbn13': u'9780471357636',
+     'issued': u'1999-09-16',
+     'name': u'David Siegel',
+     'publisher': u'Wiley',
+     'title': u'Futurize Your Enterprise: Business Strategy in the Age of the E-customer'},
+    {'edition': u'1st ed',
+     'isbn13': u'9780679456995',
+     'issued': u'1997-02-25',
+     'name': u'Po Bronson',
+     'publisher': u'Random House',
+     'title': u'First $20 Million Is Always the Hardest:, The: A Silicon Valley Novel'},
+    {'edition': u'1',
+     'isbn13': u'9781565920644',
+     'issued': u'1994-04-01',
+     'name': u'Dave Radin',
+     'publisher': u"O'Reilly",
+     'title': u'Building a Successful Software Business'},
+    {'edition': u'1st ed',
+     'isbn13': u'9780940087200',
+     'issued': u'1989-05-01',
+     'name': u'Roger C. Parker',
+     'publisher': u'Ventana Pr',
+     'title': u'The Makeover Book: 101 Design Solutions for Desktop Publishing'},
+    {'edition': u'1st',
+     'isbn13': u'9780887307874',
+     'issued': u'1996-05-08',
+     'name': u'Scott Adams',
+     'publisher': u'Harper-Collins',
+     'title': u"The Dilbert Principle: Cubicle's-Eye View of Bosses, Meetings, Management Fads, and Other Workplace Afflictions"},
+    {'edition': None,
+     'isbn13': u'9780471503569',
+     'issued': u'1989-10-04',
+     'name': u'H.J. Watson',
+     'publisher': u'John Wiley and Sons Ltd',
+     'title': u'Computer Simulation'},
+    {'edition': u'2Rev Ed',
+     'isbn13': u'9780471919315',
+     'issued': u'1988-07-27',
+     'name': u'M. Pidd',
+     'publisher': u'John Wiley and Sons Ltd',
+     'title': u'Computer Simulation in Management Science'},
+    {'edition': u'2nd',
+     'isbn13': u'9780070849464',
+     'issued': u'1988-09-01',
+     'name': u'Jan Szymankiewicz',
+     'publisher': u'McGraw-Hill Companies',
+     'title': u'Solving Business Problems by Simulation'},
+    {'edition': u'1',
+     'isbn13': u'9780596000066',
+     'issued': u'2001-11-15',
+     'name': u'David M Bourg',
+     'publisher': u"O'Reilly Media",
+     'title': u'Physics for Game Developers'},
+    {'edition': u'CD-Rom',
+     'isbn13': u'9780201634983',
+     'issued': u'1997-06-15',
+     'name': u'Erich Gamma',
+     'publisher': u'Addison Wesley Longman',
+     'title': u'Design Patterns CD'},
+    {'edition': None,
+     'isbn13': u'9780596007126',
+     'issued': u'2004-10-25',
+     'name': u'Elisabeth Freeman',
+     'publisher': u"O'Reilly Media",
+     'title': u'Head First Design Patterns'},
+    {'edition': u'1',
+     'isbn13': u'9780596102142',
+     'issued': u'2005-09-01',
+     'name': u'Eric Freeman',
+     'publisher': u"O'Reilly Media",
+     'title': u'Head First Design Patterns Poster (Head First)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201184624',
+     'issued': u'1998-02-10',
+     'name': u'Sherman R. Alpert',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'The Design Patterns Smalltalk Companion (Software Patterns Series)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201743975',
+     'issued': u'2002-03-25',
+     'name': u'Steven John Metsker',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Design Patterns Java Workbook'},
+    {'edition': u'1st',
+     'isbn13': u'9780136298410',
+     'issued': u'1990-10-01',
+     'name': u'James R Rumbaugh',
+     'publisher': u'Prentice Hall',
+     'title': u'Object-Oriented Modeling and Design'},
+    {'edition': u'2',
+     'isbn13': u'9780805353402',
+     'issued': u'1993-09-30',
+     'name': u'Grady Booch',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Object-Oriented Analysis and Design with Applications (2nd Edition)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201544350',
+     'issued': u'1992-06-30',
+     'name': u'I. Jacobson',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Object-Oriented Software Engineering: A Use Case Driven Approach'},
+    {'edition': u'1st',
+     'isbn13': u'9780201633856',
+     'issued': u'1996-04-30',
+     'name': u'Arthur J. Riel',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Object-Oriented Design Heuristics'},
+    {'edition': u'2',
+     'isbn13': u'9780521785198',
+     'issued': u'2001-02-15',
+     'name': u'Scott W. Ambler',
+     'publisher': u'Cambridge University Press',
+     'title': u'The Object Primer'},
+    {'edition': u'2',
+     'isbn13': u'9780136291558',
+     'issued': u'2000-03-21',
+     'name': u'Bertrand Meyer',
+     'publisher': u'Prentice Hall PTR',
+     'title': u'Object-Oriented Software Construction (Book/CD-ROM) (2nd Edition) (Prentice-Hall International Series in Computer Science)'},
+    {'edition': u'1',
+     'isbn13': u'9780534204969',
+     'issued': u'1995-03-01',
+     'name': u'Rick Decker',
+     'publisher': u'Course Technology',
+     'title': u'The Object Concept: An Introduction to Computer Programming Using C++ (Pws Computer Science)'},
+    {'edition': u'1st',
+     'isbn13': u'9780136299400',
+     'issued': u'1991-09-01',
+     'name': u'Stephen J. Mellor',
+     'publisher': u'Prentice Hall PTR',
+     'title': u'Object Life Cycles: Modeling the World In States (Yourdon Press Computing Series)'},
+    {'edition': u'1st',
+     'isbn13': u'9780471202820',
+     'issued': u'2002-03-22',
+     'name': u'Scott W. Ambler',
+     'publisher': u'Wiley',
+     'title': u'Agile Modeling: Effective Practices for Extreme Programming and the Unified Process'},
+    {'edition': u'1st',
+     'isbn13': u'9780201794274',
+     'issued': u'2002-09-19',
+     'name': u'Doug Wallace',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Extreme Programming for Web Projects'},
+    {'edition': u'1st',
+     'isbn13': u'9780201710915',
+     'issued': u'2000-10-13',
+     'name': u'Kent Beck',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Planning Extreme Programming'},
+    {'edition': u'1st',
+     'isbn13': u'9780201708424',
+     'issued': u'2000-10-13',
+     'name': u'Ron Jeffries',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Extreme Programming Installed'},
+    {'edition': u'1st',
+     'isbn13': u'9780201745764',
+     'issued': u'2002-06-28',
+     'name': u'Laurie Williams',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Pair Programming Illuminated'},
+    {'edition': u'1',
+     'isbn13': u'9788575220474',
+     'issued': u'2004-01-01',
+     'name': u'Vinicius Manhaes Teles',
+     'publisher': None,
+     'title': u'Extreme Programming'},
+    {'edition': u'1st',
+     'isbn13': u'9780201103311',
+     'issued': u'1986-01-01',
+     'name': u'Jon Louis Bentley',
+     'publisher': u'Assn for Computing Machinery',
+     'title': u'Programming Pearls'},
+    {'edition': u'Facsimile',
+     'isbn13': u'9780201118896',
+     'issued': u'1988-01-01',
+     'name': u'Jon Louis Bentley',
+     'publisher': u'Addison Wesley Publishing Company',
+     'title': u'More Programming Pearls: Confessions of a Coder'},
+    {'edition': u'1st',
+     'isbn13': u'9780201616224',
+     'issued': u'1999-10-20',
+     'name': u'Andrew Hunt',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'The Pragmatic Programmer: From Journeyman to Master'},
+    {'edition': u'1st',
+     'isbn13': u'9780201432893',
+     'issued': u'1999-03-15',
+     'name': u'Doug Rosenberg',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Use Case Driven Object Modeling with UML : A Practical Approach (Addison-Wesley Object Technology Series) (Addison-Wesley Object Technology Series)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201730395',
+     'issued': u'2001-06-14',
+     'name': u'Doug Rosenberg',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Applying Use Case Driven Object Modeling with UML: An Annotated e-Commerce Example'},
+    {'edition': u'3',
+     'isbn13': u'9788536304540',
+     'issued': u'2005-01-01',
+     'name': u'Martin Fowler',
+     'publisher': u'Bookman',
+     'title': u'UML Essencial'},
+    {'edition': u'2nd',
+     'isbn13': u'9780201657838',
+     'issued': u'1999-08-25',
+     'name': u'Martin Fowler',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'UML Distilled: A Brief Guide to the Standard Object Modeling Language (2nd Edition)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201571684',
+     'issued': u'1998-09-30',
+     'name': u'Grady Booch',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'The Unified Modeling Language User Guide'},
+    {'edition': u'1st',
+     'isbn13': u'9780201702255',
+     'issued': u'2000-01-15',
+     'name': u'Alistair Cockburn',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Writing Effective Use Cases'},
+    {'edition': u'1st',
+     'isbn13': u'9780201548099',
+     'issued': u'1996-12-20',
+     'name': u'Watts S. Humphrey',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Introduction to the Personal Software Process(sm)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201498349',
+     'issued': u'1997-12-22',
+     'name': u'Alistair Cockburn',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Surviving Object-Oriented Projects (Agile Software Development Series)'},
+    {'edition': u'1st',
+     'isbn13': u'9780805305944',
+     'issued': u'1995-10-12',
+     'name': u'Grady Booch',
+     'publisher': u'Pearson Education',
+     'title': u'Object Solutions: Managing the Object-Oriented Project (OBT)'},
+    {'edition': u'1st',
+     'isbn13': u'9781556159008',
+     'issued': u'1996-07-02',
+     'name': u'Steve McConnell',
+     'publisher': u'Microsoft Press',
+     'title': u'Rapid Development'},
+    {'edition': None,
+     'isbn13': u'9780932633330',
+     'issued': u'1996-08-01',
+     'name': u'Karl E. Wiegers',
+     'publisher': u'Dorset House Publishing Company, Incorporated',
+     'title': u'Creating a Software Engineering Culture'},
+    {'edition': u'1st',
+     'isbn13': u'9780201710403',
+     'issued': u'2001-05-23',
+     'name': u'Giancarlo Succi',
+     'publisher': u'Pearson Education',
+     'title': u'Extreme Programming Examined'},
+    {'edition': u'1st',
+     'isbn13': u'9780201709377',
+     'issued': u'2001-06-05',
+     'name': u'James W. Newkirk',
+     'publisher': u'Prentice Hall',
+     'title': u'Extreme Programming in Practice'},
+    {'edition': u'1',
+     'isbn13': u'9780471122975',
+     'issued': u'1997-08-25',
+     'name': u'David Banisar',
+     'publisher': u'John Wiley & Sons',
+     'title': u'The Electronic Privacy Papers: Documents on the Battle for Privacy in the Age of Surveillance'},
+    {'edition': u'2',
+     'isbn13': u'9780471117094',
+     'issued': u'1995-10-18',
+     'name': u'Bruce Schneier',
+     'publisher': u'Wiley',
+     'title': u'Applied Cryptography: Protocols, Algorithms, and Source Code in C, Second Edition'},
+    {'edition': None,
+     'isbn13': u'9780471053187',
+     'issued': u'1995-01-01',
+     'name': u'Bruce Schneier',
+     'publisher': u'Wiley',
+     'title': u'E-mail Security: How to Keep Your Electronic Messages Private'},
+    {'edition': u'3',
+     'isbn13': u'9788576050247',
+     'issued': u'2005-01-01',
+     'name': u'Andre Luiz Villar Forbellone',
+     'publisher': u'Makron Books',
+     'title': u'L\xf3gica de Programa\xe7\xe3o:a Constru\xe7\xe3o de Algoritmos e Estruturas de Dados'},
+    {'edition': u'1',
+     'isbn13': u'9780415133425',
+     'issued': u'1997-03-25',
+     'name': u'Colin Howson',
+     'publisher': u'Routledge',
+     'title': u'Logic With Trees'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780440518914',
+     'issued': u'1984-10-01',
+     'name': u'Dell Mag Editors',
+     'publisher': u'Dell',
+     'title': u'The Dell Book of Logic Problems (Dell Book of Logic Problems)'},
+    {'edition': u'12',
+     'isbn13': u'9780131898349',
+     'issued': u'2004-07-16',
+     'name': u'Irving M. Copi',
+     'publisher': u'Prentice Hall',
+     'title': u'Introduction to Logic, 12th Edition'},
+    {'edition': u'1',
+     'isbn13': u'9780596007652',
+     'issued': u'2005-10-01',
+     'name': u'Peter Morville',
+     'publisher': u"O'Reilly Media",
+     'title': u'Ambient Findability'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780553264913',
+     'issued': u'1983-01-01',
+     'name': u'Tom Wolfe',
+     'publisher': u'Bantam',
+     'title': u'The Electric Kool-Aid Acid Test'},
+    {'edition': None,
+     'isbn13': u'9780439164832',
+     'issued': u'2001-09-01',
+     'name': u'Laurence Yep',
+     'publisher': u'Scholastic Inc.',
+     'title': u"Lady of Ch'iao Kuo: Warrior of the South, Southern China, A.D. 531 (The Royal Diaries)"},
+    {'edition': None,
+     'isbn13': u'9781880656129',
+     'issued': u'1994-07-01',
+     'name': u'Leonard Koren',
+     'publisher': u'Stone Bridge Press',
+     'title': u'Wabi-Sabi: for Artists, Designers, Poets & Philosophers'},
+    {'edition': u'4',
+     'isbn13': u'9788508040216',
+     'issued': u'1992-01-01',
+     'name': u'Marta de Mello E Souza',
+     'publisher': u'\xc1tica',
+     'title': u'It\xb4s Magic!'},
+    {'edition': u'Deluxe',
+     'isbn13': u'9780448060040',
+     'issued': u'1946-10-01',
+     'name': u'Lewis Carroll',
+     'publisher': u'Grosset & Dunlap',
+     'title': u'Alice in Wonderland and Through the Looking Glass (Illustrated Junior Library)'},
+    {'edition': None,
+     'isbn13': u'9781888869026',
+     'issued': u'1996-12-01',
+     'name': u'Marshall McLuhan',
+     'publisher': u'Hardwired',
+     'title': u'The Medium Is the Massage: An Inventory of Effects'},
+    {'edition': u'[1st ed.]',
+     'isbn13': u'9780804800044',
+     'issued': u'1994-09-01',
+     'name': u'Adele Westbrook',
+     'publisher': u'Tuttle Publishing',
+     'title': u'Aikido and the Dynamic Sphere: An Illustrated Introduction'},
+    {'edition': u'2',
+     'isbn13': u'9788532301987',
+     'issued': u'1992-01-01',
+     'name': u'S. Piret',
+     'publisher': u'Summus',
+     'title': u'Coordena\xe7\xe3o Motora, A'},
+    {'edition': u'Reprint',
+     'isbn13': u'9781591840534',
+     'issued': u'2004-09-28',
+     'name': u'Bethany McLean',
+     'publisher': u'Portfolio Trade',
+     'title': u'The Smartest Guys in the Room: The Amazing Rise and Scandalous Fall of Enron'},
+    {'edition': None,
+     'isbn13': u'9782880467319',
+     'issued': u'2003-08-01',
+     'name': u'Peter Van Dijck',
+     'publisher': u'Rotovision',
+     'title': u'Information Architecture for Designers: Structuring Websites for Business Success'},
+    {'edition': None,
+     'isbn13': u'9781568302898',
+     'issued': u'1996-06-01',
+     'name': u'David Siegel',
+     'publisher': u'Hayden Books',
+     'title': u'Creating Killer Web Sites: The Art of Third-Generation Site Design'},
+    {'edition': u'1st',
+     'isbn13': u'9781562058104',
+     'issued': u'1999-12-20',
+     'name': u'Jakob Nielsen',
+     'publisher': u'Peachpit Press',
+     'title': u'Designing Web Usability : The Practice of Simplicity'},
+    {'edition': u'1st',
+     'isbn13': u'9780735712027',
+     'issued': u'2002-10-11',
+     'name': u'Jesse James Garrett',
+     'publisher': u'New Riders Press',
+     'title': u'The Elements of User Experience: User-Centered Design for the Web'},
+    {'edition': u'2',
+     'isbn13': u'9780789723109',
+     'issued': u'2000-10-13',
+     'name': u'Steve Krug',
+     'publisher': u'New Riders Press',
+     'title': u"Don't Make Me Think: A Common Sense Approach to Web Usability"},
+    {'edition': u'2',
+     'isbn13': u'9780596000356',
+     'issued': u'2002-08-15',
+     'name': u'Louis Rosenfeld',
+     'publisher': u"O'Reilly Media",
+     'title': u'Information Architecture for the World Wide Web: Designing Large-Scale Web Sites'},
+    {'edition': u'1st',
+     'isbn13': u'9780735713062',
+     'issued': u'2002-10-17',
+     'name': u'Ann Rockley',
+     'publisher': u'New Riders Press',
+     'title': u'Managing Enterprise Content: A Unified Content Strategy'},
+    {'edition': u'1st',
+     'isbn13': u'9780201721492',
+     'issued': u'2002-07-22',
+     'name': u'Douglas K. van Duyne',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'The Design of Sites: Patterns, Principles, and Processes for Crafting a Customer-Centered Web Experience'},
+    {'edition': u'2',
+     'isbn13': u'9780764573712',
+     'issued': u'2004-11-26',
+     'name': u'Bob Boiko',
+     'publisher': u'Wiley',
+     'title': u'Content Management Bible (Bible)'},
+    {'edition': u'1',
+     'isbn13': u'9780471142768',
+     'issued': u'1996-02-15',
+     'name': u'Darrell Sano',
+     'publisher': u'John Wiley & Sons',
+     'title': u'Designing Large-Scale Web Sites: A Visual Design Methodology'},
+    {'edition': None,
+     'isbn13': u'9780789019790',
+     'issued': u'2004-09-01',
+     'name': u'Sandra K. Roe (editor)',
+     'publisher': u'Haworth Information Press',
+     'title': u'The Thesaurus: Review, Renaissance and Revision'},
+    {'edition': u'2',
+     'isbn13': u'9780124874053',
+     'issued': u'2000-01-15',
+     'name': u'Charles T. Meadow',
+     'publisher': u'Academic Press',
+     'title': u'Text Information Retrieval Systems (Library and Information Science)'},
+    {'edition': None,
+     'isbn13': u'9781857937954',
+     'issued': u'1996-04-25',
+     'name': u'Terry Jones',
+     'publisher': u'HarperCollins Publishers',
+     'title': u'The Goblin Companion: A Field Guide to Goblins'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780880886819',
+     'issued': u'1994-09-01',
+     'name': u'Nick Beilenson',
+     'publisher': u'Peter Pauper Pr',
+     'title': u"World's Best Limericks"},
+    {'edition': None,
+     'isbn13': u'9789879479001',
+     'issued': u'2004-04-01',
+     'name': u'Monica G. Hoss de le Comte',
+     'publisher': u'Maizal Ediciones',
+     'title': u'El Gaucho'},
+    {'edition': None,
+     'isbn13': u'9789879789940',
+     'issued': u'2004-04-01',
+     'name': u'Monica G. Hoss de le Comte',
+     'publisher': u'Maizal Ediciones',
+     'title': u'El Tango'},
+    {'edition': None,
+     'isbn13': u'9789879479100',
+     'issued': u'2003-09-01',
+     'name': u'Christian Le Comte',
+     'publisher': u'Maizal',
+     'title': u'Indigenas Argentinos'},
+    {'edition': u'Graphic No',
+     'isbn13': u'9780811831475',
+     'issued': u'2001-07-01',
+     'name': u'Cosmic Debris',
+     'publisher': u'Chronicle Books',
+     'title': u'Emily The Strange (Emily the Strange)'},
+    {'edition': None,
+     'isbn13': u'9780811805551',
+     'issued': u'1995-02-01',
+     'name': u'Leslie Jonath',
+     'publisher': u'Chronicle Books',
+     'title': u'Postmark Paris'},
+    {'edition': None,
+     'isbn13': u'9780582535299',
+     'issued': u'1989-01-01',
+     'name': u'William Shakespeare',
+     'publisher': u'Longman Publishing Group',
+     'title': u'Stories from Shakespeare (New Method Supplementary Readers)'},
+    {'edition': u'4th',
+     'isbn13': u'9781560974277',
+     'issued': u'2001-04-01',
+     'name': u'Daniel Clowes',
+     'publisher': u'Fantagraphics Books',
+     'title': u'Ghost World'},
+    {'edition': None,
+     'isbn13': u'9780395259399',
+     'issued': u'1977-10-12',
+     'name': u'Virginia Lee Burton',
+     'publisher': u'Houghton Mifflin',
+     'title': u'Mike Mulligan and His Steam Shovel (Sandpiper Books)'},
+    {'edition': None,
+     'isbn13': u'9780811811408',
+     'issued': u'1996-08-01',
+     'name': u'Nick Bantock',
+     'publisher': u'Chronicle Books',
+     'title': u"The Venetian's Wife: A Strangely Sensual Tale of a Renaissance Explorer, a Computer, and a Metamorphosis"},
+    {'edition': u'Comic',
+     'isbn13': u'9781560971498',
+     'issued': u'1997-07-01',
+     'name': u'Bill Griffith',
+     'publisher': u'Fantagraphics Books',
+     'title': u'Are We Having Fun Yet'},
+    {'edition': None,
+     'isbn13': u'9780670867967',
+     'issued': u'1996-05-01',
+     'name': u'Jack London',
+     'publisher': u'Viking Juvenile',
+     'title': u'The Call of the Wild (Whole Story)'},
+    {'edition': None,
+     'isbn13': u'9780394831299',
+     'issued': u'1975-08-12',
+     'name': u'Dr. Seuss',
+     'publisher': u'Random House Books for Young Readers',
+     'title': u'Oh, the Thinks You Can Think! (Beginner Books(R))'},
+    {'edition': u'1',
+     'isbn13': u'9788586374364',
+     'issued': u'2000-01-01',
+     'name': u'Laurence Benaim',
+     'publisher': u'Cosac & Naify',
+     'title': u'Universo da Moda: Issey Miyake'},
+    {'edition': u'Revised',
+     'isbn13': u'9780262720069',
+     'issued': u'1977-06-15',
+     'name': u'Robert Venturi',
+     'publisher': u'The MIT Press',
+     'title': u'Learning from Las Vegas - Revised Edition: The Forgotten Symbolism of Architectural Form'},
+    {'edition': None,
+     'isbn13': u'9780715623053',
+     'issued': u'1988-12-01',
+     'name': u'Oscar Wilde',
+     'publisher': u'Duckworth Publishing',
+     'title': u'Sayings of Oscar Wilde (Duckworth Sayings Series)'},
+    {'edition': None,
+     'isbn13': u'9781573225519',
+     'issued': u'1996-08-01',
+     'name': u'Nick Hornby',
+     'publisher': u'Riverhead Trade',
+     'title': u'High Fidelity'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780671898267',
+     'issued': u'1995-03-01',
+     'name': u'Banana Yoshimoto',
+     'publisher': u'Washington Square Press',
+     'title': u'NP'},
+    {'edition': None,
+     'isbn13': u'9788535900132',
+     'issued': u'2000-01-01',
+     'name': u'Milton Hatoum',
+     'publisher': u'Companhia das Letras',
+     'title': u'Dois irm\xe3os'},
+    {'edition': u'1',
+     'isbn13': u'9788535902877',
+     'issued': u'2002-01-01',
+     'name': u'Bernardo Carvalho',
+     'publisher': u'Companhia das Letras',
+     'title': u'Nove Noites'},
+    {'edition': u'1',
+     'isbn13': u'9788532509512',
+     'issued': u'1988-01-01',
+     'name': u'Clarice Lispector',
+     'publisher': u'Rocco',
+     'title': u'Descoberta do Mundo, A'},
+    {'edition': u'1',
+     'isbn13': u'9788571645301',
+     'issued': u'2000-01-01',
+     'name': u'Antonio R. Damasio',
+     'publisher': u'Companhia das Letras',
+     'title': u'Erro de Descartes: Emo\xe7\xe3o, Raz\xe3o e o C\xe9rebro Humano, O'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780139376818',
+     'issued': u'1984-03-01',
+     'name': u'Brian W. Kernighan|Rob Pike',
+     'publisher': u'Prentice Hall',
+     'title': u'The UNIX Programming Environment'},
+    {'edition': u'Updated',
+     'isbn13': u'9780393048476',
+     'issued': u'1999-11-01',
+     'name': u'Lewis Carroll|Martin Gardner (editor)|John Tenniel (illustrator)',
+     'publisher': u'W. W. Norton & Company',
+     'title': u'The Annotated Alice: The Definitive Edition'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780679640356',
+     'issued': u'2000-05-30',
+     'name': u'Nora Ephron',
+     'publisher': u'Modern Library',
+     'title': u'Crazy Salad: Some Things About Women (Modern Library Humor and Wit)'},
+    {'edition': u'New Ed',
+     'isbn13': u'9780747550990',
+     'issued': u'2001-07-06',
+     'name': u'J.K. Rowling',
+     'publisher': u'Bloomsbury',
+     'title': u'Harry Potter and the Goblet of Fire'},
+    {'edition': u'Book & CD',
+     'isbn13': u'9780743228282',
+     'issued': u'2005-09-13',
+     'name': u'Bob Dylan',
+     'publisher': u'Simon & Schuster',
+     'title': u'The Bob Dylan Scrapbook, 1956-1966'},
+    {'edition': None,
+     'isbn13': u'9781929133178',
+     'issued': u'2004-06-21',
+     'name': u'Tim Remus',
+     'publisher': u'Wolfgang Publications, Inc.',
+     'title': u'How to Build a Cheap Chopper'},
+    {'edition': None,
+     'isbn13': u'9780793502639',
+     'issued': u'1986-09-01',
+     'name': u'Chuck Berry',
+     'publisher': u'Hal Leonard Corporation',
+     'title': u'Chuck Berry (Guitar Recorded Versions)'},
+    {'edition': None,
+     'isbn13': u'9780896893344',
+     'issued': u'2006-07-11',
+     'name': u'Donna Dewberry',
+     'publisher': u'Krause Publications',
+     'title': u"Donna Dewberry's Machine Embroidery Flowers"},
+    {'edition': u'1st',
+     'isbn13': u'9780312333102',
+     'issued': u'2006-03-21',
+     'name': u"K'wan Foye",
+     'publisher': u"St. Martin's Griffin",
+     'title': u'Eve'},
+    {'edition': None,
+     'isbn13': u'9780395730928',
+     'issued': u'1997-03-31',
+     'name': u'Stephanie Gordon Tessler|Judith Ross Enderle|Brian Floca (illustrator)',
+     'publisher': u'Houghton Mifflin',
+     'title': u'Where Are You, Little Zack?'},
+    {'edition': u'3',
+     'isbn13': u'9780131002876',
+     'issued': u'2002-12-06',
+     'name': u'Bruce Eckel',
+     'publisher': u'Prentice Hall PTR',
+     'title': u'Thinking in Java (3rd Edition)'},
+    {'edition': None,
+     'isbn13': u'9781932394610',
+     'issued': u'2005-10-01',
+     'name': u'Dave Crane|Eric Pascarello|Darren James',
+     'publisher': u'Manning Publications',
+     'title': u'Ajax in Action'},
+    {'edition': u'2nd',
+     'isbn13': u'9780974514055',
+     'issued': u'2004-10-01',
+     'name': u'Dave Thomas|Chad Fowler|Andy Hunt',
+     'publisher': u'Pragmatic Bookshelf',
+     'title': u"Programming Ruby: The Pragmatic Programmers' Guide, Second Edition"},
+    {'edition': u'1',
+     'isbn13': u'9780976694007',
+     'issued': u'2005-07-01',
+     'name': u'Dave Thomas|David Heinemeier Hansson|Andreas Schwarz|Thomas Fuchs|Leon Breedt|Mike Clark',
+     'publisher': u'Pragmatic Bookshelf',
+     'title': u'Agile Web Development with Rails: A Pragmatic Guide (Pragmatic Programmers)'},
+    {'edition': None,
+     'isbn13': u'9780140271737',
+     'issued': u'1998-09-24',
+     'name': u'C.S. Forester',
+     'publisher': u'Gardners Books',
+     'title': u"The Young Hornblower : Mr.Midshipman Hornblower', 'Lieutenant Hornblower', 'Hornblower and the 'Hotspur"},
+    {'edition': u'Bk&CD-Rom',
+     'isbn13': u'9780672322068',
+     'issued': u'2001-10-12',
+     'name': u'Michael Urban|Brian Tiemann',
+     'publisher': u'Sams',
+     'title': u'FreeBSD Unleashed (With CD-ROM)'},
+    {'edition': u'18., neu bearb. u. erw. Aufl',
+     'isbn13': u'9783411009015',
+     'issued': u'1980-01-01',
+     'name': u'Konrad Duden',
+     'publisher': u'Bibliographisches Institut & F.A. Brockhaus A',
+     'title': u'Rechtschreibung Der Deutschen Sprache Und Der Fremdworter (Der Duden in 10 Banden)'},
+    {'edition': u'2nd',
+     'isbn13': u'9780486203942',
+     'issued': u'1957-06-01',
+     'name': u'Martin Gardner',
+     'publisher': u'Dover Publications',
+     'title': u'Fads and Fallacies in the Name of Science (Popular Science)'},
+    {'edition': u'1st',
+     'isbn13': u'9780201379211',
+     'issued': u'1998-02-09',
+     'name': u'lyn dupre',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'BUGS in Writing: A Guide to Debugging Your Prose (2nd Edition)'},
+    {'edition': None,
+     'isbn13': u'9780671607401',
+     'issued': u'1987-02-15',
+     'name': u'Marvin Minsky',
+     'publisher': u'Simon & Schuster',
+     'title': u'Society of Mind'},
+    {'edition': u'Revised',
+     'isbn13': u'9780060517120',
+     'issued': u'2002-08-01',
+     'name': u'Geoffrey A. Moore',
+     'publisher': u'Collins',
+     'title': u'Crossing the Chasm'},
+    {'edition': None,
+     'isbn13': u'9780300110562',
+     'issued': u'2006-05-16',
+     'name': u'Yochai Benkler',
+     'publisher': u'Yale University Press',
+     'title': u'The Wealth of Networks: How Social Production Transforms Markets and Freedom'},
+    {'edition': u'1',
+     'isbn13': u'9788534608954',
+     'issued': u'1999-01-01',
+     'name': u'Anthony F. Iasi|Steven W. Griffith|Mark C. Chan',
+     'publisher': None,
+     'title': u'Java: 1001 Dicas de Programa\xe7\xe3o'},
+    {'edition': u'02',
+     'isbn13': u'9781590590553',
+     'issued': u'2003-06-05',
+     'name': u'Andrew Troelsen',
+     'publisher': u'Apress',
+     'title': u'C# and the .NET Platform, Second Edition'},
+    {'edition': u'1',
+     'isbn13': u'9781592003464',
+     'issued': u'2004-05-28',
+     'name': u"Tom Igoe|Dan O'Sullivan",
+     'publisher': u'Course Technology PTR',
+     'title': u'Physical Computing: Sensing and Controlling the Physical World with Computers'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780812968361',
+     'issued': u'2006-01-10',
+     'name': u'Mitchell Zuckoff',
+     'publisher': u'Random House Trade Paperbacks',
+     'title': u"Ponzi's Scheme: The True Story of a Financial Legend"},
+    {'edition': u'1st',
+     'isbn13': u'9781568811710',
+     'issued': u'2002-07-01',
+     'name': u'Andrew Glassner',
+     'publisher': u'AK Peters, Ltd.',
+     'title': u"Andrew Glassner's Other Notebook: Further Recreations in Computer Graphics"},
+    {'edition': u'5th',
+     'isbn13': u'9780933635869',
+     'issued': u'1992-05-01',
+     'name': u'Sandy Petersen|Lynn Willis',
+     'publisher': u'Chaosium',
+     'title': u'Call of Cthulhu'},
+    {'edition': None,
+     'isbn13': u'9780946819409',
+     'issued': u'1993-10-01',
+     'name': u'Jeff Loader|Jennie Loader',
+     'publisher': u'Sterling Pub Co Inc',
+     'title': u'Making Board, Peg & Dice Games'},
+    {'edition': u'2nd',
+     'isbn13': u'9781558703155',
+     'issued': u'1993-10-01',
+     'name': u'Stephen Peek',
+     'publisher': u'Betterway Books',
+     'title': u"The Game Inventor's Handbook"},
+    {'edition': None,
+     'isbn13': u'9781592570621',
+     'issued': u'2003-07-01',
+     'name': u'Ronald O. Weingartner|Richard Levy',
+     'publisher': u'Alpha',
+     'title': u"The Toy and Game Inventor's Handbook"},
+    {'edition': None,
+     'isbn13': u'9780804803922',
+     'issued': u'1964-06-01',
+     'name': u'Eleanor Noss Whitney',
+     'publisher': u'Tuttle Publishing',
+     'title': u'Mah Jong Handbook : How to Play, Score, and Win the Modern Game'},
+    {'edition': None,
+     'isbn13': u'9780486206134',
+     'issued': u'1960-06-01',
+     'name': u'Edward Lasker',
+     'publisher': u'Dover Publications',
+     'title': u'Go and Go-Moku'},
+    {'edition': u'2nd',
+     'isbn13': u'9780023548567',
+     'issued': u'2000-01-01',
+     'name': u'Francis S. Hill',
+     'publisher': u'Prentice Hall',
+     'title': u'Computer Graphics Using Open GL (2nd Edition)'},
+    {'edition': u'5',
+     'isbn13': u'9780321335739',
+     'issued': u'2000-01-01',
+     'name': u'OpenGL Architecture Review Board|Dave Shreiner|Mason Woo|Jackie Neider|Tom Davis',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'OpenGL(R) Programming Guide: The Official Guide to Learning OpenGL(R), Version 2 (5th Edition)'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780262632447',
+     'issued': u'2001-10-01',
+     'name': u'John Maeda|Paola Antonelli',
+     'publisher': u'The MIT Press',
+     'title': u'Design By Numbers'},
+    {'edition': u'1ST',
+     'isbn13': u'9780262561273',
+     'issued': u'2000-01-31',
+     'name': u'Gary William Flake',
+     'publisher': u'The MIT Press',
+     'title': u'The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation'},
+    {'edition': u'Reprint',
+     'isbn13': u'9780262680936',
+     'issued': u'1997-01-10',
+     'name': u'Mitchel Resnick',
+     'publisher': u'The MIT Press',
+     'title': u'Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds (Complex Adaptive Systems)'},
+    {'edition': None,
+     'isbn13': u'9780500203675',
+     'issued': u'2000-01-01',
+     'name': u'Christiane Paul',
+     'publisher': u'Thames & Hudson',
+     'title': u'Digital Art (World of Art)'},
+    {'edition': u'Book & CD',
+     'isbn13': u'9780879307271',
+     'issued': u'2003-02-01',
+     'name': u'Carl Humphries',
+     'publisher': u'Backbeat Books',
+     'title': u'The Piano Handbook: A Complete Guide for Mastering Piano'},
+    {'edition': u'1',
+     'isbn13': u'9780977616602',
+     'issued': u'2006-06-01',
+     'name': u'Chad Fowler',
+     'publisher': u'Pragmatic Bookshelf',
+     'title': u'Rails Recipes (Pragmatic Programmers)'},
+    {'edition': u'1',
+     'isbn13': u'9780976694069',
+     'issued': u'2006-04-01',
+     'name': u'Maik Schmidt',
+     'publisher': u'Pragmatic Bookshelf',
+     'title': u'Enterprise Integration with Ruby'},
+    {'edition': u'1',
+     'isbn13': u'9780596002145',
+     'issued': u'2001-11-01',
+     'name': u'Yukihiro Matsumoto',
+     'publisher': u"O'Reilly Media",
+     'title': u'Ruby In A Nutshell'},
+    {'edition': u'1',
+     'isbn13': u'9788576080817',
+     'issued': u'2005-01-01',
+     'name': u'Gutmans|Bakken|Rethans',
+     'publisher': u'Alta Books',
+     'title': u'PHP 5: Programa\xe7\xe3o Poderosa'},
+    {'edition': u'2',
+     'isbn13': u'9780596007973',
+     'issued': u'2000-01-01',
+     'name': u'Alex Martelli|David Ascher|Anna Ravenscroft',
+     'publisher': u"O'Reilly Media",
+     'title': u'Python Cookbook'},
+    {'edition': u'1',
+     'isbn13': u'9780596101398',
+     'issued': u'2005-12-01',
+     'name': u'Jack D Herrington',
+     'publisher': u"O'Reilly Media",
+     'title': u'PHP Hacks: Tips & Tools for Creating Dynamic Web Sites (Hacks)'},
+    {'edition': None,
+     'isbn13': u'9780131471498',
+     'issued': u'2004-10-27',
+     'name': u'Andi Gutmans|Stig Bakken|Derick Rethans',
+     'publisher': u'Prentice Hall Ptr',
+     'title': u'PHP 5 Power Programming (Bruce Perens Open Source)'},
+    {'edition': None,
+     'isbn13': u'9781904811824',
+     'issued': u'2006-03-01',
+     'name': u'Cristian Darie|Bogdan Brinzarea|Mihai Bucica',
+     'publisher': u'Shelfkt Publishing',
+     'title': u'Ajax And Php: Building Responsive Web Applications'},
+    {'edition': u'1',
+     'isbn13': u'9781565926813',
+     'issued': u'2002-10-31',
+     'name': u'David Sklar|Adam Trachtenberg',
+     'publisher': u"O'Reilly Media",
+     'title': u'PHP Cookbook'},
+    {'edition': u'1',
+     'isbn13': u'9780596006365',
+     'issued': u'2004-07-01',
+     'name': u'Adam Trachtenberg',
+     'publisher': u"O'Reilly Media",
+     'title': u'Upgrading to PHP 5'},
+    {'edition': u'1ST',
+     'isbn13': u'9781565926103',
+     'issued': u'2002-03-01',
+     'name': u'Rasmus Lerdorf|Kevin Tatroe',
+     'publisher': u"O'Reilly Media",
+     'title': u'Programming PHP'},
+    {'edition': u'1',
+     'isbn13': u'9788575220443',
+     'issued': u'2004-01-01',
+     'name': u'Juliano Niederauer',
+     'publisher': None,
+     'title': u'PHP para Quem Conhece PHP'},
+    {'edition': None,
+     'isbn13': u'9781590595091',
+     'issued': u'2005-09-23',
+     'name': u'Lee Babin|Nathan A. Good|Frank M. Kromann|Jon Stephens',
+     'publisher': u'Apress',
+     'title': u'PHP 5 Recipes: A Problem-Solution Approach (Problem-Solution Approach)'},
+    {'edition': u'4',
+     'isbn13': u'9780596004828',
+     'issued': u'2003-06-01',
+     'name': u'Ellen Siever|Aaron Weber|Stephen Figgins (editor)',
+     'publisher': u"O'Reilly",
+     'title': u'Linux in a Nutshell, Fourth Edition'},
+    {'edition': u'1ST',
+     'isbn13': u'9780735708525',
+     'issued': u'1999-12-20',
+     'name': u'Ed Petron|Laurie Petrycki',
+     'publisher': u'Sams',
+     'title': u'Linux Essential Reference (Essential Reference Series)'},
+    {'edition': u'2',
+     'isbn13': u'9781565920019',
+     'issued': u'1995-01-01',
+     'name': u"Daniel Gilly|The staff of O'Reilly Media",
+     'publisher': u"O'Reilly",
+     'title': u'Unix in a Nutshell: System V & Solaris 2.0'},
+    {'edition': u'Reissue',
+     'isbn13': u'9780140118131',
+     'issued': u'1992-03-01',
+     'name': u'D. G. Wells|John Sharp (illustrator)',
+     'publisher': u'Penguin Books',
+     'title': u'The Penguin Dictionary of Curious and Interesting Geometry (Penguin Science)'},
+    {'edition': None,
+     'isbn13': u'9780716721444',
+     'issued': u'1990-10-01',
+     'name': u'A. K. Dewdney',
+     'publisher': u'W.H. Freeman & Company',
+     'title': u'The Magic Machine: A Handbook of Computer Sorcery'},
+    {'edition': u'1ST',
+     'isbn13': u'9780130476777',
+     'issued': u'2002-09-20',
+     'name': u'Martin Fink',
+     'publisher': u'Prentice Hall Ptr',
+     'title': u'The Business and Economics of Linux and Open Source'},
+    {'edition': u'1',
+     'isbn13': u'9780596006761',
+     'issued': u'2004-01-01',
+     'name': u'Bruce Tate|Justin Gehtland',
+     'publisher': u"O'Reilly Media",
+     'title': u'Better, Faster, Lighter Java'},
+    {'edition': u'Spiral',
+     'isbn13': u'9780534140465',
+     'issued': u'1992-01-01',
+     'name': u'Rick Decker',
+     'publisher': u'PWS Pub. Co.',
+     'title': u'Analytical Engine: An Introduction to Computer Science Using Toolbook'},
+    {'edition': u'1',
+     'isbn13': u'9781568812311',
+     'issued': u'2004-07-29',
+     'name': u'Andrew Glassner',
+     'publisher': u'AK Peters, Ltd.',
+     'title': u'Morphs, Mallards, & Montages: Computer-aided Imagination'},
+    {'edition': u'Bk&CD-Rom',
+     'isbn13': u'9780131176553',
+     'issued': u'2000-01-01',
+     'name': u'Mark Guzdial',
+     'publisher': u'Prentice Hall',
+     'title': u'Introduction to Computing and Programming in Python, A Multimedia Approach'},
+    {'edition': u'1',
+     'isbn13': u'9788588745193',
+     'issued': u'2002-01-01',
+     'name': u'Martina Brockmann|K. Kirchner|Sebastian Luhnsdorf|Et Al.',
+     'publisher': None,
+     'title': u'Zope: Kit de Constru\xe7\xe3o de Aplicativos de Web'},
+    {'edition': u'1ST',
+     'isbn13': u'9780735711105',
+     'issued': u'2001-12-12',
+     'name': u'Steve Spicklemire|Kevin Friedly|Jerry Spicklemire|Kim Brand',
+     'publisher': u'Sams',
+     'title': u'Zope: Web Application Development and Content Management'},
+    {'edition': u'1ST',
+     'isbn13': u'9780735711372',
+     'issued': u'2001-07-17',
+     'name': u'Amos Latteier|Michel Pelletier',
+     'publisher': u'Sams',
+     'title': u'The Zope Book'},
+    {'edition': u'1',
+     'isbn13': u'9781886411579',
+     'issued': u'2001-10-15',
+     'name': u'Beehive',
+     'publisher': u'No Starch Press',
+     'title': u'The Book of Zope'},
+    {'edition': None,
+     'isbn13': u'9780672326172',
+     'issued': u'2005-02-02',
+     'name': u'Stephan Richter',
+     'publisher': u'Sams',
+     'title': u"Zope 3 Developer's Handbook, First Edition"},
+    {'edition': None,
+     'isbn13': u'9781904811022',
+     'issued': u'2004-11-30',
+     'name': u'Cameron Cooper',
+     'publisher': u'Shelfkt Publishing',
+     'title': u'Building Websites With Plone'},
+    {'edition': u'1',
+     'isbn13': u'9781590593295',
+     'issued': u'2004-06-28',
+     'name': u'Andy McKay',
+     'publisher': u'Apress',
+     'title': u'The Definitive Guide to Plone'},
+    {'edition': u'1',
+     'isbn13': u'9780672326875',
+     'issued': u'2000-01-01',
+     'name': u'Julie C. Meloni',
+     'publisher': u'Sams',
+     'title': u'Plone Content Management Essentials'},
+    {'edition': u'1',
+     'isbn13': u'9781565924345',
+     'issued': u'1999-08-01',
+     'name': u'Randy Jay Yarger|George Reese|Tim King',
+     'publisher': u"O'Reilly",
+     'title': u'MySQL and mSQL'},
+    {'edition': u'2nd',
+     'isbn13': u'9781563089695',
+     'issued': u'2003-11-30',
+     'name': u'Arlene G. Taylor',
+     'publisher': u'Libraries Unlimited',
+     'title': u'The Organization of Information: Second Edition (Library and Information Science Text Series)'},
+    {'edition': u'1',
+     'isbn13': u'9780596100124',
+     'issued': u'2005-05-06',
+     'name': u'C.J. Date',
+     'publisher': u"O'Reilly Media",
+     'title': u'Database in Depth: Relational Theory for Practitioners'},
+    {'edition': u'1ST',
+     'isbn13': u'9780201694710',
+     'issued': u'1996-12-19',
+     'name': u'Michael J. Hernandez',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design'},
+    {'edition': u'1',
+     'isbn13': u'9783540223597',
+     'issued': u'2005-04-19',
+     'name': u'Philipp von Weitershausen',
+     'publisher': u'Springer',
+     'title': u'Web Component Development with Zope 3'},
+    {'edition': None,
+     'isbn13': u'9780789024039',
+     'issued': u'2005-03-01',
+     'name': u'Audrey Fenner (editor)',
+     'publisher': u'Haworth Press',
+     'title': u'Managing Digital Resources In Libraries (Acquisitions Librarian Monographic Separates)'},
+    {'edition': u'1ST',
+     'isbn13': u'9780201398298',
+     'issued': u'2000-01-01',
+     'name': u'Ricardo Baeza-Yates|Berthier Ribeiro-Neto',
+     'publisher': u'Addison Wesley',
+     'title': u'Modern Information Retrieval'},
+    {'edition': u'2',
+     'isbn13': u'9780471200246',
+     'issued': u'2002-04-26',
+     'name': u'Ralph Kimball|Margy Ross',
+     'publisher': u'Wiley',
+     'title': u'The Data Warehouse Toolkit: The Complete Guide to Dimensional Modeling (Second Edition)'},
+    {'edition': u'1',
+     'isbn13': u'9780596002473',
+     'issued': u'2002-03-15',
+     'name': u'Samuele Pedroni|Noel Rappin',
+     'publisher': u"O'Reilly Media",
+     'title': u"Jython Essentials (O'Reilly Scripting)"},
+    {'edition': u'1ST',
+     'isbn13': u'9780201616163',
+     'issued': u'2000-01-01',
+     'name': u'Richard Hightower',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'Python Programming with the Java Class Libraries: A Tutorial for Building Web and Enterprise Applications'},
+    {'edition': u'1ST',
+     'isbn13': u'9780735711112',
+     'issued': u'2001-12-18',
+     'name': u'Robert Bill',
+     'publisher': u'Sams',
+     'title': u'Jython for Java Programmers'},
+    {'edition': u'1',
+     'isbn13': u'9780596100940',
+     'issued': u'2005-09-22',
+     'name': u'Bruce Tate',
+     'publisher': u"O'Reilly Media",
+     'title': u'Beyond Java'},
+    {'edition': None,
+     'isbn13': u'9780971677500',
+     'issued': u'2002-01-04',
+     'name': u'Allen Downey|Jeffrey Elkner|Chris Meyers',
+     'publisher': u'Green Tea Pr',
+     'title': u'How to Think Like a Computer Scientist: Learning with Python'},
+    {'edition': u'2nd Rev',
+     'isbn13': u'9780262681155',
+     'issued': u'2000-04-18',
+     'name': u'Howard Rheingold',
+     'publisher': u'The MIT Press',
+     'title': u'Tools for Thought: The History and Future of Mind-Expanding Technology'},
+    {'edition': None,
+     'isbn13': u'9780060527990',
+     'issued': u'2006-07-01',
+     'name': u'Paulo Coelho',
+     'publisher': u'HarperCollins',
+     'title': u'The Devil and Miss Prym: A Novel of Temptation'},
+    {'edition': None,
+     'isbn13': u'9780060831318',
+     'issued': u'2005-05-17',
+     'name': u'Paulo Coelho',
+     'publisher': u'Rayo',
+     'title': u'El Zahir : Una Novela de Obsesion'},
+    {'edition': u'Revised',
+     'isbn13': u'9780609609712',
+     'issued': u'2001-10-02',
+     'name': u'Larousse Gastronomique|Prosper Montagne (editor)',
+     'publisher': u'Clarkson Potter',
+     'title': u'Larousse Gastronomique'},
+    {'edition': u'1',
+     'isbn13': u'9788571645097',
+     'issued': u'1995-01-01',
+     'name': u'Bill Gates',
+     'publisher': u'Companhia Das Letras',
+     'title': u'A Estrada Do Futuro'},
+    {'edition': None,
+     'isbn13': u'9781904811862',
+     'issued': u'2006-06-08',
+     'name': u'Sohail Salehi',
+     'publisher': u'Shelfkt Publishing',
+     'title': u'ImageMagick Tricks: Web Image Effects from the Command Line and PHP'},
+    {'edition': u'2',
+     'isbn13': u'9780977616657',
+     'issued': u'2006-05-31',
+     'name': u'Mike Mason',
+     'publisher': u'Pragmatic Bookshelf',
+     'title': u'Pragmatic Version Control: Using Subversion (The Pragmatic Starter Kit Series)(2nd Edition)'},
+    {'edition': u'3',
+     'isbn13': u'9780321193681',
+     'issued': u'2003-09-19',
+     'name': u'Martin Fowler',
+     'publisher': u'Addison-Wesley Professional',
+     'title': u'UML Distilled: A Brief Guide to the Standard Object Modeling Language, Third Edition'}
+]


Property changes on: grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/collection.py
___________________________________________________________________
Name: svn:executable
   + *

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/import.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/import.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/import.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from xmlrpclib import ServerProxy
+from sys import argv, maxint
+
+if __name__=='__main__':
+    from collection import collection
+    collection = [{'title':book['title'].replace('/', '')} for book in collection]
+    instance = argv[1]
+    if len(argv)==3:
+        qty = int(argv[2])
+    else:
+        qty = maxint
+    srv = ServerProxy("http://localhost:8080/%s/shelf" % instance)
+    for book in collection:
+        try:
+            #print srv.add({'title':book['title'].encode('ascii', 'replace').replace('/', '')})
+            srv.addbook(book)
+        except TypeError:
+            pass
+        qty -= 1
+        if qty == 0: break


Property changes on: grok/trunk/doc/examples/bookshelf/src/bookshelf/demo/import.py
___________________________________________________________________
Name: svn:executable
   + *

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/doc/searching.txt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/doc/searching.txt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/doc/searching.txt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,90 @@
+=========
+Searching
+=========
+
+
+Introduction
+------------
+Grok supports the vanilla indexing services available in Zope 3 straight out of the box. Catalog uses developer defined indexes for searching. In other words, you have to define the indexes you want to use to search you objects before you perform the actual search.
+
+* Field: search matching an entire field
+* Set: search for keywords in a field
+* Text: full-text searching
+
+The module that provides a catalog is zope.app.catalog. Catalog is a utility that contains indexes and can perform searches.
+
+
+Example: BookShelf
+------------------
+We will use an example application to demonstrate how to register indexes and perform searches on zope.app.catalog. The code can be downloaded here: http://paleosoft.googlecode.com/svn/bookshelf/.
+
+Is this example we have a Shelf that can contain many books. The books are a simple model composed only by title.
+
+Before we can search anything, we need to add some data: for this task, we will demonstrate how to use XMLRPC in Grok.
+
+
+XML-RPC in Grok: Adding and retrieving data remotely
+----------------------------------------------------
+XML-RPC is a remote procedure call protocol encoded in XML that uses HTTP as the transport layer. You can call remote methods and other callable structures just like a local call.
+
+To serve the contents of a Model via XMLRPC you need to create a subclass of grok.XMLRPC. The example below shows how to do that.
+
+::
+
+    class Shelf(grok.Container):
+        pass
+
+    class ShelfRPC(grok.XMLRPC):
+        def list(self):
+            return list(self.context.keys())
+
+        def add(self, book_dict):
+            shelf = self.context
+            book = Book(**book_dict) # see book.py
+            name = INameChooser(shelf).chooseName(book_dict.get('title'), book) # see shelf.py
+            shelf[name] = book
+            return name
+
+And thats it. You now have a complete list of the items contained on shelf and can add some items (books, in this case) to shelf. Here is how you can access these methods over the web.
+
+::
+
+    >>> import xmlrpclib
+    >>> server = xmlrpclib.ServerProxy("http://localhost:8080/bookshelf/shelf") # Use your app URL
+    >>> server.add({'title':'Test one'})
+    'Test one'
+    >>> server.add({'title':'Test two'})
+    'Test two'
+    >>> server.list()
+    ['Test one', 'Test two']
+
+
+ME GROK SEARCH THE DATA!
+------------------------
+Expain how to search using zope.app.catalog.
+
+::
+
+    import grok
+    from zope.app.catalog.interfaces import ICatalog
+    from zope.component import getUtility
+    from operator import attrgetter
+    from shelf import Shelf
+    
+    class Index(grok.View):
+        grok.context(Shelf)
+        def update(self, query=None):
+            if not query:
+                results = self.context.values()
+            else:
+                catalog = getUtility(ICatalog)
+                results = catalog.searchResults(title=query)
+                # Note: to sort the results, we must cast the result iterable
+                # to a list, which can be very expensive
+                results = list(results)
+            self.results = sorted(results, key=attrgetter('title'))
+
+
+Other ways to perform queries
+-----------------------------
+Explain hurry.query and its strenghs (using code from grok/doc/minitutorials/searching.txt).
\ No newline at end of file

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/ftesting.zcml
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/ftesting.zcml	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/ftesting.zcml	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,35 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   i18n_domain="bookshelf"
+   package="bookshelf"
+   >
+
+  <include package="grok" />
+  <include package="bookshelf" />
+
+  <!-- Typical functional testing security setup -->
+  <securityPolicy
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy"
+      />
+
+  <unauthenticatedPrincipal
+      id="zope.anybody"
+      title="Unauthenticated User"
+      />
+  <grant
+      permission="zope.View"
+      principal="zope.anybody"
+      />
+
+  <principal
+      id="zope.mgr"
+      title="Manager"
+      login="mgr"
+      password="mgrpw"
+      />
+
+  <role id="zope.Manager" title="Site Manager" />
+  <grantAll role="zope.Manager" />
+  <grant role="zope.Manager" principal="zope.mgr" />
+
+</configure>

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/__init__.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/__init__.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/__init__.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+# this directory is a package

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/catalog.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/catalog.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/catalog.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,25 @@
+"""
+Some simple tests, just for test the tests. :-)
+
+  >>> from zope.testbrowser.testing import Browser
+  >>> browser = Browser()
+  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+  >>> browser.handleErrors = False
+  >>> browser.open('http://localhost/')
+  >>> browser.getControl('Application').displayValue = ['bookshelf.app.BookShelf']
+  >>> browser.getControl('Name').value = 'bookshelf'
+  >>> browser.getControl('Add').click()
+  >>> browser.getLink('bookshelf').click()
+  >>> print browser.contents
+  <html>
+  ...
+      <ul>
+          <li><a href="http://localhost/bookshelf/shelf">catalog</a></li>
+      </ul>
+  ...
+  >>> root = getRootFolder()
+  >>> bookshelf = root['bookshelf']
+  >>> for k in bookshelf.keys(): print k
+  shelf
+
+"""

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/test_functional.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/test_functional.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/ftests/test_functional.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,38 @@
+import os
+import unittest
+import bookshelf
+from zope.testing import doctest
+from zope.app.testing.functional import (FunctionalTestSetup, ZCMLLayer,
+                                         HTTPCaller, sync, getRootFolder)
+
+ftesting_zcml = os.path.join(os.path.dirname(bookshelf.__file__), 'ftesting.zcml')
+BookShelfFunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'BookShelfFunctionalLayer')
+
+def setUp(test):
+    FunctionalTestSetup().setUp()
+
+def tearDown(test):
+    FunctionalTestSetup().tearDown()
+
+def test_suite():
+    suite = unittest.TestSuite()
+    test_modules = ['catalog', 'xmlrpc']
+
+    for module in test_modules:
+        module_name = 'bookshelf.ftests.%s' % module
+        test = doctest.DocTestSuite(
+             module_name, setUp=setUp, tearDown=tearDown,
+             extraglobs=dict(http=HTTPCaller(),
+                             getRootFolder=getRootFolder,
+                             sync=sync),
+             optionflags=(doctest.ELLIPSIS+
+                          doctest.NORMALIZE_WHITESPACE+
+                          doctest.REPORT_NDIFF)
+             )
+        test.layer = BookShelfFunctionalLayer
+        suite.addTest(test)
+
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,112 @@
+import grok
+from book import Book
+#from article import Article
+from zope.app.container.contained import NameChooser as BaseNameChooser
+from zope.app.container.interfaces import INameChooser
+from zope.interface import implements
+from operator import attrgetter
+
+from zope.app.catalog.interfaces import ICatalog
+from zope.component import getUtility
+
+class Shelf(grok.Container):
+    """
+    A shelf is a container for books and articles, used for containment and searching.
+    """
+
+class Index(grok.View):
+    
+    def update(self, query=None):
+        if not query:
+            # XXX: if the query is empty, return all books; this should change
+            # to some limited default search criteria or none at all
+            results = self.context.values()
+            self.results_title = 'All items'
+        else:
+            catalog = getUtility(ICatalog)
+            results = catalog.searchResults(title=query)
+            # Note: to sort the results, we must cast the result iterable
+            # to a list, which can be very expensive
+            results = list(results)
+            if len(results) == 0:
+                qty = u'No i'
+                s = u's'
+            elif len(results) == 1:
+                qty = u'I'
+                s = u''
+            else:
+                qty = u'%s i' % len(results)
+                s = u's'
+            self.results_title = u'%stem%s matching "%s"' % (qty, s, query)
+
+        self.results = sorted(results, key=attrgetter('title'))
+
+
+class AddBook(grok.AddForm):
+
+    form_fields = grok.AutoFields(Book)
+
+    @grok.action('Add book')
+    def add(self, **data):
+        shelf = self.context
+        book = Book()
+        self.applyData(book, **data)
+        name = INameChooser(shelf).chooseName(data.get('title'), book)
+        shelf[name] = book
+        self.redirect(self.url(shelf))
+
+#class AddArticle(grok.AddForm):
+
+#    form_fields = grok.AutoFields(Article)
+#
+#    @grok.action('Add article')
+#    def add(self, **data):
+#        shelf = self.context
+#        article = Article()
+#        self.applyData(article, **data)
+#        name = INameChooser(shelf).chooseName(data.get('title'), article)
+#        shelf[name] = article
+#        self.redirect(self.url(shelf))
+
+class NameChooser(grok.Adapter, BaseNameChooser):
+    implements(INameChooser)
+
+    def nextId(self,fmt='%s'):
+        """ Binary search to quickly find an unused numbered key. The 
+            algorithm generates a key right after the largest numbered 
+            key or in some unused lower numbered slot found by the second 
+            loop. If keys are later deleted in random order, some of the 
+            resulting slots will be reused and some will not.
+        """
+        i = 1
+        while fmt%i in self.context:
+            i *= 2
+        blank = i
+        full = i//2
+        while blank > (full+1):
+            i = (blank+full)//2
+            if fmt%i in self.context:
+                full = i
+            else:
+                blank = i
+        return fmt%blank
+
+    def chooseName(self, name, object):
+        name = name or self.nextId('k%04d')
+        # Note: potential concurrency problems of nextId are (hopefully)
+        # handled by calling the super.NameChooser
+        return super(NameChooser, self).chooseName(name, object)
+
+class ShelfRPC(grok.XMLRPC):
+    """ShelfRPC is a XMLRPC interface to the shelf model.
+    """
+
+    def list(self):
+        return list(self.context.keys())
+
+    def addBook(self, book_dict):
+        shelf = self.context
+        book = Book(**book_dict)
+        name = INameChooser(shelf).chooseName(book_dict.get('title'), book)
+        shelf[name] = book
+        return name

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf_templates/index.pt
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf_templates/index.pt	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/shelf_templates/index.pt	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,43 @@
+<html metal:use-macro="context/@@master/page">
+<head>
+    <title metal:fill-slot="title">
+        Grok BookShelf
+    </title>
+
+</head>
+<body>
+  <span metal:fill-slot="content_title">Grok BookShelf</span>      
+  <span metal:fill-slot="content_actions">
+    <form class="search" action=".">
+        <input type="text" name="query">
+        <input type="submit" name="submit" value="search">
+    </form>
+  </span>  
+  <div metal:fill-slot="content">
+
+    <h3 tal:content="view/results_title">999 items matched the query</h3>
+    <table tal:condition="view/results">
+        <tr tal:repeat="item view/results">
+            <th align="right" tal:content="repeat/item/number" />
+            <td>
+                <dl>
+                    <dt><a tal:attributes="href python:view.url(item)+'/index'"
+                        tal:content="item/title">title goes here</a>
+                        <span tal:content="python:item.__class__">Dir</span>
+                        <span tal:content="python:type(item)">Dir</span>
+                    </dt>
+                </dl>            
+            </td>
+        </tr>
+    </table>
+
+    <p><a tal:attributes="href python:view.url('addbook')">
+            Add Book
+    </a></p>
+    <p><a tal:attributes="href python:view.url('addarticle')">
+            Add Article
+    </a></p>
+
+  </div>
+</body>
+</html>

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/testing.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/testing.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/testing.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,7 @@
+import os.path
+import bookshelf
+from zope.app.testing.functional import ZCMLLayer
+
+ftesting_zcml = os.path.join(
+    os.path.dirname(bookshelf.__file__), 'ftesting.zcml')
+FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer')
\ No newline at end of file

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/__init__.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/__init__.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/__init__.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1 @@
+# this directory is a package

Added: grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/test_doctests.py
===================================================================
--- grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/test_doctests.py	                        (rev 0)
+++ grok/trunk/doc/examples/bookshelf/src/bookshelf/tests/test_doctests.py	2007-07-15 13:53:41 UTC (rev 78002)
@@ -0,0 +1,14 @@
+import doctest
+import unittest
+
+def test_suite():
+    modules = ['app', 'book', 'shelf']
+    suite = unittest.TestSuite()
+    for module in modules:
+        module_name = 'bookshelf.%s' % module
+        test = doctest.DocTestSuite(module_name)
+        suite.addTest(test)
+    return suite
+
+if __name__ == '__main__':
+      unittest.main(defaultTest='test_suite')



More information about the Checkins mailing list