Giter VIP home page Giter VIP logo

plum's Introduction

Plum. A Hydra head to support digitization workflows

Circle CI Coverage Status Code Climate Stories in Ready Apache 2.0 License

Plum is a Hydra head based on Hyrax, with two types of works:

  • ScannedResource: a book or other resource composed of one or more scanned pages
  • MultiVolumeWork: a book set, sammelband or other resource composed of multiple ScannedResources

Features

  • Drag-and-drop tools for reordering FileSets and editing structure
  • Generating IIIF manifests for Collections and Works based on that structure
  • Building PDFs of Works based on their IIIF manifests
  • Performing OCR with Tesseract
  • Simple state-based workflow
  • Retrieving external metadata from our finding aids and catalog web services

Dependencies

  • Redis
    • Start Redis with redis-server or if you're on certain Linuxes, you can do this via sudo service redis-server start.
  • Kakadu
    • The installer doesn't work on MacOSX 10.11 (El Capitan), but the files kdu_compress and libkdu_v77R.dylib can be extracted from the download packages and used by manually installing them in /usr/local/bin and /usr/local/lib respectively.
  • Tesseract
    • Version 3.04 is required. You can install it on Mac OSX with brew install tesseract --with-all-languages For Ubuntu you'll have to compile it.
  • RabbitMQ (Optional)
    • Start with rabbitmq-server
    • Used for publishing create/update/delete events for systems such as Pomegranate

Initial Setup

After cloning the Plum repository:

  • Install dependencies: bundle install
  • Setup the database: rake db:migrate
  • Setup ActiveFedora::Noid minter: rails g active_fedora:noid:seed
  • Create the default admin set: rake hyrax:default_admin_set:create
  • Load the workflows in config/workflows: rake hyrax:workflow:load

Running the Tests

Run the test suite:

$ rake ci

You may also want to run the Fedora and Solr servers in one window with:

$ rake hydra:test_server

And run the test suite in another window:

$ rake spec

Javascript tests

To run the Javascript test suite, run:

$ rake spec:javascript

You can then open the file tmp/jasmine/runner.html in a browser to run the tests in that browser. You may need to pass options to allow access to local files, e.g., on MacOSX, you can quit Chrome and then open it with the Javascript tests:

$ open -a "Google Chrome" tmp/jasmine/runner.html --args --allow-file-access-from-files

Adding an Admin user and assigning workflow roles

  1. Run the development servers with rake hydra:server (or run Rails and Solr/Fedora separately with rails s and rake server:development).
  2. Go to http://localhost:3000/users/auth/cas and login with CAS
  3. $ rake add_admin_role
  4. Go to http://localhost:3000/admin/workflow_roles and grant workflow roles

Configuring Loris for Development

  1. Install Docker Toolbox https://www.docker.com/toolbox
  • Only necessary for mac or windows machines. For unix boxes install via wget -qO- https://get.docker.com/ | sh
  1. Start a docker VM: docker-machine start default
  2. Setup your docker environment: eval "$(docker-machine env default)"
  3. Retrieve the loris image: docker pull lorisimageserver/loris
  4. Start the container:
docker run --name loris -v /path/to/plum/tmp/derivatives:/usr/local/share/images -d -p 5004:5004 lorisimageserver/loris
  1. Find the docker IP address with docker-machine ls
  2. Export config variable for IIIF url: export PLUM_IIIF_URL="http://<docker-ip>:5004"
  3. Images should be available at http://<docker-ip>:5004/ based on the FileSet id. e.g., if your docker IP address is 192.168.99.100, the full view of FileSet 70795765b would be at http://192.168.99.100:5004/70%2F79%2F%2F57%2F65%2Fb-intermediate_file.jp2/full/full/0/default.jpg

plum's People

Contributors

escowles avatar tpendragon avatar eliotjordan avatar flyingzumwalt avatar tampakis avatar jrgriffiniii avatar demiankatz avatar kevinreiss avatar waffle-iron avatar

Watchers

James Cloos avatar Jenn Colt 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.