diff --git a/.travis.yml b/.travis.yml index 3b88f78..4119caa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ sudo: false language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/assets/Spin-1s-73px.gif b/assets/Spin-1s-73px.gif new file mode 100644 index 0000000..56ba424 Binary files /dev/null and b/assets/Spin-1s-73px.gif differ diff --git a/iiif-presentation-validator.py b/iiif-presentation-validator.py index ae1e2a7..fc9e343 100755 --- a/iiif-presentation-validator.py +++ b/iiif-presentation-validator.py @@ -18,7 +18,7 @@ from urllib2 import urlopen, HTTPError, Request from urlparse import urlparse -from bottle import Bottle, request, response, run +from bottle import Bottle, request, response, run, static_file egg_cache = "/path/to/web/egg_cache" os.environ['PYTHON_EGG_CACHE'] = egg_cache @@ -140,12 +140,17 @@ def index_route(self): data = fh.read() return data + + def static_route(self, filename): + return static_file(filename, root='assets/') + def dispatch_views(self): """Set up path mappings.""" self.app.route("/", "GET", self.index_route) self.app.route("/validate", "OPTIONS", self.empty_response) self.app.route("/validate", "GET", self.do_GET_test) self.app.route("/validate", "POST", self.do_POST_test) + self.app.route("/assets/", "GET", self.static_route) def after_request(self): """Used with after_request hook to set response headers.""" diff --git a/index.html b/index.html index c7de439..c6ad31a 100644 --- a/index.html +++ b/index.html @@ -55,7 +55,7 @@
- +

Presentation API Validator

@@ -65,7 +65,7 @@ This service will validate a IIIF Presentation API resource against the specification. Fill in the URL of your manifest, and it will try to parse it and issue errors for failed requirements, and warnings for recommendations that haven't been followed.
-
+
URL of Manifest to Validate:
@@ -83,10 +83,14 @@
-