Package: bookreader
IntroductionThis is a book reading UI application for items that have been deposited in a
DSpace repository that has the OAI-PMH repository views enabled.Using the bookreaderInstallationPackageInstall thebookreaderPython package by doing one of the following:Adding it to your list of eggs in buildout.cfg and runningbin/buildoutUseeasy_install bookreaderto install it globallyDownload the source code, unpack it and runpython setup.py installDjangoIn your project’s settings.py, addbookreaderto the list ofINSTALLED_APPSand runmanage.py syncdbto add the tables to the database. Then includebookreader.urlsin your url patterns. Last, you will need to add the base
URL for your Djatoka server in your settings file asDJATOKA_BASE_URL.AdministrationThe bookreader uses the Django admin interface for the manipulation of the data.
First, you must add aRepository. The only input required is the OAI-PMH server
url of your DSpace repository. Using that url, Django will connect to the server
and query for its name. Then collections can be added by DSpace handle. Once a
handle is entered, Django will query the server to validate that it is a valid
handle and query for the name of the collection. At this point, it will also query
for all books (items) in the collection and harvest the metadata and pages for
those books. This automatic behavior can be disabled by settingBOOKREADER_SIGNALS_ENABLEDto False in your settings.DSpace RequirementsItem and Bitstream LayoutFor the use case of this Django UI, books are DSpace items and pages are
bitstreams attached to those book items. The page bitstreams must be JPEG2000
files in the ‘ORIGINAL’ or main content bundle. Thumbnails can be provided for
each page by adding a jpeg file in a ‘THUMBNAILS’ bundle that has the same base
filename as the original page bitstream. For example, if the page bitstream
filename istamu_pl_0001.jpfthen the thumbnail must end withtamu_pl_0001.jpg.
In this casethumbs/tamu_pl_0001.jpgwould also be acceptable.OAI-PMH RepositoryIn order for the data be harvested, the DSpace OAI-PMH server must have theOREandDIMmetadata prefixes enabled and compatible crosswalks installed
for the books.Metadata FieldsDIM dataThe DIM metadata prefix is used to gather the book (item) metadata. The fields
are harvested using thepyoaiMetadataReaderthat is extended in the Pythondspacelibrary,NestedMetadataReader. XPath evaluators are used to map xml elements
to fields. For the current mapping, seebookreader.harvesting.metadata.dim_reader.ORE dataThe ORE metadata prefix is used to gather the page and link (bitstream) metadata.
The bitstream URL, title, and bundle are all gathered from the ORE xml document.Canonical ItemsStarting with version 0.3, a new canonical items requirement was added. The
list of bitstreams is checked for an additional bitstream in the ‘METADATA’
bundle that is namedbitstream_metadata.xml. This file is then parsed for
a repository url of a canonical version of the book as well as additional
metadata about the page bitstreams so that missing pages can be marked for
future reference/use. See the schema atdocs/bitstream_metadata.xsdfor more
reference on the format.History1.0 (2011-07-07)First official versionCompiled PDFs for frankenbooks and other copiesBug and error fixes0.9 (2011-03-29)Switching to a ‘type’ field to support multiple book forms (canonical,
franken, extant and work). South data and schema migrations provided.Detailed pages view now supports a jp2 url in the request to select the
current pageAdded SWORD client configuration parameters to the repositorySwitched URL to base_url and oai_path for OAI client to match the changes in
the DSpace clientAdded published flag to booksAdded view to publish books over SWORDAdded ability to add books (except for extant books)0.8 (2010-12-02)Added South integration with the initial migration based on version 0.7Added is_canonical attribute to accommodate feature requestsUpdated CanonicalSelectionForm to use new is_canonical attributeTests for canonical flag in bitstream metadata filesAdded a PageURLForm for editing only page urlsAdded a URL for accessing the page editing view with the new PageURLFormAdded admin list_filter for collection when viewing books0.7.1 (2010-11-15)Bugfix: harvesting missing pages was creating too many pages0.7 (2010-11-12)Added a redirecting print viewFixed print url to the new printable viewReading view now enforces a more ‘reading’ like interaction: front cover,
pages, then back coverCleaned up extra importsAdded sequence and internal fields to page formChanged Exterior Page form to be page conversion formAdded external_views property to book objectsChanged edit-external url to be conversion urlClarified harvesting code on missing books a bitAdded an exterior editor view, page adding view only sets page sequence if
it isn’t in the incoming formHarvesting pages without a bitstream_metadata.xml forces all pages to be
internalModified the canonical selection form so that canonical link can be removed0.6.1 (2010-11-02)Bug fix for book pages view when no sequence/page set0.6 (2010-11-02)Added Exterior page form, Canonical selection form, and annotation formMade canonical attribute of books be editableFixed holdover rtf->rft attribute bug in template tagAdded  views/urls: book annotations, edit canonical, copy annotations, edit
exterior page, add/edit/delete annoationsAdded CSRF wrappers to posted views0.5 (2010-10-27)Added various editor views (edit pages, add page, edit page, order pages,
delete page)Added a page annotations view, fixed a bug with the page viewAdded bitstream_metadata view to export bitstream_metadata filesAdded a page formAdded necessary url configurations for new viewsAdded an Annotation modelAdded an Internal flag to pagesUpdates to harvesting and tests for newer bitstream_metadata format0.4 (2010-09-29)Add a setting for the url arguments for books to compare,
BOOKREADER_COMPARISON_GET_ARGUMENTAdd a setting for the session key for storing books to compare,
BOOKREADER_COMPARISON_SESSION_KEYAdd a setting for the template variable for the books to compare,
BOOKREADER_COMPARISON_TEMPLATE_VARIABLEAdd a context processor for turning book id’s into books, prefers GET
arguments over session variable for bookmarkabilityAdd template tags for adding/removing/retrieving get arguments for comparisonsAdd views for adding to/removing from/clearing the comparison listAdd separate view for a comparison portletUpdated the bitstream_metadata.xsd and the detailed page harvesting to match0.3 (2010-09-14)Added canonical field to Book modelMade jp2 url field on Page model optional (support for ‘missing’ pages)Made title field on Page model optional (support for ‘missing’ pages)Added python logging support with a default null handlerAdded a parser for the bitstream metadata fileAdded a custom lxml etree parser since the default is now to disable networkSwitched loading pages and loading links signals to be on creation of books only0.2 (2010-08-23)Switching data model to one where books are items and the pages are just
represented by bitstreams.Harvesting of books in a collectionHarvesting of pages in a bookSignal for loading repository names from the repositoriesSignal for loading collection name from the repositorySignal for loading books in a collection from the repositorySignal for loading book metadata from the repositorySignal for loading pages from the repository0.1 (Unreleased)Books and pages generated from Manakin views of a DSpace repository where
pages are items and the bitstreams are the jpeg2000 files for the pages.