A set of URI normalization rules used by the ACDH
Project description
UriNormRules
Set of URI normalization rules used within the ACDH-CD.
Provides Python 3 and PHP bindings.
Rules are stored as a JSON in the UriNormRules/rules.json
file.
Installation & usage
Python
- Install using pip3:
pip3 install acdh_uri-norm-rules
- Use with
from AcdhUriNormRules import get_rules, get_normalized_uri print(AcdhUriNormRules.get_rules()) wrong_id = "http://sws.geonames.org/1232324343/linz.html" good_id = get_normalized_uri(wrong_id) print(good_id) # "https://www.geonames.org/1232324343"
PHP
- Install using using composer:
composer require acdh-oeaw/uri-norm-rules
- Usage with
require_once 'vendor/autoload.php'; print_r(acdhOeaw\UriNormRules::getRules());
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for acdh_uri-norm-rules-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f78f4c89bf6eca731e4eb8865512b0d61914468c189b1a6138d308184382ab |
|
MD5 | fe388146f718e1f72874cbff336afadb |
|
BLAKE2b-256 | 57a019fa2aa878934417b9b28355b8cb794a3a365eda4d0614a9cd7b709ade25 |
Close
Hashes for acdh_uri_norm_rules-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e6317b422cd8f5744e01bac5f5607f73ad7037331af07911d87e18cce426114 |
|
MD5 | 929f204d7b4573350b9d0a8be2814def |
|
BLAKE2b-256 | 68063351d50f10b9037f649476a00c523946b788d6fb2b05ae6a054998c1c941 |