Skip to main content

A set of URI normalization rules used by the ACDH

Project description

UriNormRules

PyPI version Latest Stable Version License

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

acdh_uri-norm-rules-2.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acdh_uri_norm_rules-2.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file acdh_uri-norm-rules-2.0.0.tar.gz.

File metadata

  • Download URL: acdh_uri-norm-rules-2.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for acdh_uri-norm-rules-2.0.0.tar.gz
Algorithm Hash digest
SHA256 13f78f4c89bf6eca731e4eb8865512b0d61914468c189b1a6138d308184382ab
MD5 fe388146f718e1f72874cbff336afadb
BLAKE2b-256 57a019fa2aa878934417b9b28355b8cb794a3a365eda4d0614a9cd7b709ade25

See more details on using hashes here.

File details

Details for the file acdh_uri_norm_rules-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: acdh_uri_norm_rules-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for acdh_uri_norm_rules-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e6317b422cd8f5744e01bac5f5607f73ad7037331af07911d87e18cce426114
MD5 929f204d7b4573350b9d0a8be2814def
BLAKE2b-256 68063351d50f10b9037f649476a00c523946b788d6fb2b05ae6a054998c1c941

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page