-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bea2357
commit edd7137
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!doctype html> | ||
<html class="no-js" lang=""> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title>IIIF Collection Helper</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<link rel="apple-touch-icon" href="apple-touch-icon.png"> | ||
<!-- Place favicon.ico in the root directory --> | ||
<link rel="stylesheet" type="text/css" href="{{ request.url_root}}static/styles/docs.css" media="all"/> | ||
|
||
</head> | ||
<body> | ||
<header> | ||
<img class="center" src="{{ request.url_root }}static/images/ia.png"/> | ||
</header> | ||
<div id="container"> | ||
|
||
<h1>IIIF Collection Helper</h1> | ||
|
||
<p>The IA collection page URL is: <a href="https://archive.org/details/{{ identifier }}">https://archive.org/details/{{ identifier }}</a></p> | ||
|
||
<p>The IA identifier is: {{ identifier }}</p> | ||
|
||
<p>The IIIF collection URL is: <a href="https://iiif.archive.org/iiif/3/{{ identifier }}/collection.json">https://iiif.archive.org/iiif/3/{{ identifier }}/collection.json</a></p> | ||
|
||
<h2>IIIF viewer options</h2> | ||
<ul> | ||
<li><a href="https://projectmirador.org/embed/?iiif-content=https://iiif.archive.org/iiif/3/{{ identifier }}/collection.json">Mirador</a></li> | ||
<li><a href="https://uv-v4.netlify.app/#?manifest=https://iiif.archive.org/iiif/3/{{ identifier }}/collection.json">Universal Viewer</a></li> | ||
<li><a href="https://samvera-labs.github.io/clover-iiif?iiif-content=https://iiif.archive.org/iiif/3/{{ identifier }}/collection.json">Clover</a></li> | ||
|
||
</ul> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
os.environ["FLASK_CACHE_DISABLE"] = "true" | ||
|
||
import unittest | ||
from flask.testing import FlaskClient | ||
from iiify.app import app | ||
|
||
class TestHelper(unittest.TestCase): | ||
|
||
def setUp(self) -> None: | ||
self.test_app = FlaskClient(app) | ||
|
||
def test_single_image(self): | ||
resp = self.test_app.get("/iiif/helper/img-8664_202009/") | ||
self.assertEqual(resp.status_code, 200) | ||
|
||
self.assertIn('<a href="https://projectmirador.org/embed/?iiif-content=https://iiif.archive.org/iiif/3/img-8664_202009/manifest.json">Mirador</a>', resp.text, "Couldn't find Mirador link in helper page.") | ||
|
||
def test_collection(self): | ||
resp = self.test_app.get("/iiif/helper/frankbford/") | ||
self.assertEqual(resp.status_code, 200) | ||
|
||
self.assertIn('<a href="https://projectmirador.org/embed/?iiif-content=https://iiif.archive.org/iiif/3/frankbford/collection.json">Mirador</a>', resp.text, "Couldn't find Mirador link in helper page.") |