Skip to content

Note

このドキュメントは2026-02-27 02:40PLaMo Translation Modelを使用して自動翻訳されました。

FEP-6fcd: アカウントエクスポートコンテナ形式仕様

概要

本FEPでは、以下の特性を備えた軽量な汎用アカウントエクスポートコンテナ形式を規定します:

対象外とする事項:

  • 暗号化処理 - 別レイヤーで対応するものとする
  • 圧縮処理 - これも別レイヤーで対応する(.tarファイルを.tar.gzに変換する方法は確立済み)

着想源および先行技術

  • (未文書化) Mastodonアカウントエクスポート機能の仕様
  • IndieWebブログアーカイブフォーマット
  • WordPressエクスポートフォーマット
  • DIFユニバーサルウォレットバックアップコンテナ規格(策定中)

基本概念

  1. エクスポートデータをファイルおよびディレクトリ構造としてシリアライズする
  2. ファイルとディレクトリの内容を記述した軽量なmanifest.ymlファイルを追加
  3. 全体を.tarアーカイブ形式でパッケージ化する

manifest.ymlファイル仕様

予約プロパティ

  • (必須) ubc-version: Account Export Container Format規格のバージョン番号
  • (必須) contents: 当該.tarファイルに含まれる全てのファイルとディレクトリの一覧
  • (オプション) meta: エクスポート対象アカウントの所有者情報、作成アプリケーション/サービス名などを記述するメタデータセクション

ActivityPubエクスポート形式の具体例

ActivityPubアカウントをエクスポートした場合の出力例:

$ tar -vtf ap-account-export-2024-06-11.tar

-rw-rw-r-- 0 0   1K Jun 11 15:38 manifest.yml
drwxrwxr-x 0 0 4.0K Jun 11 15:38 activitypub/
drwxrwxr-x 0 0 4.0K Jun 11 15:38 key/

対応するmanifest.ymlファイルの例:

# (必須) Universal Backup Container規格バージョン番号
ubc-version: 0.1

# (オプション) メタデータセクション
meta:
  created: 2024-01-01
  createdBy:
    # (オプション) Controller文書(ActivityPubプロファイルなど)のURL。FEP-521aに準拠した形式
    # @see https://codeberg.org/fediverse/fep/src/branch/main/fep/521a/fep-521a.mdを参照
    controller: https://alice-personal-site.example/actor
    # (オプション) このエクスポートを生成したアプリケーションまたはサービス名
    client:
      name: "Example Exporter App"
      url: https://codeberg.example.com/example-export-app

# (必須だが空欄可) contentsセクション。その他のファイルとディレクトリを列挙
contents:
  # 本ファイル自体
  manifest.yml:
    url: https://codeberg.org/fediverse/fep/src/branch/main/fep/6fcd/fep-6fcd.md#manifest-file
  # ActivityPub関連エクスポートを含むディレクトリ
  activitypub:
    contents:
      # シリアライズされたActivityPub Actorプロファイル
      actor.json:
        url: https://www.w3.org/TR/activitypub/#actor-objects
      # ActorのOutbox内容を表現するためのActivityStreams OrderedCollection
      outbox.json:
        url: https://www.w3.org/TR/activitystreams-core/#collections
      following_accounts.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      followers.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      lists.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      bookmarks.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      blocks.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      mutes.csv:
        url: https://docs.joinmastodon.org/user/moving/#export
      # オブジェクト添付ファイル(投稿画像など)のディレクトリ
      attachments:
        url: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment
        contents:
          # Actorプロファイル用アバター画像
          avatar.jpg:
            url: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon
  # 'key'ディレクトリ。FEP-521a Actorプロファイルで宣言されるような秘密鍵/公開鍵ペアをシリアライズしたもの
  key:
    url: https://codeberg.org/fediverse/fep/src/branch/main/fep/521a/fep-521a.md
    contents:
      key-1234.json:
        url: https://www.w3.org/TR/vc-di-eddsa/#representation-eddsa-rdfc-2022

エクスポートされた鍵ファイルの具体例:

$ cat key/key-1234.json
{
  "@context": ["https://w3id.org/security/multikey/v1"],
  "type": "Multikey",
  "id": "https://alice-personal-site.example/actor#key1234",
  "controller": "https://alice-personal-site.example/actor",
  "publicKeyMultibase": "z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
  "privateKeyMultibase": "z3u2en7t5LR2WtQH5PfFqMqwVHBeXouLzo6haApm8XHqvjxq"
}

ブログアーカイブフォーマット形式のエクスポート例

$ tar -vtf bar-account-export-2024-06-11.tar

-rw-rw-r-- 0 0   1K Jun 11 15:38 manifest.yml
-rw-rw-r-- 0 0 100K Jun 11 15:38 index.html
-rw-rw-r-- 0 0  50K Jun 11 15:38 feed.json
drwxrwxr-x 0 0 4.0K Jun 11 15:38 uploads/

対応するmanifest.ymlファイルの例:

ubc-version: 0.1

meta:
  created: 2024-01-01

contents:
  # 本ファイル自体
  manifest.yml:
    url: https://codeberg.org/fediverse/fep/src/branch/main/fep/6fcd/fep-6fcd.md#manifest-file
  index.html:
    url: https://indieweb.org/blog_archive_format
  feed.json:
    url: https://indieweb.org/blog_archive_format
  uploads:
    url: https://indieweb.org/blog_archive_format

参考文献

著作権

CC0 1.0 Universal(パブリックドメイン献呈)

本Fediverse Enhancement Proposalの著者らは、法律で認められる範囲内において、 当該著作物に関するすべての著作権および関連権利を放棄しています。