Commit d1bc7ef
gnd: improve validation and normalization
* accept both `http://d-nb.info/gnd/<id>` and `https://d-nb.info/gnd/<id>` to be pasted as GND URI and being normalized
* re-use gnd_resolver_url var in regex
* use the regex in the normalize function
* utils: remove var and improve regex
* validators: dont use var
* utils: adapt to correct url match regex
* validators: remove additional check
* utils: improve regex to match for IDs without http prefix in order to remove additional check in validators
* validators: adhere to pydocstyle
---------
Co-authored-by: Karl Krägelin <mail@karlkraeglin.de>1 parent ffd5a6b commit d1bc7ef
3 files changed
+4
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 57 | + | |
| 58 | + | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
237 | 236 | | |
238 | 237 | | |
239 | 238 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
| |||
0 commit comments