[Checkins] SVN: Sandbox/luciano/ initial import from code.google.com do svn.zope.org

Luciano Ramalho luciano at ramalho.org
Thu Jul 5 19:29:42 EDT 2007


Log message for revision 77492:
  initial import from code.google.com do svn.zope.org
  

Changed:
  A   Sandbox/luciano/
  A   Sandbox/luciano/kirbi/
  A   Sandbox/luciano/kirbi/src/
  A   Sandbox/luciano/kirbi/src/kirbi/
  A   Sandbox/luciano/kirbi/src/kirbi/README.txt
  A   Sandbox/luciano/kirbi/src/kirbi/__init__.py
  A   Sandbox/luciano/kirbi/src/kirbi/app.py
  A   Sandbox/luciano/kirbi/src/kirbi/app_templates/
  A   Sandbox/luciano/kirbi/src/kirbi/app_templates/index.pt
  A   Sandbox/luciano/kirbi/src/kirbi/book.py
  A   Sandbox/luciano/kirbi/src/kirbi/book_templates/
  A   Sandbox/luciano/kirbi/src/kirbi/book_templates/details.pt
  A   Sandbox/luciano/kirbi/src/kirbi/configure.zcml
  A   Sandbox/luciano/kirbi/src/kirbi/demo/
  A   Sandbox/luciano/kirbi/src/kirbi/demo/__init__.py
  A   Sandbox/luciano/kirbi/src/kirbi/demo/collection.py
  A   Sandbox/luciano/kirbi/src/kirbi/demo/dump.py
  A   Sandbox/luciano/kirbi/src/kirbi/demo/import.py
  A   Sandbox/luciano/kirbi/src/kirbi/isbn.py
  A   Sandbox/luciano/kirbi/src/kirbi/pac.py
  A   Sandbox/luciano/kirbi/src/kirbi/pac_templates/
  A   Sandbox/luciano/kirbi/src/kirbi/pac_templates/index.pt
  A   Sandbox/luciano/kirbi/src/kirbi/static/
  A   Sandbox/luciano/kirbi/src/kirbi/static/covers/
  A   Sandbox/luciano/kirbi/src/kirbi/static/covers/large/
  A   Sandbox/luciano/kirbi/src/kirbi/static/covers/medium/
  A   Sandbox/luciano/kirbi/src/kirbi/static/covers/small-placeholder.jpg

-=-
Added: Sandbox/luciano/kirbi/src/kirbi/README.txt
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/README.txt	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/README.txt	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,8 @@
+Put your application code in this Python package.
+
+app_templates
+  Place Page Templates (file extension '.pt') in this directory.  They
+  will automatically be associated as views with the model in app.py.
+
+static
+  Place static resources such as CSS, JS, images, etc. in here.

Added: Sandbox/luciano/kirbi/src/kirbi/__init__.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/__init__.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/__init__.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1 @@
+# this directory is a package

Added: Sandbox/luciano/kirbi/src/kirbi/app.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/app.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/app.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,20 @@
+import grok
+from kirbi.pac import Pac
+from kirbi.book import Book
+from grok import index
+
+class Kirbi(grok.Application, grok.Container):
+    """ Peer-to-peer library system """
+    def __init__(self):
+        super(Kirbi, self).__init__()
+        self['pac'] = Pac()
+
+class Index(grok.View):
+    pass # see app_templates/index.pt
+
+class BookIndexes(grok.Indexes):
+    grok.site(Kirbi)
+    grok.context(Book)
+
+    title = index.Text()
+    isbn13 = index.Field()
\ No newline at end of file

Added: Sandbox/luciano/kirbi/src/kirbi/app_templates/index.pt
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/app_templates/index.pt	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/app_templates/index.pt	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,11 @@
+<html>
+<body>
+	
+	<h1>Kirbi</h1>
+
+	<p><a tal:attributes="href python:view.url('pac')">
+		Book Catalog
+	</a></p>
+	
+</body>
+</html>

Added: Sandbox/luciano/kirbi/src/kirbi/book.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/book.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/book.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,209 @@
+import grok
+from zope import interface, schema
+from isbn import isValidISBN, isValidISBN10, isValidISBN13
+from isbn import convertISBN10toISBN13, convertISBN13toLang
+
+import os
+
+STATIC_PATH = os.path.join(os.path.dirname(__file__), 'static')
+
+ARTICLES = {
+    'en': u'the a an'.split(),
+    'fr': u'le la les un une des'.split(),
+    'de': (u'der das die den dem ein eine einen einem einer'
+           u'kein keine keinen keiner').split(),
+    'es': u'el los la las un unos una unas'.split(),
+    'pt': u'o os a as um uns uma umas'.split(),
+}
+
+class IBook(interface.Interface):
+    title = schema.TextLine(title=u"Title", required=True)
+    isbn = schema.TextLine(title=u"ISBN", required=False,
+                           constraint=isValidISBN,
+                           description=u"ISBN in 10 or 13 digit format"
+                           )
+    creators = schema.List(title=u"Authors", required=False,
+                           value_type=schema.TextLine(), default=[])
+    edition = schema.TextLine(title=u"Edition", required=False)
+    publisher = schema.TextLine(title=u"Publisher", required=False)
+    issued = schema.TextLine(title=u"Issued", required=False)
+    # TODO: set a vocabulary for language
+    language = schema.TextLine(title=u"Language", required=False)
+
+class Book(grok.Model):
+    interface.implements(IBook)
+    __title = ''        # = __main_title + __title_glue + __sub_title
+    __main_title = ''   # title without sub-title
+    __sub_title = ''    # sub-title: whatever comes after a ":" or the first "("
+    __title_glue = ''   # may be either ":" or ""
+    __filing_title = '' # title with article at end (for sorting and display)
+    __isbn = ''     # the ISBN as entered by the user
+    __isbn13 = ''   # ISBN-13, digits only (no dashes)
+    __language = None
+
+    def __init__(self, title=None, isbn13=None, creators=None, edition=None,
+                 publisher=None, issued=None):
+        super(Book, self).__init__()
+        if isbn13:
+            self.isbn13 = isbn13
+        # Note: the title is set after the isbn13 so the language can be
+        # guessed from the isbn13 and the __filing_title can be set
+        self.title = title
+        if creators is None:
+            self.creators = []
+        else:
+            self.creators = creators
+        self.edition = edition
+        self.publisher = publisher
+        self.issued = issued
+        
+    def getTitle(self):
+        return self.__title
+
+    def setTitle(self, title):
+        self.__title = title
+        self.setFilingTitle()
+        
+    title = property(getTitle, setTitle)
+
+    def getISBN(self):
+        return self.__isbn
+
+    def setISBN(self, isbn):
+        if isbn is None: return
+        self.__isbn = isbn
+        if isValidISBN13(isbn):
+            self.__isbn13 = isbn
+        elif isValidISBN10(isbn):
+            self.__isbn13 = convertISBN10toISBN13(isbn)
+
+    isbn = property(getISBN, setISBN)
+
+    def getISBN13(self):
+        if self.isbn and self.__isbn13 is None:
+            self.setISBN13(self.isbn) #cache it
+        return self.__isbn13
+
+    def setISBN13(self, isbn):
+        if isValidISBN13(isbn):
+            self.__isbn13 = isbn
+        elif isValidISBN10(isbn):
+            self.__isbn13 = convertISBN10toISBN13(isbn)
+        else:
+            raise ValueError, '%s is not a valid ISBN-10 or ISBN-13' % isbn
+        # if the isbn field is empty, fill it with the isbn13
+        if not self.isbn:
+            self.isbn = self.__isbn13
+
+    isbn13 = property(getISBN13, setISBN13)
+
+    def getShortTitle(self):
+        if u':' in self.title:
+            title = self.title.split(u':')[0].strip()
+        else:
+            title = self.title
+        words = title.split()
+        if words <= 7:
+            return title
+        else:
+            return u' '.join(words[:7])+u'...'
+        
+    def splitTitle(self):
+        if not self.__main_title:
+            main_title = title = self.title.strip()
+            sub_title = ''
+            glue = ''
+            pos_colon = title.find(u':')
+            pos_paren = title.find(u'(')
+            if pos_colon >= 0 and ((pos_paren >= 0 and pos_colon < pos_paren)
+                or pos_paren < 0):
+                main_title = title[:pos_colon]  
+                sub_title =  title[pos_colon+1:] # exclude the colon
+                glue = ':'
+            elif pos_paren >= 0:
+                main_title = title[:pos_paren]
+                sub_title =  title[pos_paren:]
+                glue = ''
+            self.__main_title = main_title
+            self.__title_glue = glue
+            self.__sub_title = sub_title
+        return (self.__main_title, self.__title_glue, self.__sub_title)
+    
+    def getLanguage(self):
+        if not self.__language and self.__isbn13: # guess from ISBN
+            self.__language = convertISBN13toLang(self.__isbn13)
+        return self.__language
+    
+    def setLanguage(self, language):
+        self.__language = language
+        self.setFilingTitle()
+        
+    language = property(getLanguage, setLanguage)
+                
+    def getFilingTitle(self):
+        if not self.__filing_title:
+            self.setFilingTitle()
+        return self.__filing_title
+    
+    def setFilingTitle(self, filing_title=None):
+        if filing_title:
+            self.__filing_title = filing_title
+        else: # generate automatically
+            # Do we know the language and it's articles?
+            if self.language and self.language in ARTICLES:
+                main_title, glue, sub_title = self.splitTitle()
+                word0 = main_title.split()[0]
+                if word0.lower() in ARTICLES[self.language]:
+                    main_title = main_title[len(word0):].strip()+u', '+word0
+                    if glue != u':': # need to add space after the article
+                        main_title += u' '
+                self.__filing_title = main_title + glue + sub_title
+            else:
+                self.__filing_title = self.title
+    
+    filing_title = property(getFilingTitle, setFilingTitle)
+
+    def getMainTitle(self):
+        if not self.__main_title:
+            self.splitTitle()
+        return self.__main_title
+    
+    main_title = property(getMainTitle)
+
+    def getSubTitle(self):
+        # Note: the __sub_title maybe empty even after a splitTitle,
+        # so we check for the __main_title
+        if not self.__main_title: 
+            self.splitTitle()
+        return self.__sub_title
+    
+    sub_title = property(getSubTitle)
+
+
+class Edit(grok.EditForm):
+    pass
+
+class Index(grok.DisplayForm):
+    pass
+
+class Details(grok.View):
+    
+    def __init__(self, *args):
+        # XXX: Is this super call really needed for a View sub-class?
+        super(Details,self).__init__(*args)
+
+        # Note: this method was created because calling context properties
+        # from the template raises a traversal error
+        self.main_title = self.context.main_title
+        self.sub_title = self.context.sub_title
+        self.isbn13 = self.context.isbn13
+        
+    def creatorsLine(self):
+        return '; '.join(self.context.creators)
+
+    def coverUrl(self):
+        cover_name = 'covers/medium/'+self.context.__name__+'.jpg'
+        return self.static.get(cover_name,
+                               self.static['covers/small-placeholder.jpg'])()
+
+    

Added: Sandbox/luciano/kirbi/src/kirbi/book_templates/details.pt
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/book_templates/details.pt	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/book_templates/details.pt	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,33 @@
+<html>
+<body>
+
+    <p><a tal:attributes="href python:view.url(context.__parent__)">
+            Catalog
+    </a></p>
+
+    <h1 tal:content="view/main_title">Main Title</h1>
+    <h2 tal:content="view/sub_title">sub-title</h2>
+
+    <dl>
+        <dt>Creators</dt>
+            <dd tal:content="view/creatorsLine">Joe Doe</dd>
+        <dt>ISBN-13</dt>
+            <dd tal:content="view/isbn13">9780123456789</dd>
+        <dt>Edition</dt>
+            <dd tal:content="context/edition">2nd</dd>
+        <dt>Publisher</dt>
+            <dd tal:content="context/publisher">Sample Publishing Co.</dd>
+        <dt>Issued</dt>
+            <dd tal:content="context/issued">2006-12-31</dd>
+        <dt>Language</dt>
+            <dd tal:content="context/language">pt</dd>
+    </dl>
+
+    <img tal:attributes="src view/coverUrl">
+
+    <p><a tal:attributes="href python:view.url('edit')">
+            Edit
+    </a></p>
+
+</body>
+</html>

Added: Sandbox/luciano/kirbi/src/kirbi/configure.zcml
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/configure.zcml	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/configure.zcml	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1 @@
+<grok package="." xmlns="http://namespaces.zope.org/grok" />

Added: Sandbox/luciano/kirbi/src/kirbi/demo/__init__.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/demo/__init__.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/demo/__init__.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1 @@
+# this directory is a package

Added: Sandbox/luciano/kirbi/src/kirbi/demo/collection.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/demo/collection.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/demo/collection.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -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 pack) (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 Cyberspace'},
+    {'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; Filip Chereche&#351;-To&#351;a; Mihai Bucica',
+     'publisher': u'Packt 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'Packt 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'Packt 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: Sandbox/luciano/kirbi/src/kirbi/demo/collection.py
___________________________________________________________________
Name: svn:executable
   + 

Added: Sandbox/luciano/kirbi/src/kirbi/demo/dump.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/demo/dump.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/demo/dump.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+
+import sys
+from pprint import pprint
+#               0       1       2       3       4       5       6   7
+book_fields = "book_id isbn13 title edition publisher issued name role".split()
+
+
+def dump():
+    import MySQLdb
+    db = MySQLdb.connect(host="localhost", user="luciano", passwd=sys.argv[1],
+        db="horde")
+    cursor = db.cursor()
+    sql = """SELECT 
+                bk.book_id , bk.isbn13 , bk.title ,
+                bk.edition , bk.publisher , bk.issued ,
+                cr.name , lbc.role, lbc.citation_order
+            FROM 
+                groo_books AS bk
+            LEFT JOIN (
+                    groo_creators AS cr,
+                    groo_l_book_creator AS lbc
+                ) ON (
+                    bk.book_id = lbc. book_id
+                    AND 
+                    cr.creator_id = lbc.creator_id
+                )
+            WHERE
+                not isnull(bk.title)
+            ORDER BY 
+                bk.isbn13, lbc.citation_order
+          """
+    cursor.execute(sql)
+    #pprint(cursor.description)
+    books = {}
+    while True:
+        record = cursor.fetchone()
+        if record is None: break
+        book_id = record[0]
+        if book_id in books:
+            rec = books[book_id]
+            role = record[7]
+            if role == 'author':
+                rec['name'] += u'; ' +record[6].strip().decode('utf-8')
+            else:
+                rec['name'] += u'; %s (%s)' % (record[6].strip().decode('utf-8'),
+                                               record[7].strip().decode('utf-8'))
+        else:        
+            rec = {}
+            for i, field in enumerate(book_fields):
+                value = record[i]
+                if field == 'book_id':
+                    book_id = value = record[i]               
+                else:
+                    if value is not None:
+                        value = record[i].strip().decode('utf-8')
+                    if field == 'name':
+                        name = value
+                    if field == 'role' and value != 'author':
+                        rec['name'] = u'%s (%s)' % (name, value)
+                    if field != 'role':
+                        rec[field] = value
+                    books[book_id] = rec
+    
+    books2 = []
+    for book in books.values():
+        books2.append(book)
+    pprint(books2)
+        
+if __name__=='__main__':
+    dump()
\ No newline at end of file


Property changes on: Sandbox/luciano/kirbi/src/kirbi/demo/dump.py
___________________________________________________________________
Name: svn:executable
   + 

Added: Sandbox/luciano/kirbi/src/kirbi/demo/import.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/demo/import.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/demo/import.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+from xmlrpclib import ServerProxy
+from sys import argv, maxint
+
+if __name__=='__main__':
+    from collection import collection
+    instance = argv[1]
+    if len(argv)==3:
+        qty = int(argv[2])
+    else:
+        qty = maxint
+    srv = ServerProxy("http://localhost:8080/%s/pac" % instance)
+    for book in collection:
+        if book['name']:
+            book['creators'] = [creator.strip() for creator in book['name'].split(';')]
+            del book['name']
+        for key in book.keys():
+            if book[key] is None:
+                del book[key]
+        try:
+            print srv.add(book)
+        except TypeError:
+            print book
+        qty -= 1
+        if qty == 0: break


Property changes on: Sandbox/luciano/kirbi/src/kirbi/demo/import.py
___________________________________________________________________
Name: svn:executable
   + 

Added: Sandbox/luciano/kirbi/src/kirbi/isbn.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/isbn.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/isbn.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+# -*-coding: utf-8 -*-
+
+import unittest
+
+def filterDigits(input):
+    """" Strip the input of all non-digits, but retain last X if present. """
+    input = input.strip()
+    digits = [c for c in input if c.isdigit()]
+    # an X may appear as check digit in ISBN-10
+    if input[-1].upper() == 'X':
+        digits.append('X')
+    return ''.join(digits)
+
+def checksumISBN10(digits):
+    """ Return ISBN-10 check digit as a string of len 1 (may be 0-9 or X)
+        References:
+        http://www.isbn-international.org/en/userman/chapter4.html#usm4_4
+        http://www.bisg.org/isbn-13/conversions.html
+    """
+    sum = 0
+    for i, weight in enumerate(range(10,1,-1)):
+        sum += int(digits[i]) * weight
+    check = 11 - sum % 11
+    if check == 10: return 'X'
+    elif check == 11: return '0'
+    return str(check)
+
+def checksumEAN(digits):
+    """ Return EAN check digit as a string (may be 0-9)
+        Every ISBN-13 is a valid EAN
+        Reference:
+        http://www.bisg.org/isbn-13/conversions.html
+    """
+    sum = 0
+    for i, d in enumerate(digits[:12]):
+        weight = i%2*2+1
+        sum += int(d) * weight
+    check = 10 - sum % 10
+    if check == 10: return '0'
+    return str(check)
+
+def validatedEAN(digits):
+    if not digits:
+        return None
+    if len(digits) != 13:
+        digits = filterDigits(digits)
+        if len(digits) != 13:
+            return None
+    if digits[-1] == checksumEAN(digits):
+        return digits
+
+def validatedISBN10(digits):
+    if not digits:
+        return None
+    if len(digits) != 10:
+        digits = filterDigits(digits)
+        if len(digits) != 10:
+            return None
+    if digits[-1] == checksumISBN10(digits):
+        return digits
+
+def validatedISBN13(digits):
+    if not digits:
+        return None
+    if digits.strip()[:3] not in ['978','979']:
+        return None
+    return validatedEAN(digits)
+
+def isValidISBN10(digits):
+    return validatedISBN10(digits) is not None
+
+def isValidISBN13(digits):
+    return validatedISBN13(digits) is not None
+
+def isValidEAN(digits):
+    return validatedEAN(digits) is not None
+
+def isValidISBN(digits):
+    return isValidISBN10(digits) or isValidISBN13(digits)
+
+def convertISBN10toISBN13(digits):
+    digits = filterDigits(digits)
+    if len(digits) != 10:
+        raise ValueError, '%s is not a valid ISBN-10'
+    else:
+        return '978' + digits[:-1] + checksumEAN(digits)
+
+# Note: ISBN group identifiers related to languages
+# http://www.isbn-international.org/en/identifiers/allidentifiers.html
+# http://www.loc.gov/standards/iso639-2/php/code_list.php
+lang_groups = {
+    'en':(0,1),'fr':(2,),'de':(3,),'jp':(4,), 'ru':(5,),
+    'es':(84,           # Spain
+          950, 987,     # Argentina
+          956,          # Chile
+          958,          # Colombia
+          959,          # Cuba
+          968, 970,     # Mexico
+          980,          # Venezuela
+          9942, 9978,   # Ecuador
+          9945, 99934,  # Dominican Republic
+          9962,         # Panama
+          9968,         # Costa Rica (and 9977)	
+          9972,         # Peru
+          9974,         # Uruguay
+          99922, 99939, # Guatemala
+          99923,        # El Salvador
+          99924,        # Nicaragua
+          99925, 99953, # Paraguay 
+          99926,        # Honduras
+         ),
+    'pt':(85,           # Brazil
+          972, 989,     # Portugal
+         ),
+    }
+
+group_lang = {}
+
+for lang, groups in lang_groups.iteritems():
+    for group in groups:
+        group_lang[str(group)] = lang
+        
+def convertISBN13toLang(isbn13):
+    assert len(isbn13)==13
+    registration_group_field = isbn13[3:8]
+    for i in range(1,6):
+        possible_group = registration_group_field[:i]
+        if possible_group in group_lang:
+            return group_lang[possible_group]
+    return None
+
+class untitledTests(unittest.TestCase):
+    def setUp(self):
+        self.digits10ok0 = '0596002920'
+        self.digits10ok2 = ' 853-521-714-2 '
+        self.digits10ok9 = '0-3162-8929-9'
+        self.digits10okX = '013147149X'
+        self.digits10nok = '0131471490'
+        self.digits13ok0 = '9780316289290'
+        self.digits13ok8 = '9788535217148' # '978-85-352-1714-8'
+        self.digits13nok = '9780596100679'
+        self.digits13isbn = '9791231231233'
+
+    def testFilterDigits(self):
+        self.assertEquals('1234567890123',filterDigits('1234567890123'))
+        self.assertEquals('0596101392',filterDigits('\t0 596 10139-2\n'))
+        self.assertEquals('013147149X',filterDigits('0-13-147149-X'))
+        self.assertEquals('1234X',filterDigits('X1X2X3X4X'))
+
+    def testIsValidISBN10(self):
+        self.assertTrue(isValidISBN10(self.digits10ok0))
+        self.assertTrue(isValidISBN10(self.digits10ok2))
+        self.assertTrue(isValidISBN10(self.digits10ok9))
+        self.assertTrue(isValidISBN10(self.digits10okX))
+        self.assertFalse(isValidISBN10(self.digits10nok))
+        self.assertFalse(isValidISBN10(self.digits13ok0))
+
+    def testIsValidEAN(self):
+        self.assertTrue(isValidEAN(self.digits13ok0))
+        self.assertTrue(isValidEAN(self.digits13ok8))
+        self.assertFalse(isValidEAN(self.digits13nok))
+        self.assertFalse(isValidEAN(self.digits10ok0))
+
+    def testIsValidISBN13(self):
+        self.assertTrue(isValidISBN13(self.digits13ok0))
+        self.assertTrue(isValidISBN13(self.digits13ok8))
+        self.assertFalse(isValidISBN13(self.digits13nok))
+        self.assertFalse(isValidISBN13(self.digits10ok0))
+        
+    def testConvertISBN13toLang(self):
+        self.assertEquals('en',convertISBN13toLang('0001234567890'))
+        self.assertEquals('en',convertISBN13toLang('0000000000000'))
+        self.assertEquals('fr',convertISBN13toLang('0002000000000'))
+        self.assertEquals('pt',convertISBN13toLang('0008500000000')) # Brazil
+        self.assertEquals('pt',convertISBN13toLang('0009720000000')) # Portugal
+        self.assertEquals('pt',convertISBN13toLang('0009890000000')) # Portugal
+        self.assertEquals('es',convertISBN13toLang('0008400000000')) # Spain
+        self.assertEquals('es',convertISBN13toLang('0009992500000')) # Paraguay
+        self.assertEquals('es',convertISBN13toLang('0009995300000')) # Paraguay
+
+
+if __name__ == '__main__':
+    unittest.main()


Property changes on: Sandbox/luciano/kirbi/src/kirbi/isbn.py
___________________________________________________________________
Name: svn:executable
   + 

Added: Sandbox/luciano/kirbi/src/kirbi/pac.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/pac.py	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/pac.py	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,84 @@
+import grok
+from book import Book
+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
+
+class Pac(grok.Container):
+    """ Pac (public access catalog)
+
+        Bibliographic records for all items (books, disks etc.) known to this
+        Kirbi instance. The contents of this catalog is public, but information
+        about item ownership and availability is not kept here.
+
+        In library science the term "catalog" is used to refer to
+        "a comprehensive list of the materials in a given collection".
+        The Pac name was chosen to avoid confusion with zc.catalog.
+        The Pac is not an instance of a Zope catalog, but will use one.
+    """
+
+class Index(grok.View):
+    def sortedList(self):
+        return sorted(self.context.values(), key=attrgetter('filing_title'))
+
+    def coverUrl(self, name):
+        cover_name = 'covers/medium/'+name+'.jpg'
+        return self.static.get(cover_name,
+                               self.static['covers/small-placeholder.jpg'])()
+
+
+class AddBook(grok.AddForm):
+
+    form_fields = grok.AutoFields(Book)
+
+    @grok.action('Add book')
+    def add(self, **data):
+        pac = self.context
+        book = Book()
+        self.applyData(book, **data)
+        name = INameChooser(pac).chooseName(data.get('isbn13'), book)
+        pac[name] = book
+        self.redirect(self.url(pac))
+
+class NameChooser(grok.Adapter, BaseNameChooser):
+    implements(INameChooser)
+
+    def nextId(self,fmt='%s'):
+        """ Binary search to quickly find an unused numbered key, useful
+            when importing many books without ISBN. 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 PacRPC(grok.XMLRPC):
+
+    def list(self):
+        return list(self.context.keys())
+
+    def add(self, book_dict):
+        pac = self.context
+        book = Book(**book_dict)
+        name = INameChooser(pac).chooseName(book_dict.get('isbn13'), book)
+        pac[name] = book
+        return name

Added: Sandbox/luciano/kirbi/src/kirbi/pac_templates/index.pt
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/pac_templates/index.pt	                        (rev 0)
+++ Sandbox/luciano/kirbi/src/kirbi/pac_templates/index.pt	2007-07-05 23:29:41 UTC (rev 77492)
@@ -0,0 +1,22 @@
+<html>
+<body>
+
+    <h1>Book Catalog</h1>
+
+    <p><a tal:attributes="href python:view.url('addbook')">
+            Add Book
+    </a></p>
+
+    <table>
+        <tr tal:repeat="item view/sortedList">
+            <td align="right" tal:content="repeat/item/number" />
+            <td align="center"><img tal:attributes="src python:view.coverUrl(item.__name__)" height="53" /></td>
+            <td><a tal:attributes="href python:view.url(item)+'/details'"
+                    tal:content="item/filing_title">title goes here</a>
+            </td>
+        </tr>
+    </table>
+
+
+</body>
+</html>

Added: Sandbox/luciano/kirbi/src/kirbi/static/covers/small-placeholder.jpg
===================================================================
(Binary files differ)


Property changes on: Sandbox/luciano/kirbi/src/kirbi/static/covers/small-placeholder.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the Checkins mailing list