-
Notifications
You must be signed in to change notification settings - Fork 39
Noref more permissive gnd uri handling #114
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
Changes from 2 commits
cfe0396
17d8660
0aad9a4
5e2a5c9
0e8c06e
6944dab
8901e7c
e8229a9
2f042b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -81,8 +81,10 @@ | |||||
| https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier | ||||||
| """ | ||||||
|
|
||||||
| gnd_resolver_url = "d-nb.info/gnd/" | ||||||
|
||||||
| def is_gnd(val): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its also used at
Line 240 in 26318e4
| if val.startswith(gnd_resolver_url): |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use ? instead of repeating http and https like
Line 62 in 181b3db
| r"(pmid:|https?://pubmed.ncbi.nlm.nih.gov/)?(\d+)/?$", flags=re.I |
I would also lean toward putting the url in the regex instead of having a variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just use the regex in the normalize function like
idutils/idutils/normalizers.py
Line 73 in 181b3db