PHPackages                             acdh-oeaw/arche-assets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. acdh-oeaw/arche-assets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

acdh-oeaw/arche-assets
======================

Set of static assets used (mainly) for ARCHE data preprocessing

3.26.1(5d ago)06.9k—0%MITPHPPHP ^8.1CI passing

Since Jun 18Pushed 4d ago5 watchersCompare

[ Source](https://github.com/acdh-oeaw/arche-assets)[ Packagist](https://packagist.org/packages/acdh-oeaw/arche-assets)[ Docs](https://github.com/acdh-oeaw/arche-assets)[ RSS](/packages/acdh-oeaw-arche-assets/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (58)Used By (0)

Arche Assets
============

[](#arche-assets)

[![PyPI version](https://camo.githubusercontent.com/a5e58b781440a96f6e085b6a257c79f3d1bd6caa0ecd3d8a21a7c811c7622ed2/68747470733a2f2f62616467652e667572792e696f2f70792f616364682d61726368652d6173736574732e737667)](https://badge.fury.io/py/acdh-arche-assets)[![codecov](https://camo.githubusercontent.com/872de630e3f49d431cacb4d6ad123716fbeba2e094d73a4a5369e13d169d1d6d/68747470733a2f2f636f6465636f762e696f2f67682f616364682d6f6561772f61726368652d6173736574732f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d52464f48373754425631)](https://codecov.io/gh/acdh-oeaw/arche-assets)[![Test](https://github.com/acdh-oeaw/arche-assets/actions/workflows/pytest.yml/badge.svg)](https://github.com/acdh-oeaw/arche-assets/actions/workflows/pytest.yml)[![flake8 Lint](https://github.com/acdh-oeaw/arche-assets/actions/workflows/pylint.yml/badge.svg)](https://github.com/acdh-oeaw/arche-assets/actions/workflows/pylint.yml)[![Latest Stable Version](https://camo.githubusercontent.com/df622fd2efdf61851d7fe055e17128860e0064b72be50b47bcfe0dfd9d9748d4/68747470733a2f2f706f7365722e707567782e6f72672f616364682d6f6561772f61726368652d6173736574732f762f737461626c65)](https://packagist.org/packages/acdh-oeaw/arche-assets)[![phpunit](https://github.com/acdh-oeaw/arche-assets/actions/workflows/php.yml/badge.svg)](https://github.com/acdh-oeaw/arche-assets/actions/workflows/php.yml)[![License](https://camo.githubusercontent.com/99449720d007748507bd38d6e5180382585d93903cde1d0520ab3ce91eb7333b/68747470733a2f2f706f7365722e707567782e6f72672f616364682d6f6561772f61726368652d6173736574732f6c6963656e7365)](https://packagist.org/packages/acdh-oeaw/arche-assets)

Set of static assets used (mainly) for ARCHE data preprocessing and ARCHE information pages:

- URI normalization rules used by the [ACDH](https://www.oeaw.ac.at/acdh/).
    (stored in `AcdhArcheAssets/uriNormRules.json`)
- Description of input data formats accepted by the [ARCHE](https://arche.acdh.oeaw.ac.at).
    (stored in `AcdhArcheAssets/formats.json`)

The repository provides also Python 3 and PHP bindings for accessing those assets.

Installation &amp; usage
========================

[](#installation--usage)

Python
------

[](#python)

- Install using pip3: ```
    pip3 install acdh-arche-assets
    ```
- Use with ```
    from AcdhArcheAssets.uri_norm_rules import get_rules, get_normalized_uri, get_norm_id
    print(f"{get_rules()}")

    wrong_id = "http://sws.geonames.org/1232324343/linz.html"

    good_id = get_normalized_uri(wrong_id)
    print(good_id)
    # "https://sws.geonames.org/1232324343/"

    # extract ID from URL
    norm_id = get_norm_id("http://sws.geonames.org/1232324343/linz.html")
    print(norm_id)
    # "1232324343"

    from AcdhArcheAssets.file_formats import get_formats, get_by_mtype, get_by_extension

    formats = get_formats()
    matching_mapping = get_by_mtype('image/png')
    matching_mapping = get_by_extension('png')
    ```

PHP
---

[](#php)

- Install using the [composer](https://getcomposer.org/doc/00-intro.md): ```
    composer require acdh-oeaw/arche-assets
    ```
- Use with ```
    require_once 'vendor/autoload.php';

    print_r(acdhOeaw\UriNormRules::getRules());
    print_r(acdhOeaw\UriNormRules::getRules(['viaf', 'gnd']));

    print_r(acdhOeaw\ArcheFileFormats::getAll());
    print_r(acdhOeaw\ArcheFileFormats::getByMime('application/json'));
    print_r(acdhOeaw\ArcheFileFormats::getByExtension('json'));
    ```

Description of assets
=====================

[](#description-of-assets)

URI normalization rules
-----------------------

[](#uri-normalization-rules)

Each rule consists of five properties:

- `name`: a rule name
- `match`: a regular expression matching rule's URI namespace
- `replace`: a regex-replace expression transforming an URI in a rule's namespace into its ACDH-canonical form
- `resolve`: a regex-replace expression transforming an URI in a rule's namespace into an URL fetching an RDF data
- `format`: an RDF serialization format to be requested while resolving the URL produced using the `resolve` field

Formats
-------

[](#formats)

A curated and growing list of file extensions. For each file extension mappings to the respective [ARCHE Resource Type Category](https://vocabs..oeaw.ac.at/archecategory/Schema) (stored in `:hasCategory`) and [Media Type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) (stored in `:hasFormat`) are given. The indicated Media Type should only be used as a fallback; it is best practice to rely on automated Media Type detection based on file signatures.

Further information is provided as well.

- fileExtension: File extension to be mapped.
- name: Name(s) the format is known
- archeCategory: The corresponding URI of the [ARCHE Resource Type Category Vocabulary](https://vocabs..oeaw.ac.at/archecategory/Schema)
- dataType: A broad category to group formats in; mainly intended for visualisation purposes.
- pronomID: ID(s) assigned by [PRONOM](http://www.nationalarchives.gov.uk/PRONOM/Default.aspx)
- mimeType: Official Media Type(s) (formerly known as MIME types) registered at [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).
- informalMimeType: Other MIME types kown for the format
- magicNumber: A constant numerical or text value used to identify a file format, e.g. [Wikipedia list of file signatures](https://en.wikipedia.org/wiki/List_of_file_signatures)
- ianaTemplate: Link to template at IANA
- reference: Link(s) to format specifications referenced by IANA and others
- longTerm: Indicates if a format is suitable for long-term preservation.
    Possible values and their meaning
    - yes - long-term format
    - no - not suitable, another format should be used
    - restricted - can be used for long-term preservation in some cases (see comment)
    - unsure - status remains to be evaluated
- archeDocs: Link to a place with more information for the format.
- comment: Any other noteworthy information not stated elsewhere.

Developement (Python)
=====================

[](#developement-python)

install needed developement packages `pip install requirements_dev.txt`

linting, tests and testcoverage
-------------------------------

[](#linting-tests-and-testcoverage)

- to run the test: `tox`
- check coverage and create report: `coverage run setup.py test` and `coverage html`
- check linting `flake8`

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance99

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 71.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Recently: every ~66 days

Total

55

Last Release

5d ago

Major Versions

0.0.2 → 1.0.02020-06-18

1.1.0 → 2.0.02021-02-16

2.0.0 → v3.02021-03-31

PHP version history (2 changes)0.0.2PHP &gt;= 7.0

3.21.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1f662e3acb95efd9208cdcd2c97437db366044aea705985251760efcbd23070?d=identicon)[zozlak](/maintainers/zozlak)

---

Top Contributors

[![zozlak](https://avatars.githubusercontent.com/u/6503177?v=4)](https://github.com/zozlak "zozlak (88 commits)")[![csae8092](https://avatars.githubusercontent.com/u/7540477?v=4)](https://github.com/csae8092 "csae8092 (27 commits)")[![bellerophons-pegasus](https://avatars.githubusercontent.com/u/5328599?v=4)](https://github.com/bellerophons-pegasus "bellerophons-pegasus (5 commits)")[![nczirjak-acdh](https://avatars.githubusercontent.com/u/20183307?v=4)](https://github.com/nczirjak-acdh "nczirjak-acdh (2 commits)")[![uczeitschner](https://avatars.githubusercontent.com/u/52656595?v=4)](https://github.com/uczeitschner "uczeitschner (1 commits)")

---

Tags

arche

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/acdh-oeaw-arche-assets/health.svg)

```
[![Health](https://phpackages.com/badges/acdh-oeaw-arche-assets/health.svg)](https://phpackages.com/packages/acdh-oeaw-arche-assets)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
