Package: djiffy
Django application to index and display IIIF Manifests for booksdjiffyis intended to be a reusableDjangoapplication for
working with digitized book content provided viaIIIF Presentationmanifests.  This is analphaversion and it doesnotyet support
the full IIIF Presentation specification.Notedjiffy is tested against Django 3.0-3.2.Code documentation is available athttps://princeton-cdh.github.io/djiffy/InstallationUse pip to install:pip install djiffyYou can also install from GitHub.  Use a branch or tag name, e.g.@developor@1.0, to install a specific tagged release or branch:pip install git+https://github.com/Princeton-CDH/djiffy.git@develop#egg=djiffyConfigurationAdddjiffyto installed applications and make sure thatdjango.contrib.humanizeis also enabled:INSTALLED_APPS = (
    ...
    'django.contrib.humanize',
    'dal',
    'dal_select2',
    'djiffy',
    ...
)Include the default djiffy urls at the desired base url with the namespacedjiffy:urlpatterns = [
    ...
    url(r'^iiif-books/', include('djiffy.urls', namespace='djiffy')),
    ...
]Run migrations to create database tables:python manage.py migrateNoteThe templates included require that you have a url configured with
the namesite-index.If you are need to use djiffy to access manifests that require an
authorization token, useDJIFFY_AUTH_TOKENSin your project settings
to configure each domain that requires an auth token.  The configuration
should be formatted like this:DJIFFY_AUTH_TOKENS = {
    'example.com': 'myauthtoken',
}UsageImport IIIF content using theimport_manifestmanage command.  This
command can take an IIIF Collection or single Manifest, via local file
or URL.  Imported content can be viewed in Django admin.:python manage.py import_manifest http://url.for/iiif/manifest
python manage.py import_manifest /path/to/local/collectionDevelopment instructionsThis git repository usesgit flowbranching conventions.Initial setup and installation:recommended: create and activate a python 3.5 virtualenv:virtualenv djiffy -p python3.5
source djiffy/bin/activatepip install the package with its python dependencies:pip install -e .Unit TestingUnit tests are written withpy.testbut use some
Django test classes for convenience and compatibility with django test suites.
Running the tests requires a minimal settings file for Django required
configurations.Copy sample test settings and add aSECRET_KEY:cp ci/testsettings.py testsettings.pyTo run the tests, either use the configured setup.py test command:python setup.py testOr install test requirements and use py.test directly:pip install -e '.[test]'
pytestDocumentationDocumentation is generated usingsphinx.
To generate documentation, first install development requirements:pip install -r dev-requirements.txtThen build documentation using the customized make file in thedocsdirectory:cd sphinx-docs
make htmlAs of v0.7.3, documentation is automatically built with GitHub Actions
and published using GitHub pages.Adding license imagesWhen adding new license image SVG files to this repo, addid="licenseimg"to
the<svg>element of each. This allows djiffy users to embed the SVG inline
with a<use>tag, with itshrefattribute pointing to#licenseimg.If the image will need to be recolored for different backgrounds, as in the
case of therightsstatement_org/SVG icons, you can enable this for up to
two tones in each SVG. To do this, setfillattributes on paths tofill="inherit"(controlled by thefillCSS property) orfill="currentColor"(controlled by thecolorCSS property).Licensedjiffyis distributed under the Apache 2.0 License.©2019 Trustees of Princeton University.  Permission granted via
Princeton Docket #20-3618 for distribution online under a standard Open Source
license.  Ownership rights transferred to Rebecca Koeser provided software
is distributed online via open source.