Skip to content

Commit

Permalink
align configs and rm url2iiif
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles authored Aug 9, 2023
1 parent 9032dca commit 17fb69f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 84 deletions.
16 changes: 0 additions & 16 deletions iiify/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from iiif2 import iiif, web
from .resolver import ia_resolver, create_manifest, create_manifest3, getids, collection, \
purify_domain, cantaloupe_resolver, create_collection3
from .url2iiif import url2ia
from .configs import options, cors, approot, cache_root, media_root, \
cache_expr, version, image_server, cache_timeouts

Expand Down Expand Up @@ -54,21 +53,6 @@ def index():
return jsonify(getids(q, cursor=cursor))


@app.route('/iiif/url2iiif')
def url2iiif():
url = request.args.get('url', '')
if not url:
abort(400)
try:
domain = purify_domain(request.args.get('domain', request.url_root))
filehash = url2ia(url)
time.sleep(20)
return redirect('%surl2iiif$%s' % (domain, filehash))
except Exception as e:
print(e)
abort(400)


@app.route('/iiif/collection.json')
def catalog():
cursor = request.args.get('cursor', '')
Expand Down
4 changes: 2 additions & 2 deletions iiify/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

IMG_CTX = 'http://iiif.io/api/image/2/context.json'
PRZ_CTX = 'http://iiif.io/api/presentation/2/context.json'
ARCHIVE = 'http://archive.org'
METADATA_FIELDS = ("title", "volume", "publisher", "subject", "date", "contributor", "creator")
bookdata = 'http://%s/BookReader/BookReaderJSON.php'
bookreader = "http://%s/BookReader/BookReaderImages.php"
URI_PRIFIX = "https://iiif.archive.org/iiif"
ARCHIVE = 'http://archive.org' # move to config
URI_PRIFIX = "https://iiif.archive.org/iiif" # move to config

valid_filetypes = ['jpg', 'jpeg', 'png', 'gif', 'tif', 'jp2', 'pdf', 'tiff']

Expand Down
66 changes: 0 additions & 66 deletions iiify/url2iiif.py

This file was deleted.

0 comments on commit 17fb69f

Please sign in to comment.