Giter VIP home page Giter VIP logo

diva.js's Introduction

diva.js - Document Image Viewer with AJAX

Build Status

Description

Diva.js (Document Image Viewer with AJAX) is a Javascript frontend for viewing documents, designed to work with digital libraries to present multi-page documents as a single, continuous item. Using "lazy loading" methods for loading parts of a document on demand, it presents a quick and efficient way of displaying hundreds (or even thousands) of high-resolution page images from digitized books and other documents on a single web page.

Version 2.0 (released Fall 2012) contains many new features and improvements:

  • Support for JPEG2000 images.
  • New plug-in architecture for extending the functionality of Diva without 'hacking' the core.
  • In-browser image manipulation for adjusting brightness, contrast, and page rotation.
  • Speed improvements thanks to fewer calls to the server.
  • A cleaner default interface.
  • Built using LESS for easier style development.
  • Lots and lots of bug-fixes (See our commits for more details).

Installation and setup

Overview

Diva has three main components: The front-end that runs in the browser, the image server, currently only tested with the IIP Image Server and the Diva data server, a small PHP or Python script that processes the image files for their measurements, which are then sent to the front-end when a user first loads a document.

Easy Install

If you do not want to modify the Diva code, or just want to play around with it for a bit, the easiest way to get going is to download one of the pre-packaged releases available in the downloads section. This package contains what you will need to get started: full minified versions of the JavaScript and CSS, a few demo pages, and a basic Diva data server in both Python and PHP. (You will still have to download and install the IIP Image Server separately).

Dependencies

Diva depends on the jQuery library.

To run the basic Diva data server in Python, you will also need to install the Tornado web server and the VIPS Python module

To run the image processing scripts process.py and process_jp2.py you will also need the VIPS Python module.

Setting up the frontend

All of the relevant Javascript, CSS, and image files can be found in the diva.js/ directory, under the subdirectories js/, css/, and img/, respectively. The included HTML files in the examples/ directory give an example of how the document viewer can be initialized, with further setup details in the readme.md file in that directory.

Setting up the backend

Setting up the backend requires access to a server capable of running IIPImage, as well as PHP or Python. The PHP and Python "divaserve" scripts for sending the image information can be found under dataservers directory, with some usage instructions in the readme.md file in that directory. The download also ships with a very basic Tornado web application, server.py that illustrates how you might integrate the divaserve.py module in your own web application.

You will configure the address of where the Diva front-end can find both the IIP Image Server and the Diva data server when you initialize the viewer. See the examples/ directory for more details.

The PHP version of the divaserve script requires the GD PHP extension. The Python version requires the VIPS Python module, and can be optionally configured to use a Memcached installation.

Image processing

You will also need to preprocess the images you wish to display, which should be in either TIFF or JPEG2000 format; the relevant scripts and processing instructions can be found under processing/.

The process.py script uses the VIPS Python library to produce Pyramid TIFF images, while the process_jp2.py script uses the Kakadu kdu_compress utility to produce JPEG2000 images. You can find a free version of this script on their website.

Full Installation

If you wish to install from source, you can check out the code from our GitHub repository. To fully build Diva you will need the following dependencies:

All other dependencies are listed above.

The full installation gives you access to the un-minified JavaScript source and the plugins, the documentation, and our unit-tests. We have pre-defined Fabric commands for performing basic development tasks:

  • fab less: Compiles and minifies the LESS files into CSS.
  • fab minify: Minifies the JavaScript files using the Closure compiler.
  • fab build: Performs both less and minify.
  • fab release:xxx: Builds the release package. :xxx is the release name, so fab release:2.0.0 will create diva-2.0.0.tar.gz.

Getting help

Help for diva.js is available through this repository's wiki, in the form of code documentation, installation instructions and usage tips.

Let Us Know

We're developing Diva.js as part of our research in Distributed Digital Music Libraries. If you use it in your project, it would be great if you could let us know.

diva.js's People

Contributors

dellsystem avatar ahankinson avatar

Watchers

James Cloos avatar Nicholas Esterer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.