Closed cr625 closed 1 year ago
Suggested (untested) routes that should work:
@term.route("/term=
@term.route("/ark:/99152/
We now have these 3 in dev. The "/term=" route might deserve additional consideration. Blueprints in Flask came after og yamz. They let url routing enforce separation of concerns (so that there doesn't have to be one monolithic views/models module) for the application. For this syntax, it has the side effect that /term= is a different route than /term. We would have to add a new blueprint "term=" unless someone knows a better way. If we can change the rewrite rule on n2t, it would be great. If not we'll have to do the hack. We could also conditionally apply the blueprint after parsing the URL of the main route, but that is likewise a hack.
?term=
the /ark redirect is another blueprint I will add.
That's probably fine. It may be cleaner just to forget about the old /term= route altogether. I put in the changes so that the N2T resolver should get updated by the end of Monday to select ARKs matching regex ark:/?99152/h.* and redirect them to yamz.net/
I didn't know how to test it locally. For example, https://yamz-dev.yamz.link/ark:/99152/h6295 didn't work.
I couldn't get anything from yamz-dev.yamz.net. Does someone need to ask John McNamara to register it?
the route is always /term/* for the term model
so https://yamz-dev.yamz.link/ark:/99152/h6295 won't work yet (https://yamz-dev.yamz.link/term/ark:/99152/h6295 will)
/ark is a different route that I still have to make a blueprint for. /ark: is also a separate route but there it doesn't matter so much if we have both since nothing's hanging off of /ark yet (unlike) /term
I can point the dev server to yamz-dev.yamz.net. I only hesitate because I always manage to screw up the nginx config. I will get it done though.
Another option is to rewrite the urls with Nginx, but that adds an additional configuration requirement.
Could https://yamz-dev.yamz.link/ark:/99152/h6295 be made to work (for whatever yamz instance/hostname)? That would be ideal.
If there's another URL path needed, let me know and I can have the yamz rule at N2T adjusted.
ok, I'll make that a route
Ok, https://yamz-dev.yamz.link/ark:/99152/h6295 should work.
You can add routes derived from ark (eg. /ark/something) https://github.com/metadata-research/yamz/blob/development/app/ark/views.py or let me know what they should be.
Awesome! Thank you!
Could you also make that work with no slash after the colon? That is, "/ark:/foo" should work the same as "/ark:foo". This will future-proof Yamz for the newer form ARKs.
Closing this and opening a separate one for no slash after the colon ("/ark:/foo" should work the same as "/ark:foo") because this is outside of normal url routing and has to be handled as a special case.
https://yamz.net/term=h6295