[Checkins] SVN: Sandbox/luciano/kirbi/ added manifestation Attribute in interfaces.IItem; added lots of specs to README.txt; minor edits in item.py

Luciano Ramalho luciano at ramalho.org
Mon Aug 20 14:37:23 EDT 2007


Log message for revision 79045:
  added manifestation Attribute in interfaces.IItem; added lots of specs to README.txt; minor edits in item.py
  

Changed:
  U   Sandbox/luciano/kirbi/README.txt
  U   Sandbox/luciano/kirbi/src/kirbi/interfaces.py
  U   Sandbox/luciano/kirbi/src/kirbi/item.py

-=-
Modified: Sandbox/luciano/kirbi/README.txt
===================================================================
--- Sandbox/luciano/kirbi/README.txt	2007-08-20 18:28:17 UTC (rev 79044)
+++ Sandbox/luciano/kirbi/README.txt	2007-08-20 18:37:22 UTC (rev 79045)
@@ -22,13 +22,13 @@
 * Add books by entering just the ISBN, and letting Kirbi fetch the book data
   from Amazon.com
 
+* User self-registration
+
+* User catalogs own collection
+
 To Do
 ------
 
-* User self-registration
-
-* User catalogs own collections
-
 * User invites friends to share specific collections
 
 * User requests to borrow an item
@@ -38,10 +38,120 @@
 * User tracks lent items
 
 * User tracks borrowed items
-  
+
 * Add books by entering title words or author names, and letting Kirbi fetch
   some likely candidates from Amazon.com
 
+* User adds book which belongs to a friend, who maybe a current user or someone
+  to be invited (recovering a lost book is a very strong motivation to join!)
+
+Features
+==============
+
+This is a list of other use cases, organized by view.
+
+app/index
+-------------
+
+* implement recent additions
+
+pac/index
+-------------
+
+For each item listed:
+
+* button: "i own it/add to my collection"
+
+* button: "borrow"
+
+* list: owners
+
+* display: rating
+
+book/index
+------------
+
+* button: "i own it/add to my collection"
+
+* button: "borrow"
+
+* list: owners
+
+* button: "recommend" (to a friend/to yourself also?)
+
+* display: rating
+
+* control: "rate it"
+
+* list: reviews
+
+* button: "review"
+
+* button: rate review
+
+* display: tags
+
+* control: "tag"
+
+* button: "liberate"
+
+user/menu
+-------------
+
+(currently this is part of app/master and not a separate view)
+
+* link: invite
+
+* link: preferences
+
+user/index
+------------
+
+(currently this is part of collection/index and not a separate view)
+
+* list: lease requests/due
+
+* list: borrow requests/due
+
+* list: recent invitations (pending/accepted)
+
+* list: recomendations for you
+
+lease/borrow
+--------------
+
+* list: owners of copies of that book (items of that manifestation)
+
+* list: alternative manifestations based on OCLC xISBN service
+
+* control: duration needed
+
+* text area: suggested time/place for pickup
+
+lease/lend
+---------------
+
+* control: duration approved
+
+* text area: edit suggested time/place for pickup
+
+* control: date when available
+
+* button: approve
+
+* text line: reason for denial
+
+* button: deny
+
+new views
+-------------
+
+* manage invitations
+
+* preferences (at least passwd change; default lease time; create
+    alternative collecions; privacy)
+
+
 Other tasks
 ===========
 
@@ -53,5 +163,3 @@
 * Packaging (buildout, eggification)
 
 * AJAXification using same framework used for Grok Admin UI
-
-

Modified: Sandbox/luciano/kirbi/src/kirbi/interfaces.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/interfaces.py	2007-08-20 18:28:17 UTC (rev 79044)
+++ Sandbox/luciano/kirbi/src/kirbi/interfaces.py	2007-08-20 18:37:22 UTC (rev 79045)
@@ -14,7 +14,7 @@
 """Kirbi interfaces
 """
 
-from zope.interface import Interface, invariant, Invalid
+from zope.interface import Interface, Attribute, invariant, Invalid
 from zope import schema
 from isbn import isValidISBN
 
@@ -69,11 +69,11 @@
     issued = schema.TextLine(title=u"Issued", required=False)
     # TODO: set a vocabulary for language
     language = schema.TextLine(title=u"Language", required=False)
-    
+
     subjects = schema.Tuple(title=u"Subjects",
                             value_type=schema.TextLine(),
                             default=())
-            
+
     source = schema.TextLine(title=u"Metadata source",
                              required=False,
                              description=u"Name of the source of this record.")
@@ -93,34 +93,36 @@
 
 class IItem(Interface):
     """A physical exemplar of a manifestation (book, DVD or other medium).
-    
-    The terms ``ìtem`` and ``manifestation`` are borrowed from the terminology
+
+    The terms ``Item`` and ``manifestation`` are borrowed from the terminology
     of the FRBR - `Functional Requirements for Bibliographic Records`__.
-    
+
     __ http://www.ifla.org/VII/s13/frbr/frbr.htm
-    
+
     The FRBR defines these relationships::
-    
+
         work >---is realized through---> expression
                     expression >---is embodied in---> manifestation
                                 manifestation >---is exemplified by---> item
-    
+
     For example, Hamlet is a work by Shakespeare, and has many expressions:
     the written text of the play, performances, movies etc. A particular
-    rendition of the written text is an expression. A specific edition of an
-    expression is a manifestation (commonly identified by an ISBN). An exemplar
-    of a manifestation is an item, a physical book that sits in a shelf and
-    can be borrowed.
-    
+    rendition of the written text is an expression.
+
+    A specific edition of an expression is a manifestation (commonly identified
+    by an ISBN). An exemplar of a manifestation is an item, a physical book
+    that sits in a shelf and can be borrowed or stolen.
+
     Currently, Kirbi supports only one kind of manifestation: books.
-    So identifiers embedded in code use the term ``manifestation`` but
+    So some identifiers embedded in code use the term ``manifestation`` but all
     user-visible strings use ``book`` for now.
-    
+
     """
-    
+
     manifestation_id = schema.ASCII(title=u"Book id",
                     description=u"Id of the book of which this item is a copy.",
                     required=True)
+    manifestation = Attribute(u"Hard reference to the manifestation instance.")
     description = schema.Text(title=u"Description",
                     description=(u"Details of this copy, such as autographs,"
                                  u"marks, damage etc."),
@@ -129,7 +131,7 @@
     catalog_datetime = schema.Datetime(title=u"Catalog date",
                     description=u"Datetime when added to your collection.",
                             required=False)
-    
+
 class ICollection(Interface):
     """A collection of Items belonging to a User"""
     title = schema.TextLine(title=u"Title",
@@ -138,10 +140,10 @@
     private = schema.Bool(title=u"Private",
              description=u"If true, items will not appear in public searches.",
              default=True)
-    
+
 class ILease(Interface):
     """A book lease."""
-    
+
     copy_id = schema.TextLine(title=u"Copy id",
                     description=u"The id of the copy being lent.",
                     required=True)
@@ -168,7 +170,7 @@
     due_date = schema.Date(title=u"Due date",
                 description=u"When the copy should be returned to the lender.",
                 required=False)
-                           
+
     return_date = schema.Date(title=u"Returnd date",
                     description=u"When the copy was returned to the lender.",
                     required=False)
@@ -177,5 +179,3 @@
     def dueAfterDelivery(lease):
         if not (lease.due_date > lease.delivery_date):
             raise Invalid(u'The due date must be after the delivery date.')
-        
-

Modified: Sandbox/luciano/kirbi/src/kirbi/item.py
===================================================================
--- Sandbox/luciano/kirbi/src/kirbi/item.py	2007-08-20 18:28:17 UTC (rev 79044)
+++ Sandbox/luciano/kirbi/src/kirbi/item.py	2007-08-20 18:37:22 UTC (rev 79045)
@@ -22,26 +22,26 @@
 
 class Item(grok.Container):
     """An exemplar of a book.
-    
+
     See note at interfaces.IItem.
-    
+
     >>> it = Item('')
     >>> IItem.providedBy(it)
     True
-    
+
     Now let's make it provide IBook.
-    
+
     >>> from kirbi.book import Book
     >>> book = Book('Any Book')
     >>> it.manifestation = book
-    
+
     >>> IBook.providedBy(it)
     True
-    
+
     """
 
     implements(IItem, IBook)
-    
+
     def __init__(self, manifestation_id, description=u'', catalog_datetime=None):
         super(Item, self).__init__()
         self.manifestation_id = manifestation_id
@@ -50,10 +50,10 @@
         self.description = description
         if catalog_datetime is None:
             self.catalog_datetime = datetime.now()
-            
+
     def getCoverId(self):
         return self.manifestation.__name__
-            
+
     def __getattr__(self,name):
         # XXX: this looks too easy... feels like cheating. Is it sane?
-        return getattr(self.manifestation, name)
\ No newline at end of file
+        return getattr(self.manifestation, name)



More information about the Checkins mailing list