Skip to main content

mets_tools

Human-Friendly Exploration Tool for Archivematica METS Files

This tool is based on METSFlask by Tim Walsh.

METSFlask provides a foundation for interacting with and visualizing METS (Metadata Encoding and Transmission Standard) files. Building on this work, this tool offers additional features designed specifically for exploring and understanding Archivematica METS files, with a focus on accessibility and user-friendly navigation.

Usage

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/nakamura196/mets_tools.git

Documentation

Documentation can be found hosted on this GitHub repository’s pages.

How to use

from mets_tools.core import METSFile

local_file = "./test.xml"
ins = METSFile(local_file)
ins.parse_mets()

Original Files

original_files = ins.get_original_files()
original_files
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
amdsec_id filepath uuid hashtype hashvalue bytes format version puid modified_date fits_modified_unixtime filename size
0 amdSec_2 S001.png 386c4295-64fb-45b9-b5c6-3adfcd7f2bcf sha256 5288586020b7ff120ad53f94432f719aa0ca1c5e094dc9... 9097282 Portable Network Graphics 1.2 <a href="http://nationalarchives.gov.uk/PRONOM... 2024-10-25T03:00:20Z S001.png 9 MB

File Format Counts

ins.visualize_file_format_counts()

File Events Count

ins.visualize_file_events_count()

File Section

df = ins.parse_file_sec()
df
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
USE File ID Group ID ADMID File Location LOCTYPE OTHERLOCTYPE
0 original file-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf Group-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf amdSec_2 objects/S001.png OTHER SYSTEM
1 submissionDocumentation file-f6acdbb3-095f-4771-8fd9-8c5b74e296ec Group-f6acdbb3-095f-4771-8fd9-8c5b74e296ec amdSec_5 objects/submissionDocumentation/transfer-png-c... OTHER SYSTEM
2 preservation file-6f93b80d-fb6d-41b6-819e-b9bc3ad085e6 Group-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf amdSec_1 objects/S001-6f93b80d-fb6d-41b6-819e-b9bc3ad08... OTHER SYSTEM
3 text/ocr file-bd353cfc-64aa-4f48-af61-4a4d8ee3a55b Group-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf amdSec_3 objects/metadata/OCRfiles/S001-386c4295-64fb-4... OTHER SYSTEM
4 metadata file-d8aa2e08-71bd-4852-9d87-e6eba354affb Group-d8aa2e08-71bd-4852-9d87-e6eba354affb amdSec_4 objects/metadata/transfers/png-c4688ddd-8bb7-4... OTHER SYSTEM

Structure Map

ins.visualize_structMap()
StructMap (TYPE: physical, LABEL: Archivematica default)
└── Directory: png-e5e48d8a-421a-461d-8e55-468bf37253a8
    └── Directory: objects
        ├── Item: S001.png
        ├── Item: S001-6f93b80d-fb6d-41b6-819e-b9bc3ad085e6.tif
        ├── Directory: submissionDocumentation
        │   └── Directory: transfer-png-c4688ddd-8bb7-4593-b4bf-f4302ea6882c
        │       └── Item: METS.xml
        └── Directory: metadata
            ├── Directory: OCRfiles
            │   └── Item: S001-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf.txt
            └── Directory: transfers
                └── Directory: png-c4688ddd-8bb7-4593-b4bf-f4302ea6882c
                    └── Item: directory_tree.txt
StructMap (TYPE: logical, LABEL: Normative Directory Structure)
└── Directory: png-e5e48d8a-421a-461d-8e55-468bf37253a8
    └── Directory: objects
        ├── Item: S001.png
        ├── Item: S001-6f93b80d-fb6d-41b6-819e-b9bc3ad085e6.tif
        ├── Directory: submissionDocumentation
        │   └── Directory: transfer-png-c4688ddd-8bb7-4593-b4bf-f4302ea6882c
        │       └── Item: METS.xml
        └── Directory: metadata
            ├── Directory: OCRfiles
            │   └── Item: S001-386c4295-64fb-45b9-b5c6-3adfcd7f2bcf.txt
            └── Directory: transfers
                └── Directory: png-c4688ddd-8bb7-4593-b4bf-f4302ea6882c
                    └── Item: directory_tree.txt

File Changes

ins.show_file_changes()
ファイル名の変更は見つかりませんでした。

Metadata

Release files for mets-tools 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mets-tools 0.0.1
File Size Uploaded Provenance
mets_tools-0.0.1.tar.gz 12.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mets-tools 0.0.1
File Interpreter ABI Platform
mets_tools-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / mets_tools-0.0.1.tar.gz

Download URL mets_tools-0.0.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7d6a8ac8c8575f1aa0676052826294e4b5943a30401110452f0d0e0db9cfa4fd
BLAKE2b-256 checksum
How to use checksums
c1689a7c63ac93f8252184ad4cc8484ad7ab08f769e8c3f9f193ba3cc820b637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.11

Release files / mets_tools-0.0.1-py3-none-any.whl

Download URL mets_tools-0.0.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef41cb534ffa7873b76144fc2ae5c63cabe2700f88e31177c03af10366e58fc1
BLAKE2b-256 checksum
How to use checksums
bf140e43d6fe8fd842668e8189376e8de57b7c4407710cf9ead3f5821eea8b6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.11

Security for mets-tools 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page