# Python を使用して POT ファイルのメタデータを表示または編集する

> Python ソース コードで、POT 形式のメタデータを編集または表示できます。

Source: https://products.aspose.com/slides/ja/python-net/metadata/pot/
Updated: 2023-04-25



## Python 経由で POT プロパティを変更します

Aspose.Slides for Python via .NET を使用すると、開発者は組み込みプロパティとカスタム プロパティの値にアクセスして変更できます。開発者は、プレゼンテーション オブジェクトによって公開される [DocumentProperties](https://reference.aspose.com/slides/python-net/aspose.slides/documentproperties/) プロパティを使用して、プレゼンテーション ファイルのドキュメント プロパティにアクセスできます。

### POT 組み込みプロパティの変更 - Python

```py

import aspose.slides as slides

# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.pot") as presentation:
    # Create a reference to object associated with Presentation
    documentProperties = presentation.document_properties

    # Set the builtin properties
    documentProperties.author = "Aspose.Slides for Python"
    documentProperties.title = "Modifying Presentation Properties"
    documentProperties.subject = "Aspose Subject"
    documentProperties.comments = "Aspose Description"
    documentProperties.manager = "Aspose Manager"

    # save your presentation to a file
    presentation.save("DocumentProperties_out.pot", slides.export.SaveFormat.POT)
```

### カスタム プロパティを POT - Python に追加

```py

import aspose.slides as slides

# Instantiate the Presentation class
with slides.Presentation() as presentation:
    # Getting Document Properties
    documentProperties = presentation.document_properties

    # Adding Custom properties
    documentProperties.set_custom_property_value("New Custom", 12)
    documentProperties.set_custom_property_value("My Nam", "Aspose Metadata Editor")
    documentProperties.set_custom_property_value("Custom", 124)

    # Getting property name at particular index
    getPropertyName = documentProperties.get_custom_property_name(2)

    # Removing selected property
    documentProperties.remove_custom_property(getPropertyName)

    # Saving presentation
    presentation.save("CustomDocumentProperties_out.pot", slides.export.SaveFormat.POT)
```

## Python 経由で POT のメタデータを抽出する方法

これらは、POT ファイルからメタデータを抽出する手順です。

POT ファイルへのパスを使用してプレゼンテーション クラスをインスタンス化する

プレゼンテーションに関連付けられた DocumentProperties オブジェクトを取得する

DocumentProperties オブジェクト内のアイテムをループする

カスタム プロパティへのアクセスと変更

## サポートされているその他のメタデータ形式
