module documentation
This code attempts to make it easier to deal with human variation in references to laws.
Most of what was here has since graduated to wetsuite.helpers.patterns, in particular its find_references().
What is left is use of a single deeplink resolver.
Function | resolve |
CVDR has links to laws that look like: |
Variable | _deeplink |
Undocumented |
Variable | _deeplink |
Undocumented |
CVDR has links to laws that look like:
http://wetten.overheid.nl/cgi-bin/deeplink/law1/title=Burgerlijk%20Wetboek%20Boek%201 http://wetten.overheid.nl/cgi-bin/deeplink/law1/bwbid=BWBR0005537/article=1:2
that go to:
https://wetten.overheid.nl/BWBR0002656/2024-01-01 https://wetten.overheid.nl/BWBR0005537/2024-09-01/#Hoofdstuk1_Titeldeel1.1_Artikel1:2
While 'deeplink' may not be the best name for 'resolver', it's thet term that is used. Note that it queries a resolve live, which can be slow, so expect this function is equally slow to respond.
...that is, the first time we see such a link, because we cache results on disk so that later reponses can be fast (which assumes that the resolver's answer does not change over time).
Parameters | |
url | the deeplink URL to look up |
use | you can skip the cache by handing in False |
Returns | |
the URL that the resolver redirects us to -- or None, if it didn't (may also raise an exception) |