-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Re-implementing the N2T ARK Resolver | Biopragmatics #53
Comments
Cool! Re: the well done! |
I think this is possible, but I can't imagine it being elegant. Some ideas:
|
My strategy has been a blanket rewrite-and-redirect in a FastAPI app: @app.get(
"/ark:/{naan}/{rest_of_path:path}",
response_class=RedirectResponse,
tags=["util"],
summary="Get ARK (Slash Before NAAN)",
)
async def _ark(naan: ArkNaan, request: Request):
"""normalize request to not have slash (/) preceding ark naan."""
return RedirectResponse(
url=str(request.url).replace("ark:/", "ark:"), status_code=301
) |
I know this can be done at a higher level, e.g. at a reverse proxy level via e.g. an Apache RewriteRule, but it would be nice to work "out of the box" for |
The new URN syntax (RFC 8141) does allow the use of slash, so it is up to the ARK community to decide whether to keep it. So an ARK like ark:/53355/cl010277627 may be left unchanged or converted to URN urn:ark:53355/cl010277627. IMO the version without the slash looks better. I don't know if the ARK alliance is planning to register a URN namespace, but I would welcome such decision. |
Re-implementing the N2T ARK Resolver | Biopragmatics
Archival Resource Keys (ARKs) are flavor of persistent identifiers like DOIs, URNs, and Handles that have the benefit of being free, flexible with what metadata gets attached, and natively able to resolve to web pages. Name-to-Thing (N2T) implements a resolver for a variety of ARKs, so this blog post is about how that resolver can be re-implemented with the curies Python package.
https://cthoyt.com/2023/04/11/n2t-ark-resolver.html
The text was updated successfully, but these errors were encountered: