photo-metadata


Namephoto-metadata JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/kingyo1205/photo-metadata
SummaryPython library to extract, read, modify, and write photo and video metadata (EXIF, IPTC, XMP) using ExifTool. Supports JPEG, RAW, and video files.
upload_time2025-09-07 07:19:49
maintainerNone
docs_urlNone
authorひろ
requires_python>=3.10
licenseNone
keywords photo image metadata exif exiftool iptc xmp video camera photography raw jpeg picture python library read write edit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # photo-metadata
  
> 🗒️ このREADMEは **日本語と英語の両方** を含みます。
> 📄 **This README includes both English and Japanese versions.**  
> 📘 **English** section is available below: [Go to English version](#photo-metadata-readme-english)  
> 📕 **日本語** セクションはこちらからどうぞ: [日本語版へ移動](#photo-metadata-readme-日本語版)

[![PyPI Downloads](https://static.pepy.tech/personalized-badge/photo-metadata?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads)](https://pepy.tech/projects/photo-metadata)

# Photo Metadata README (English)

---

`photo-metadata` is a Python library for extracting, manipulating, and writing metadata from photo and video files. It uses ExifTool as a backend and supports a wide range of image and video formats. Full support for Japanese tags is also provided.

## Key Features

* Extract metadata from photos and videos
* Read, write, and delete metadata
* Convenient methods for various metadata operations
* Compare two `Metadata` objects
* Filter multiple files by metadata
* Rename multiple files based on capture date or other metadata

## Installation

```bash
pip install photo-metadata
```

## Dependencies

* \[ExifTool] (needs to be installed separately; either add to PATH or provide full path)
* \[tqdm] (automatically installed via pip; used for progress display)
* \[chardet] (automatically installed via pip; used for encoding detection)

---

## Configuring ExifTool

```python
import photo_metadata

# Set the path to ExifTool
photo_metadata.set_exiftool_path(exiftool_path)
```

### Notes

The default `exiftool_path` is `"exiftool"`. If ExifTool is already in your PATH, calling `set_exiftool_path` is not required.

---

## Metadata Class

The `Metadata` class is the core class for working with metadata.

```python
from photo_metadata import Metadata
```

### Initialization

```python
metadata = Metadata(file_path="path/to/your/image.jpg")
```

* `file_path` (str): Path to the image file

### Accessing Metadata

Metadata can be accessed like a dictionary.

**Access using English tags:**

```python
date_time = metadata["EXIF:DateTimeOriginal"]
print(date_time)
```

**Access using Japanese tags:**

```python
date_time = metadata[photo_metadata.key_ja_to_en("EXIF:撮影日時")]
print(date_time)
```

### Modifying Metadata

You can modify metadata like a dictionary:

```python
metadata["EXIF:DateTimeOriginal"] = "2024:02:17 12:34:56"
```

### Writing Metadata to File

```python
metadata.write_metadata_to_file()
```

### Deleting Metadata

Metadata can be deleted using the `del` statement:

```python
del metadata["EXIF:DateTimeOriginal"]
```

### Comparison

Two `Metadata` objects can be compared using `==` and `!=`:

```python
metadata1 = Metadata("image1.jpg")
metadata2 = Metadata("image2.jpg")

if metadata1 == metadata2:
    print("Metadata is identical")
else:
    print("Metadata is different")
```

---

## Working with Multiple Files – MetadataBatchProcess Class

`MetadataBatchProcess` allows you to process metadata for multiple files.

```python
from photo_metadata import MetadataBatchProcess
```

### Initialization

```python
mbp = MetadataBatchProcess(file_path_list)
```

### Filter Files by Metadata

```python
mbp.filter_by_metadata(
    keyword_list=["NEX-5R", 2012],
    exact_match=True,
    all_keys_match=True,
    search_by="value"
)

for file, md in mbp.metadata_objects.items():
    print(f"{os.path.basename(file)}")
```

This example keeps files whose metadata values include both `"NEX-5R"` and `2012`.

### Filter Using Custom Conditions

```python
mbp.filter_by_custom_condition(
    lambda md: md[photo_metadata.key_ja_to_en("EXIF:F値")] >= 4.0
    and md[photo_metadata.key_ja_to_en("EXIF:モデル")] == 'NEX-5R'
)

for file, md in mbp.metadata_objects.items():
    print(f"{os.path.basename(file)}")
```

This example keeps files where the EXIF F-number is ≥ 4.0 and the camera model is `'NEX-5R'`.

### Rename Files Using Metadata

```python
import os
from tkinter import filedialog
from photo_metadata import MetadataBatchProcess, Metadata

def date(md: Metadata):
    date = md.get_date('%Y年%m月%d日-%H.%M.%S')
    if date == md.error_string:
        raise Exception("Not Found")
    return f"{date}-{MetadataBatchProcess.DUP_SEQ_1_DIGIT}"  # This is a duplicate sequence. It increments if duplicates exist, starting from 0. Must be included in the format.

file_path_list = list(map(os.path.normpath, filedialog.askopenfilenames()))
mbp = MetadataBatchProcess(file_path_list)

# Prepare rename creates new_name_dict for preview
mbp.prepare_rename(format_func=date)

print("new_name_dict")
for file, new_name in mbp.new_name_dict.items():
    print(f"{file}\n{new_name}")

print("\nerror_dist")
for file, new_name in mbp.error_files.items():
    print(f"{file}\n{new_name}")

input("Press Enter to rename files")

mbp.rename_files()
```

---

## API Reference

### photo\_metadata Module

* `get_key_map() -> dict`: Returns the dictionary for Japanese tag conversion
* `set_exiftool_path(exiftool_path: str | Path) -> None`: Set the path to ExifTool
* `get_exiftool_path() -> Path`: Get the current ExifTool path
* `set_jp_tags_json_path(jp_tags_json_path: str | Path) -> None`: Set the path to the Japanese tags JSON file
* `get_jp_tags_json_path() -> Path`: Get the path to the Japanese tags JSON file
* `key_en_to_ja(key_en: str) -> str`: Convert English key to Japanese
* `key_ja_to_en(key_ja: str) -> str`: Convert Japanese key to English

### Metadata Class

* `__init__(self, file_path: str | Path)`
* `display_japanese(self, return_type: Literal["str", "print", "dict"] = "print") -> str`
* `write_metadata_to_file(self, file_path: str = None) -> None`
* `get_metadata_dict(self) -> dict`
* `export_metadata(self, output_path: str = None, format: Literal["json", "csv"] = 'json', lang_ja_metadata: bool = False) -> None`
* `keys(self) -> list[str]`
* `values(self) -> list[Any]`
* `items(self) -> list[tuple[str, Any]]`
* `get_gps_coordinates(self) -> str`
* `export_gps_to_google_maps(self) -> str`
* `get_date(self, format: str = '%Y:%m:%d %H:%M:%S', default_time_zone: str = '+09:00') -> str`
* `get_image_dimensions(self) -> str`
* `get_file_size(self) -> tuple[str, int]`
* `get_model_name(self) -> str`
* `get_lens_name(self) -> str`
* `get_focal_length(self) -> dict`
* `show(self) -> None`
* `get_main_metadata(self) -> dict`
* `contains_key(self, key, exact_match: bool = True)`
* `contains_value(self, value, exact_match: bool = True)`
* `copy(self) -> "Metadata"`
* `@classmethod load_all_metadata(...) -> dict[str, "Metadata"]`

### MetadataBatchProcess Class

* `__init__(self, file_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40)`
* `filter_by_custom_condition(self, condition_func: Callable[[Metadata], bool]) -> None`
* `filter_by_metadata(self, keyword_list: list[str], exact_match: bool, all_keys_match: bool, search_by: Literal["either", "value", "key"]) -> None`
* `prepare_rename(self, format_func: Callable[[Metadata], str]) -> None`
* `rename_files(self) -> str`
* `copy(self) -> "MetadataBatchProcess"`

---
### If you find this library useful, please consider giving it a ⭐ on GitHub!

---

## URLs

* PyPI: `https://pypi.org/project/photo-metadata/`
* GitHub: `https://github.com/kingyo1205/photo-metadata`

---

## Notes

ExifTool is required. This library uses [ExifTool](https://exiftool.org/) as an external command to process image and video metadata.

---

## Required Software

ExifTool must be installed on your system. Download it from the [official website](https://exiftool.org/).

---

## License

This library is distributed under the MIT License. ExifTool itself is distributed under the [Artistic License 2.0](https://dev.perl.org/licenses/artistic.html). Please comply with the license when using ExifTool.

---


# Photo Metadata README 日本語版


---


`photo-metadata`は、写真や動画ファイルからメタデータを抽出、操作、書き込みを行うためのPythonライブラリです。exiftoolをバックエンドで使用し、幅広い画像、動画フォーマットに対応しています。日本語タグのサポートも特徴です。

## 主な機能

- 写真や動画ファイルのメタデータの抽出
- メタデータの読み取り、書き込み、削除
- さまざまなメタデータ操作のための便利なメソッド
- 2つのMetadataオブジェクトの比較
- 複数のファイルをメタデータでフィルター
- 複数のファイルを撮影日時などでリネーム

## インストール


`pip install photo-metadata`

## 依存関係

- [exiftool] (別途インストールが必要です。 パスを通すかフルパスを指定してください)
- [tqdm] (pipで自動でインストールされます。進捗表示用です)
- [chardet] (pipで自動でインストールされます。 エンコーディング解析用です)



## exiftoolを設定

```python
import photo_metadata

# exiftoolのパスを設定
photo_metadata.set_exiftool_path(exiftool_path)
```

### exiftool_pathのデフォルトは"exiftool"です。 パスが通っている場合は set_exiftool_path を実行する必要はありません。

## Metadataクラス

`Metadata`クラスは、メタデータ操作の中心となるクラスです。
```python
from photo_metadata import Metadata
```

### 初期化
```python
metadata = Metadata(file_path="path/to/your/image.jpg")
```
- `file_path` (str): 画像ファイルのパス



### メタデータの取得

メタデータは、辞書のようにアクセスできます。

英語のタグでアクセス
```python
date_time = metadata["EXIF:DateTimeOriginal"]
print(date_time)
```

日本語のタグでアクセス
```python
date_time = metadata[photo_metadata.key_ja_to_en("EXIF:撮影日時")]
print(date_time)
```

### メタデータの変更

メタデータは、辞書のように変更できます。
```python
metadata["EXIF:DateTimeOriginal"] = "2024:02:17 12:34:56"
```

### メタデータの書き込み - 変更をファイルに書き込む


```python
metadata.write_metadata_to_file()
```

### メタデータの削除

メタデータは、`del`ステートメントで削除できます。
```python
del metadata["EXIF:DateTimeOriginal"]
```


### 比較

`==`と`!=`演算子を使用して、2つの`Metadata`オブジェクトを比較できます。
```python
metadata1 = Metadata("image1.jpg")
metadata2 = Metadata("image2.jpg")

if metadata1 == metadata2:
    print("メタデータは同じです")
else:
    print("メタデータは異なります")
```

## 複数のファイルのメタデータを扱う。- MetadataBatchProcessクラス
`MetadataBatchProcess`は複数ファイルのメタデータを処理するためのクラスです。

```python
from photo_metadata import MetadataBatchProcess
```

### 初期化
```python
mbp = MetadataBatchProcess(file_path_list)
```

### __init__メソッド
```python
def __init__(self, file_list: list[str], 
                 progress_func: Callable[[int], None] | None = None, 
                 max_workers: int = 40):
```

### メタデータに特定の値またはキーまたはキーと値どちらかに存在するファイルを見つける
```python
mbp.filter_by_metadata(keyword_list=["NEX-5R", 2012],
                             exact_match=True,
                             all_keys_match=True,
                             search_by="value")


for file, md in mbp.metadata_objects.items():
    
    print(f"{os.path.basename(file)}")
```

この場合はメタデータの値に"NEX-5R", 2012が両方とも、存在したファイルが残る


### メタデータを検証
```python
mbp.filter_by_custom_condition(lambda md: md[photo_metadata.key_ja_to_en("EXIF:F値")] >= 4.0 and md[photo_metadata.key_ja_to_en("EXIF:モデル")] == 'NEX-5R')

for file, md in mbp.metadata_objects.items():
    print(f"{os.path.basename(file)}")
```

この場合はメタデータのEXIF:F値が4.0以上かつ、EXIF:モデルが'NEX-5R'のファイルが残る


### メタデータでリネーム

```python
import os
from tkinter import filedialog

from photo_metadata import MetadataBatchProcess, Metadata


def date(md: Metadata):
    date = md.get_date('%Y年%m月%d日-%H.%M.%S')
    if date == md.error_string:
        raise Exception("Not Found")
    return f"{date}-{MetadataBatchProcess.DUP_SEQ_1_DIGIT}" これは重複連番です。重複したときに数字が増えます。基本は0になります。フォーマットに必ず含めてください。

file_path_list = list(map(os.path.normpath, filedialog.askopenfilenames()))
mbp = MetadataBatchProcess(file_path_list)

# prepare_rename を実行すると new_name_dict が作成され、
# ファイル名のリネームプレビューが可能になります。
mbp.prepare_rename(format_func=date)

print("new_name_dict")
for file, new_name in mbp.new_name_dict.items():
    print(f"{file}\n{new_name}")

print("\nerror_dist")
for file, new_name in mbp.error_files.items():
    print(f"{file}\n{new_name}")

input("リネームするなら enter キーを押してください")

mbp.rename_files()

```

この場合は日付でリネームします。
photo_metadata.MetadataBatchProcess.DUP_SEQ_1_DIGIT これは重複連番です。重複したときに数字が増えます。基本は0になります。フォーマットに必ず含めてください。

```python
if date == md.error_string:
    raise Exception("Not Found")
```
日付が取得できない際はエラーを出してください。








---






## APIリファレンス


### photo_metadata


- `get_key_map() -> dict`: 日本語キー変換用の辞書を取得できます
- `set_exiftool_path(exiftool_path: str | Path) -> None`: exiftoolのパスを設定できます
- `get_exiftool_path() -> Path`: 設定されたexiftoolのパスを取得できます
- `set_jp_tags_json_path(jp_tags_json_path: str | Path) -> None`: 日本語タグのJSONファイルのパスを設定できます
- `get_jp_tags_json_path() -> Path`: 設定された日本語タグのJSONファイルのパスを取得できます`
- `key_en_to_ja(key_en: str) -> str`: 英語のキーを日本語に変換します
- `key_ja_to_en(key_ja: str) -> str`: 日本語のキーを英語に変換します


### photo_metadata.Metadata

- `__init__(self, file_path: str | Path)`: コンストラクタ


- `display_japanese(self, return_type: Literal["str", "print", "dict"] = "print") -> str`: メタデータを日本語のキーで表示できます
- `write_metadata_to_file(self, file_path: str = None) -> None`: メタデータをファイルに書き込む
- `get_metadata_dict(self) -> dict`: メタデータの辞書を取得します
- `export_metadata(self, output_path: str = None, format: Literal["json", "csv"] = 'json', lang_ja_metadata: bool = False) -> None`: メタデータをファイルにエクスポート
- `keys(self) -> list[str]`: メタデータのキーのリストを取得します
- `values(self) -> list[Any]`: メタデータの値のリストを取得します
- `items(self) -> list[tuple[str, Any]]`: メタデータのキーと値のペアのリストを取得します
- `get_gps_coordinates(self) -> str`: GPS座標を取得
- `export_gps_to_google_maps(self) -> str`: GPS情報をGoogleマップのURLに変換
- `get_date(self, format: str = '%Y:%m:%d %H:%M:%S', default_time_zone: str = '+09:00') -> str`: 撮影日時を取得 (日付フォーマットを指定できます)
- `get_image_dimensions(self) -> str`: 画像の寸法を取得
- `get_file_size(self) -> tuple[str, int]`: ファイルサイズを取得
- `get_model_name(self) -> str`: カメラの機種名を取得
- `get_lens_name(self) -> str`: レンズ名を取得
- `get_focal_length(self) -> dict`: 焦点距離を取得
- `show(self) -> None`: ファイルを表示
- `get_main_metadata(self) -> dict`: 主要なメタデータを取得
- `contains_key(self, key, exact_match: bool = True)`: キーが存在するか確認します
- `contains_value(self, value, exact_match: bool = True)`: 値が存在するか確認します
- `copy(self) -> "Metadata"`: Metadataクラスのインスタンスをコピーします
- `@classmethod def load_all_metadata(cls, file_path_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40) -> dict[str, "Metadata"]`: 複数のファイルのメタデータを並列処理で高速に取得します。


### photo_metadata.MetadataBatchProcess

- `__init__(self, file_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40)`: コンストラクタ
- `filter_by_custom_condition(self, condition_func: Callable[[Metadata], bool]) -> None`: メタデータを任意の関数 (条件) でフィルターします
- `filter_by_metadata(self, keyword_list: list[str], exact_match: bool, all_keys_match: bool, search_by: Literal["either", "value", "key"]) -> None`: メタデータに特定の値またはキーまたはキーと値どちらかに存在するファイルを見つける
- `prepare_rename(self, format_func: Callable[[Metadata], str]) -> None`: リネームの準備をします
- `rename_files(self) -> str`: ファイルをリネームします
- `copy(self) -> "MetadataBatchProcess"`: MetadataBatchProcessクラスのインスタンスをコピーします


---

### このライブラリが気に入ったら、ぜひGitHubで⭐をお願いします!

---




## URL

### pypi
`https://pypi.org/project/photo-metadata/`

### github
`https://github.com/kingyo1205/photo-metadata`

## 注意点

exiftoolが必ず必要です。

このライブラリは、画像やメタデータを処理する際に[ExifTool](https://exiftool.org/)を外部コマンドとして使用しています。

## 必要なソフトウェア

このライブラリを使用するには、ExifToolがシステムにインストールされている必要があります。ExifToolは[公式サイト](https://exiftool.org/)からダウンロードしてインストールしてください。

## ライセンス

このライブラリはMITライセンスの下で配布されています。ただし、ExifTool自体は[Artistic License 2.0](https://dev.perl.org/licenses/artistic.html)の下で配布されています。ExifToolを利用する場合は、そのライセンス条件を遵守してください。

---



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kingyo1205/photo-metadata",
    "name": "photo-metadata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "photo, image, metadata, exif, exiftool, iptc, xmp, video, camera, photography, raw, jpeg, picture, python, library, read, write, edit",
    "author": "\u3072\u308d",
    "author_email": "hirokingyo.sub@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/03/c6/3800d0be699b5524473320c11debd3ff146db5b4c980ff3614f460f6a6f2/photo_metadata-0.2.1.tar.gz",
    "platform": null,
    "description": "# photo-metadata\r\n  \r\n> \ud83d\uddd2\ufe0f \u3053\u306eREADME\u306f **\u65e5\u672c\u8a9e\u3068\u82f1\u8a9e\u306e\u4e21\u65b9** \u3092\u542b\u307f\u307e\u3059\u3002\r\n> \ud83d\udcc4 **This README includes both English and Japanese versions.**  \r\n> \ud83d\udcd8 **English** section is available below: [Go to English version](#photo-metadata-readme-english)  \r\n> \ud83d\udcd5 **\u65e5\u672c\u8a9e** \u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3053\u3061\u3089\u304b\u3089\u3069\u3046\u305e: [\u65e5\u672c\u8a9e\u7248\u3078\u79fb\u52d5](#photo-metadata-readme-\u65e5\u672c\u8a9e\u7248)\r\n\r\n[![PyPI Downloads](https://static.pepy.tech/personalized-badge/photo-metadata?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads)](https://pepy.tech/projects/photo-metadata)\r\n\r\n# Photo Metadata README (English)\r\n\r\n---\r\n\r\n`photo-metadata` is a Python library for extracting, manipulating, and writing metadata from photo and video files. It uses ExifTool as a backend and supports a wide range of image and video formats. Full support for Japanese tags is also provided.\r\n\r\n## Key Features\r\n\r\n* Extract metadata from photos and videos\r\n* Read, write, and delete metadata\r\n* Convenient methods for various metadata operations\r\n* Compare two `Metadata` objects\r\n* Filter multiple files by metadata\r\n* Rename multiple files based on capture date or other metadata\r\n\r\n## Installation\r\n\r\n```bash\r\npip install photo-metadata\r\n```\r\n\r\n## Dependencies\r\n\r\n* \\[ExifTool] (needs to be installed separately; either add to PATH or provide full path)\r\n* \\[tqdm] (automatically installed via pip; used for progress display)\r\n* \\[chardet] (automatically installed via pip; used for encoding detection)\r\n\r\n---\r\n\r\n## Configuring ExifTool\r\n\r\n```python\r\nimport photo_metadata\r\n\r\n# Set the path to ExifTool\r\nphoto_metadata.set_exiftool_path(exiftool_path)\r\n```\r\n\r\n### Notes\r\n\r\nThe default `exiftool_path` is `\"exiftool\"`. If ExifTool is already in your PATH, calling `set_exiftool_path` is not required.\r\n\r\n---\r\n\r\n## Metadata Class\r\n\r\nThe `Metadata` class is the core class for working with metadata.\r\n\r\n```python\r\nfrom photo_metadata import Metadata\r\n```\r\n\r\n### Initialization\r\n\r\n```python\r\nmetadata = Metadata(file_path=\"path/to/your/image.jpg\")\r\n```\r\n\r\n* `file_path` (str): Path to the image file\r\n\r\n### Accessing Metadata\r\n\r\nMetadata can be accessed like a dictionary.\r\n\r\n**Access using English tags:**\r\n\r\n```python\r\ndate_time = metadata[\"EXIF:DateTimeOriginal\"]\r\nprint(date_time)\r\n```\r\n\r\n**Access using Japanese tags:**\r\n\r\n```python\r\ndate_time = metadata[photo_metadata.key_ja_to_en(\"EXIF:\u64ae\u5f71\u65e5\u6642\")]\r\nprint(date_time)\r\n```\r\n\r\n### Modifying Metadata\r\n\r\nYou can modify metadata like a dictionary:\r\n\r\n```python\r\nmetadata[\"EXIF:DateTimeOriginal\"] = \"2024:02:17 12:34:56\"\r\n```\r\n\r\n### Writing Metadata to File\r\n\r\n```python\r\nmetadata.write_metadata_to_file()\r\n```\r\n\r\n### Deleting Metadata\r\n\r\nMetadata can be deleted using the `del` statement:\r\n\r\n```python\r\ndel metadata[\"EXIF:DateTimeOriginal\"]\r\n```\r\n\r\n### Comparison\r\n\r\nTwo `Metadata` objects can be compared using `==` and `!=`:\r\n\r\n```python\r\nmetadata1 = Metadata(\"image1.jpg\")\r\nmetadata2 = Metadata(\"image2.jpg\")\r\n\r\nif metadata1 == metadata2:\r\n    print(\"Metadata is identical\")\r\nelse:\r\n    print(\"Metadata is different\")\r\n```\r\n\r\n---\r\n\r\n## Working with Multiple Files \u2013 MetadataBatchProcess Class\r\n\r\n`MetadataBatchProcess` allows you to process metadata for multiple files.\r\n\r\n```python\r\nfrom photo_metadata import MetadataBatchProcess\r\n```\r\n\r\n### Initialization\r\n\r\n```python\r\nmbp = MetadataBatchProcess(file_path_list)\r\n```\r\n\r\n### Filter Files by Metadata\r\n\r\n```python\r\nmbp.filter_by_metadata(\r\n    keyword_list=[\"NEX-5R\", 2012],\r\n    exact_match=True,\r\n    all_keys_match=True,\r\n    search_by=\"value\"\r\n)\r\n\r\nfor file, md in mbp.metadata_objects.items():\r\n    print(f\"{os.path.basename(file)}\")\r\n```\r\n\r\nThis example keeps files whose metadata values include both `\"NEX-5R\"` and `2012`.\r\n\r\n### Filter Using Custom Conditions\r\n\r\n```python\r\nmbp.filter_by_custom_condition(\r\n    lambda md: md[photo_metadata.key_ja_to_en(\"EXIF:F\u5024\")] >= 4.0\r\n    and md[photo_metadata.key_ja_to_en(\"EXIF:\u30e2\u30c7\u30eb\")] == 'NEX-5R'\r\n)\r\n\r\nfor file, md in mbp.metadata_objects.items():\r\n    print(f\"{os.path.basename(file)}\")\r\n```\r\n\r\nThis example keeps files where the EXIF F-number is \u2265 4.0 and the camera model is `'NEX-5R'`.\r\n\r\n### Rename Files Using Metadata\r\n\r\n```python\r\nimport os\r\nfrom tkinter import filedialog\r\nfrom photo_metadata import MetadataBatchProcess, Metadata\r\n\r\ndef date(md: Metadata):\r\n    date = md.get_date('%Y\u5e74%m\u6708%d\u65e5-%H.%M.%S')\r\n    if date == md.error_string:\r\n        raise Exception(\"Not Found\")\r\n    return f\"{date}-{MetadataBatchProcess.DUP_SEQ_1_DIGIT}\"  # This is a duplicate sequence. It increments if duplicates exist, starting from 0. Must be included in the format.\r\n\r\nfile_path_list = list(map(os.path.normpath, filedialog.askopenfilenames()))\r\nmbp = MetadataBatchProcess(file_path_list)\r\n\r\n# Prepare rename creates new_name_dict for preview\r\nmbp.prepare_rename(format_func=date)\r\n\r\nprint(\"new_name_dict\")\r\nfor file, new_name in mbp.new_name_dict.items():\r\n    print(f\"{file}\\n{new_name}\")\r\n\r\nprint(\"\\nerror_dist\")\r\nfor file, new_name in mbp.error_files.items():\r\n    print(f\"{file}\\n{new_name}\")\r\n\r\ninput(\"Press Enter to rename files\")\r\n\r\nmbp.rename_files()\r\n```\r\n\r\n---\r\n\r\n## API Reference\r\n\r\n### photo\\_metadata Module\r\n\r\n* `get_key_map() -> dict`: Returns the dictionary for Japanese tag conversion\r\n* `set_exiftool_path(exiftool_path: str | Path) -> None`: Set the path to ExifTool\r\n* `get_exiftool_path() -> Path`: Get the current ExifTool path\r\n* `set_jp_tags_json_path(jp_tags_json_path: str | Path) -> None`: Set the path to the Japanese tags JSON file\r\n* `get_jp_tags_json_path() -> Path`: Get the path to the Japanese tags JSON file\r\n* `key_en_to_ja(key_en: str) -> str`: Convert English key to Japanese\r\n* `key_ja_to_en(key_ja: str) -> str`: Convert Japanese key to English\r\n\r\n### Metadata Class\r\n\r\n* `__init__(self, file_path: str | Path)`\r\n* `display_japanese(self, return_type: Literal[\"str\", \"print\", \"dict\"] = \"print\") -> str`\r\n* `write_metadata_to_file(self, file_path: str = None) -> None`\r\n* `get_metadata_dict(self) -> dict`\r\n* `export_metadata(self, output_path: str = None, format: Literal[\"json\", \"csv\"] = 'json', lang_ja_metadata: bool = False) -> None`\r\n* `keys(self) -> list[str]`\r\n* `values(self) -> list[Any]`\r\n* `items(self) -> list[tuple[str, Any]]`\r\n* `get_gps_coordinates(self) -> str`\r\n* `export_gps_to_google_maps(self) -> str`\r\n* `get_date(self, format: str = '%Y:%m:%d %H:%M:%S', default_time_zone: str = '+09:00') -> str`\r\n* `get_image_dimensions(self) -> str`\r\n* `get_file_size(self) -> tuple[str, int]`\r\n* `get_model_name(self) -> str`\r\n* `get_lens_name(self) -> str`\r\n* `get_focal_length(self) -> dict`\r\n* `show(self) -> None`\r\n* `get_main_metadata(self) -> dict`\r\n* `contains_key(self, key, exact_match: bool = True)`\r\n* `contains_value(self, value, exact_match: bool = True)`\r\n* `copy(self) -> \"Metadata\"`\r\n* `@classmethod load_all_metadata(...) -> dict[str, \"Metadata\"]`\r\n\r\n### MetadataBatchProcess Class\r\n\r\n* `__init__(self, file_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40)`\r\n* `filter_by_custom_condition(self, condition_func: Callable[[Metadata], bool]) -> None`\r\n* `filter_by_metadata(self, keyword_list: list[str], exact_match: bool, all_keys_match: bool, search_by: Literal[\"either\", \"value\", \"key\"]) -> None`\r\n* `prepare_rename(self, format_func: Callable[[Metadata], str]) -> None`\r\n* `rename_files(self) -> str`\r\n* `copy(self) -> \"MetadataBatchProcess\"`\r\n\r\n---\r\n### If you find this library useful, please consider giving it a \u2b50 on GitHub!\r\n\r\n---\r\n\r\n## URLs\r\n\r\n* PyPI: `https://pypi.org/project/photo-metadata/`\r\n* GitHub: `https://github.com/kingyo1205/photo-metadata`\r\n\r\n---\r\n\r\n## Notes\r\n\r\nExifTool is required. This library uses [ExifTool](https://exiftool.org/) as an external command to process image and video metadata.\r\n\r\n---\r\n\r\n## Required Software\r\n\r\nExifTool must be installed on your system. Download it from the [official website](https://exiftool.org/).\r\n\r\n---\r\n\r\n## License\r\n\r\nThis library is distributed under the MIT License. ExifTool itself is distributed under the [Artistic License 2.0](https://dev.perl.org/licenses/artistic.html). Please comply with the license when using ExifTool.\r\n\r\n---\r\n\r\n\r\n# Photo Metadata README \u65e5\u672c\u8a9e\u7248\r\n\r\n\r\n---\r\n\r\n\r\n`photo-metadata`\u306f\u3001\u5199\u771f\u3084\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3001\u64cd\u4f5c\u3001\u66f8\u304d\u8fbc\u307f\u3092\u884c\u3046\u305f\u3081\u306ePython\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002exiftool\u3092\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067\u4f7f\u7528\u3057\u3001\u5e45\u5e83\u3044\u753b\u50cf\u3001\u52d5\u753b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u65e5\u672c\u8a9e\u30bf\u30b0\u306e\u30b5\u30dd\u30fc\u30c8\u3082\u7279\u5fb4\u3067\u3059\u3002\r\n\r\n## \u4e3b\u306a\u6a5f\u80fd\r\n\r\n- \u5199\u771f\u3084\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u62bd\u51fa\r\n- \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u53d6\u308a\u3001\u66f8\u304d\u8fbc\u307f\u3001\u524a\u9664\r\n- \u3055\u307e\u3056\u307e\u306a\u30e1\u30bf\u30c7\u30fc\u30bf\u64cd\u4f5c\u306e\u305f\u3081\u306e\u4fbf\u5229\u306a\u30e1\u30bd\u30c3\u30c9\r\n- 2\u3064\u306eMetadata\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6bd4\u8f03\r\n- \u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30e1\u30bf\u30c7\u30fc\u30bf\u3067\u30d5\u30a3\u30eb\u30bf\u30fc\r\n- \u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u64ae\u5f71\u65e5\u6642\u306a\u3069\u3067\u30ea\u30cd\u30fc\u30e0\r\n\r\n## \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\n\r\n\r\n`pip install photo-metadata`\r\n\r\n## \u4f9d\u5b58\u95a2\u4fc2\r\n\r\n- [exiftool] (\u5225\u9014\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u3000\u30d1\u30b9\u3092\u901a\u3059\u304b\u30d5\u30eb\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044)\r\n- [tqdm] (pip\u3067\u81ea\u52d5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002\u9032\u6357\u8868\u793a\u7528\u3067\u3059)\r\n- [chardet] (pip\u3067\u81ea\u52d5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002 \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u89e3\u6790\u7528\u3067\u3059)\r\n\r\n\r\n\r\n## exiftool\u3092\u8a2d\u5b9a\r\n\r\n```python\r\nimport photo_metadata\r\n\r\n# exiftool\u306e\u30d1\u30b9\u3092\u8a2d\u5b9a\r\nphoto_metadata.set_exiftool_path(exiftool_path)\r\n```\r\n\r\n### exiftool_path\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\"exiftool\"\u3067\u3059\u3002\u3000\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3000set_exiftool_path\u3000\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\r\n\r\n## Metadata\u30af\u30e9\u30b9\r\n\r\n`Metadata`\u30af\u30e9\u30b9\u306f\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u64cd\u4f5c\u306e\u4e2d\u5fc3\u3068\u306a\u308b\u30af\u30e9\u30b9\u3067\u3059\u3002\r\n```python\r\nfrom photo_metadata import Metadata\r\n```\r\n\r\n### \u521d\u671f\u5316\r\n```python\r\nmetadata = Metadata(file_path=\"path/to/your/image.jpg\")\r\n```\r\n- `file_path` (str): \u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\r\n\r\n\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\r\n\r\n\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u3001\u8f9e\u66f8\u306e\u3088\u3046\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\r\n\r\n\u82f1\u8a9e\u306e\u30bf\u30b0\u3067\u30a2\u30af\u30bb\u30b9\r\n```python\r\ndate_time = metadata[\"EXIF:DateTimeOriginal\"]\r\nprint(date_time)\r\n```\r\n\r\n\u65e5\u672c\u8a9e\u306e\u30bf\u30b0\u3067\u30a2\u30af\u30bb\u30b9\r\n```python\r\ndate_time = metadata[photo_metadata.key_ja_to_en(\"EXIF:\u64ae\u5f71\u65e5\u6642\")]\r\nprint(date_time)\r\n```\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u5909\u66f4\r\n\r\n\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u3001\u8f9e\u66f8\u306e\u3088\u3046\u306b\u5909\u66f4\u3067\u304d\u307e\u3059\u3002\r\n```python\r\nmetadata[\"EXIF:DateTimeOriginal\"] = \"2024:02:17 12:34:56\"\r\n```\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u66f8\u304d\u8fbc\u307f - \u5909\u66f4\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\r\n\r\n\r\n```python\r\nmetadata.write_metadata_to_file()\r\n```\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u524a\u9664\r\n\r\n\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u3001`del`\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u524a\u9664\u3067\u304d\u307e\u3059\u3002\r\n```python\r\ndel metadata[\"EXIF:DateTimeOriginal\"]\r\n```\r\n\r\n\r\n### \u6bd4\u8f03\r\n\r\n`==`\u3068`!=`\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u30012\u3064\u306e`Metadata`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6bd4\u8f03\u3067\u304d\u307e\u3059\u3002\r\n```python\r\nmetadata1 = Metadata(\"image1.jpg\")\r\nmetadata2 = Metadata(\"image2.jpg\")\r\n\r\nif metadata1 == metadata2:\r\n    print(\"\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u540c\u3058\u3067\u3059\")\r\nelse:\r\n    print(\"\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u7570\u306a\u308a\u307e\u3059\")\r\n```\r\n\r\n## \u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u6271\u3046\u3002- MetadataBatchProcess\u30af\u30e9\u30b9\r\n`MetadataBatchProcess`\u306f\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30af\u30e9\u30b9\u3067\u3059\u3002\r\n\r\n```python\r\nfrom photo_metadata import MetadataBatchProcess\r\n```\r\n\r\n### \u521d\u671f\u5316\r\n```python\r\nmbp = MetadataBatchProcess(file_path_list)\r\n```\r\n\r\n### __init__\u30e1\u30bd\u30c3\u30c9\r\n```python\r\ndef __init__(self, file_list: list[str], \r\n                 progress_func: Callable[[int], None] | None = None, \r\n                 max_workers: int = 40):\r\n```\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u7279\u5b9a\u306e\u5024\u307e\u305f\u306f\u30ad\u30fc\u307e\u305f\u306f\u30ad\u30fc\u3068\u5024\u3069\u3061\u3089\u304b\u306b\u5b58\u5728\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3064\u3051\u308b\r\n```python\r\nmbp.filter_by_metadata(keyword_list=[\"NEX-5R\", 2012],\r\n                             exact_match=True,\r\n                             all_keys_match=True,\r\n                             search_by=\"value\")\r\n\r\n\r\nfor file, md in mbp.metadata_objects.items():\r\n    \r\n    print(f\"{os.path.basename(file)}\")\r\n```\r\n\r\n\u3053\u306e\u5834\u5408\u306f\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u5024\u306b\"NEX-5R\", 2012\u304c\u4e21\u65b9\u3068\u3082\u3001\u5b58\u5728\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u308b\r\n\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u691c\u8a3c\r\n```python\r\nmbp.filter_by_custom_condition(lambda md: md[photo_metadata.key_ja_to_en(\"EXIF:F\u5024\")] >= 4.0 and md[photo_metadata.key_ja_to_en(\"EXIF:\u30e2\u30c7\u30eb\")] == 'NEX-5R')\r\n\r\nfor file, md in mbp.metadata_objects.items():\r\n    print(f\"{os.path.basename(file)}\")\r\n```\r\n\r\n\u3053\u306e\u5834\u5408\u306f\u30e1\u30bf\u30c7\u30fc\u30bf\u306eEXIF:F\u5024\u304c4.0\u4ee5\u4e0a\u304b\u3064\u3001EXIF:\u30e2\u30c7\u30eb\u304c'NEX-5R'\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u308b\r\n\r\n\r\n### \u30e1\u30bf\u30c7\u30fc\u30bf\u3067\u30ea\u30cd\u30fc\u30e0\r\n\r\n```python\r\nimport os\r\nfrom tkinter import filedialog\r\n\r\nfrom photo_metadata import MetadataBatchProcess, Metadata\r\n\r\n\r\ndef date(md: Metadata):\r\n    date = md.get_date('%Y\u5e74%m\u6708%d\u65e5-%H.%M.%S')\r\n    if date == md.error_string:\r\n        raise Exception(\"Not Found\")\r\n    return f\"{date}-{MetadataBatchProcess.DUP_SEQ_1_DIGIT}\" \u3053\u308c\u306f\u91cd\u8907\u9023\u756a\u3067\u3059\u3002\u91cd\u8907\u3057\u305f\u3068\u304d\u306b\u6570\u5b57\u304c\u5897\u3048\u307e\u3059\u3002\u57fa\u672c\u306f0\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5fc5\u305a\u542b\u3081\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\nfile_path_list = list(map(os.path.normpath, filedialog.askopenfilenames()))\r\nmbp = MetadataBatchProcess(file_path_list)\r\n\r\n# prepare_rename \u3092\u5b9f\u884c\u3059\u308b\u3068 new_name_dict \u304c\u4f5c\u6210\u3055\u308c\u3001\r\n# \u30d5\u30a1\u30a4\u30eb\u540d\u306e\u30ea\u30cd\u30fc\u30e0\u30d7\u30ec\u30d3\u30e5\u30fc\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\r\nmbp.prepare_rename(format_func=date)\r\n\r\nprint(\"new_name_dict\")\r\nfor file, new_name in mbp.new_name_dict.items():\r\n    print(f\"{file}\\n{new_name}\")\r\n\r\nprint(\"\\nerror_dist\")\r\nfor file, new_name in mbp.error_files.items():\r\n    print(f\"{file}\\n{new_name}\")\r\n\r\ninput(\"\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u306a\u3089 enter \u30ad\u30fc\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\")\r\n\r\nmbp.rename_files()\r\n\r\n```\r\n\r\n\u3053\u306e\u5834\u5408\u306f\u65e5\u4ed8\u3067\u30ea\u30cd\u30fc\u30e0\u3057\u307e\u3059\u3002\r\nphoto_metadata.MetadataBatchProcess.DUP_SEQ_1_DIGIT \u3053\u308c\u306f\u91cd\u8907\u9023\u756a\u3067\u3059\u3002\u91cd\u8907\u3057\u305f\u3068\u304d\u306b\u6570\u5b57\u304c\u5897\u3048\u307e\u3059\u3002\u57fa\u672c\u306f0\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5fc5\u305a\u542b\u3081\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n```python\r\nif date == md.error_string:\r\n    raise Exception(\"Not Found\")\r\n```\r\n\u65e5\u4ed8\u304c\u53d6\u5f97\u3067\u304d\u306a\u3044\u969b\u306f\u30a8\u30e9\u30fc\u3092\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n\r\n\r\n\r\n## API\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\r\n\r\n\r\n### photo_metadata\r\n\r\n\r\n- `get_key_map() -> dict`: \u65e5\u672c\u8a9e\u30ad\u30fc\u5909\u63db\u7528\u306e\u8f9e\u66f8\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\r\n- `set_exiftool_path(exiftool_path: str | Path) -> None`: exiftool\u306e\u30d1\u30b9\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\r\n- `get_exiftool_path() -> Path`: \u8a2d\u5b9a\u3055\u308c\u305fexiftool\u306e\u30d1\u30b9\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\r\n- `set_jp_tags_json_path(jp_tags_json_path: str | Path) -> None`: \u65e5\u672c\u8a9e\u30bf\u30b0\u306eJSON\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\r\n- `get_jp_tags_json_path() -> Path`: \u8a2d\u5b9a\u3055\u308c\u305f\u65e5\u672c\u8a9e\u30bf\u30b0\u306eJSON\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059`\r\n- `key_en_to_ja(key_en: str) -> str`: \u82f1\u8a9e\u306e\u30ad\u30fc\u3092\u65e5\u672c\u8a9e\u306b\u5909\u63db\u3057\u307e\u3059\r\n- `key_ja_to_en(key_ja: str) -> str`: \u65e5\u672c\u8a9e\u306e\u30ad\u30fc\u3092\u82f1\u8a9e\u306b\u5909\u63db\u3057\u307e\u3059\r\n\r\n\r\n### photo_metadata.Metadata\r\n\r\n- `__init__(self, file_path: str | Path)`: \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n\r\n\r\n- `display_japanese(self, return_type: Literal[\"str\", \"print\", \"dict\"] = \"print\") -> str`: \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u65e5\u672c\u8a9e\u306e\u30ad\u30fc\u3067\u8868\u793a\u3067\u304d\u307e\u3059\r\n- `write_metadata_to_file(self, file_path: str = None) -> None`: \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\r\n- `get_metadata_dict(self) -> dict`: \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u8f9e\u66f8\u3092\u53d6\u5f97\u3057\u307e\u3059\r\n- `export_metadata(self, output_path: str = None, format: Literal[\"json\", \"csv\"] = 'json', lang_ja_metadata: bool = False) -> None`: \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\r\n- `keys(self) -> list[str]`: \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u30ad\u30fc\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\r\n- `values(self) -> list[Any]`: \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u5024\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\r\n- `items(self) -> list[tuple[str, Any]]`: \u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\r\n- `get_gps_coordinates(self) -> str`: GPS\u5ea7\u6a19\u3092\u53d6\u5f97\r\n- `export_gps_to_google_maps(self) -> str`: GPS\u60c5\u5831\u3092Google\u30de\u30c3\u30d7\u306eURL\u306b\u5909\u63db\r\n- `get_date(self, format: str = '%Y:%m:%d %H:%M:%S', default_time_zone: str = '+09:00') -> str`: \u64ae\u5f71\u65e5\u6642\u3092\u53d6\u5f97 (\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059)\r\n- `get_image_dimensions(self) -> str`: \u753b\u50cf\u306e\u5bf8\u6cd5\u3092\u53d6\u5f97\r\n- `get_file_size(self) -> tuple[str, int]`: \u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\r\n- `get_model_name(self) -> str`: \u30ab\u30e1\u30e9\u306e\u6a5f\u7a2e\u540d\u3092\u53d6\u5f97\r\n- `get_lens_name(self) -> str`: \u30ec\u30f3\u30ba\u540d\u3092\u53d6\u5f97\r\n- `get_focal_length(self) -> dict`: \u7126\u70b9\u8ddd\u96e2\u3092\u53d6\u5f97\r\n- `show(self) -> None`: \u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\r\n- `get_main_metadata(self) -> dict`: \u4e3b\u8981\u306a\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\r\n- `contains_key(self, key, exact_match: bool = True)`: \u30ad\u30fc\u304c\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\r\n- `contains_value(self, value, exact_match: bool = True)`: \u5024\u304c\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\r\n- `copy(self) -> \"Metadata\"`: Metadata\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\r\n- `@classmethod def load_all_metadata(cls, file_path_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40) -> dict[str, \"Metadata\"]`: \u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4e26\u5217\u51e6\u7406\u3067\u9ad8\u901f\u306b\u53d6\u5f97\u3057\u307e\u3059\u3002\r\n\r\n\r\n### photo_metadata.MetadataBatchProcess\r\n\r\n- `__init__(self, file_list: list[str], progress_func: Callable[[int], None] | None = None, max_workers: int = 40)`: \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n- `filter_by_custom_condition(self, condition_func: Callable[[Metadata], bool]) -> None`: \u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4efb\u610f\u306e\u95a2\u6570 (\u6761\u4ef6) \u3067\u30d5\u30a3\u30eb\u30bf\u30fc\u3057\u307e\u3059\r\n- `filter_by_metadata(self, keyword_list: list[str], exact_match: bool, all_keys_match: bool, search_by: Literal[\"either\", \"value\", \"key\"]) -> None`: \u30e1\u30bf\u30c7\u30fc\u30bf\u306b\u7279\u5b9a\u306e\u5024\u307e\u305f\u306f\u30ad\u30fc\u307e\u305f\u306f\u30ad\u30fc\u3068\u5024\u3069\u3061\u3089\u304b\u306b\u5b58\u5728\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3064\u3051\u308b\r\n- `prepare_rename(self, format_func: Callable[[Metadata], str]) -> None`: \u30ea\u30cd\u30fc\u30e0\u306e\u6e96\u5099\u3092\u3057\u307e\u3059\r\n- `rename_files(self) -> str`: \u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3057\u307e\u3059\r\n- `copy(self) -> \"MetadataBatchProcess\"`: MetadataBatchProcess\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\r\n\r\n\r\n---\r\n\r\n### \u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6c17\u306b\u5165\u3063\u305f\u3089\u3001\u305c\u3072GitHub\u3067\u2b50\u3092\u304a\u9858\u3044\u3057\u307e\u3059\uff01\r\n\r\n---\r\n\r\n\r\n\r\n\r\n## URL\r\n\r\n### pypi\r\n`https://pypi.org/project/photo-metadata/`\r\n\r\n### github\r\n`https://github.com/kingyo1205/photo-metadata`\r\n\r\n## \u6ce8\u610f\u70b9\r\n\r\nexiftool\u304c\u5fc5\u305a\u5fc5\u8981\u3067\u3059\u3002\r\n\r\n\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3001\u753b\u50cf\u3084\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u306b[ExifTool](https://exiftool.org/)\u3092\u5916\u90e8\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\r\n\r\n## \u5fc5\u8981\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\r\n\r\n\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001ExifTool\u304c\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002ExifTool\u306f[\u516c\u5f0f\u30b5\u30a4\u30c8](https://exiftool.org/)\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n## \u30e9\u30a4\u30bb\u30f3\u30b9\r\n\r\n\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306fMIT\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4e0b\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001ExifTool\u81ea\u4f53\u306f[Artistic License 2.0](https://dev.perl.org/licenses/artistic.html)\u306e\u4e0b\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002ExifTool\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u6761\u4ef6\u3092\u9075\u5b88\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n---\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python library to extract, read, modify, and write photo and video metadata (EXIF, IPTC, XMP) using ExifTool. Supports JPEG, RAW, and video files.",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://github.com/kingyo1205/photo-metadata#readme",
        "Homepage": "https://github.com/kingyo1205/photo-metadata",
        "Source": "https://github.com/kingyo1205/photo-metadata",
        "Tracker": "https://github.com/kingyo1205/photo-metadata/issues"
    },
    "split_keywords": [
        "photo",
        " image",
        " metadata",
        " exif",
        " exiftool",
        " iptc",
        " xmp",
        " video",
        " camera",
        " photography",
        " raw",
        " jpeg",
        " picture",
        " python",
        " library",
        " read",
        " write",
        " edit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "38c5d518485c5196ce8932a36773c0f61a24665f57f038e3df09fbbb16f649ff",
                "md5": "f042aa045d7a1bf7419c7516aa979ddf",
                "sha256": "6a704dcfbcad84f2942778044e1bc91d05cfd76659e33c868a86df181f7c412a"
            },
            "downloads": -1,
            "filename": "photo_metadata-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f042aa045d7a1bf7419c7516aa979ddf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 22549,
            "upload_time": "2025-09-07T07:19:47",
            "upload_time_iso_8601": "2025-09-07T07:19:47.866261Z",
            "url": "https://files.pythonhosted.org/packages/38/c5/d518485c5196ce8932a36773c0f61a24665f57f038e3df09fbbb16f649ff/photo_metadata-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "03c63800d0be699b5524473320c11debd3ff146db5b4c980ff3614f460f6a6f2",
                "md5": "f59707587a4677950e112d809bcc4ee2",
                "sha256": "bd0c854a96b13b9d9e7b7386be7608b5e316a9de49091f145342e5f306a6bdfe"
            },
            "downloads": -1,
            "filename": "photo_metadata-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f59707587a4677950e112d809bcc4ee2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 28284,
            "upload_time": "2025-09-07T07:19:49",
            "upload_time_iso_8601": "2025-09-07T07:19:49.049038Z",
            "url": "https://files.pythonhosted.org/packages/03/c6/3800d0be699b5524473320c11debd3ff146db5b4c980ff3614f460f6a6f2/photo_metadata-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-07 07:19:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kingyo1205",
    "github_project": "photo-metadata",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "photo-metadata"
}
        
Elapsed time: 0.67879s