Metadata-Version: 2.1
Name: archivematica-omekas
Version: 0.0.1
Home-page: https://github.com/nakamura196/archivematica-omekas
Author: Satoru
Author-email: you@example.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastcore
Requires-Dist: pandas
Requires-Dist: omeka-s-tools2
Requires-Dist: bs4
Requires-Dist: tqdm
Provides-Extra: dev

archivematica-omekas
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install archivematica_omekas
```

## 設定

### Archivematicaの設定

``` python
dip_zip_file_path = "data/sample/ex02-1-TIFF-007c28cc-4671-4d5d-be2a-facace4c7b84.zip"
mapping_json_file_path="data/sample/mapping.json"
```

### Omekaの設定

``` python
API_URL="https://omekas.aws.ldas.jp/sandbox/api"
KEY_IDENTITY="2st7sDKL2UAL8OKtfah8ffZS5UjefA7g"
KEY_CREDENTIAL="M4s6xyqkzbxgJZieQfsMysVUqzdC6ZPl"
```

## 実行

``` python
output_dir = ArchiveMaticaOmeka.convert(dip_zip_file_path, mapping_json_file_path, task_id="test")
```

``` python
metadata_csv_path = f"{output_dir}/metadata.csv"
media_csv_path = f"{output_dir}/media.csv"
ArchiveMaticaOmeka.upload(metadata_csv_path, media_csv_path, API_URL, KEY_IDENTITY, KEY_CREDENTIAL)
```

    アイテムの登録

    100%|██████████| 4/4 [00:26<00:00,  6.60s/it]


    IDの取得

    100%|██████████| 4/4 [00:01<00:00,  2.35it/s]


    メディアの登録

    100%|██████████| 4/4 [00:33<00:00,  8.49s/it]

以下のURLから、アイテムが登録されていることをご確認ください。

``` python
url = f"{API_URL.replace('/api', '')}"
url
```

    'https://omekas.aws.ldas.jp/sandbox'
