Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some regex warnings + add venv to gitignore #87

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ cache/
.idea/

# Old folder from v2?
media/
media/

# Python venv
.venv/
venv/
4 changes: 2 additions & 2 deletions iiify/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class IsCollection(Exception):
pass

def purify_domain(domain):
domain = re.sub('^http:\/\/', "https://", domain)
domain = re.sub(r'^http:\/\/', "https://", domain)
return domain if domain.endswith('/iiif/') else domain + 'iiif/'


Expand Down Expand Up @@ -704,7 +704,7 @@ def create_manifest3(identifier, domain=None, page=None):

if f['format'] == 'Web Video Text Tracks':
# Example: cruz-test.en.vtt and 34C3_-_International_Image_Interoperability_Framework_IIIF_Kulturinstitutionen_schaffen_interop-SvH4fbjOT0A.autogenerated.vtt
sourceFilename = re.sub('\.[a-zA-H-]*\.vtt', '', f['name'])
sourceFilename = re.sub(r'\.[a-zA-H-]*\.vtt', '', f['name'])
if sourceFilename not in vttfiles:
vttfiles[sourceFilename] = []

Expand Down
Loading