Skip to main content

Multi-format game archive tool

Project description

tamago

Multi-format game archive toolkit.

Requires Python 3.10 or later.

Supported formats

Format Engine Extract Create
XP3 KiriKiri yes yes
DET μ-GameOperationSystem yes yes
GSP AGSD yes yes
ARC AdvHD (WillPlus V2) yes yes

Installation

pip install tamagoarc

To enable TLG image conversion, install with the images extra:

pip install tamagoarc[images]

Usage

tamago CLI

tamago auto-detects archive formats by magic bytes and, for XP3 archives, automatically identifies the correct encryption scheme.

# Identify an archive's format
tamago identify data.xp3

# Extract an archive (auto-detects format and encryption)
tamago extract data.xp3 output_dir

# Use format subcommands for format-specific options
tamago xp3 extract data.xp3 output_dir --encryption hash-xor --key 3
tamago det create source_dir output.det --index-format atm

# Create an archive (format must be specified)
tamago create --format xp3 source_dir output.xp3

Python API

from tamago.formats.xp3 import XP3File

# Extract an archive
with XP3File("data.xp3") as xp3:
    xp3.extract_all("output_dir")

# Extract with explicit encryption
from tamago.formats.xp3.encryption import HashXorEncryption

enc = HashXorEncryption(shift=3)
with XP3File("data.xp3", encryption=enc) as xp3:
    xp3.extract_all("output_dir")

# Auto-detect encryption
from tamago.formats.xp3.detect import auto_detect

enc = auto_detect("data.xp3")
with XP3File("data.xp3", encryption=enc) as xp3:
    xp3.extract_all("output_dir")

# Create an archive
from pathlib import Path

with XP3File("output.xp3", "x") as xp3:
    xp3.write_all(Path("source_dir"))

XP3 Encryption

XP3 archives used by KiriKiri games are often encrypted with a game-specific scheme implemented in a .tpm plugin. tamago supports the encryption used by several games (including automatic detection of the encryption).

If the game you are interested in is not supported, please raise an issue, including a VNDB link to the game.

Development

This project uses Hatch as the build system.

Setup

pip install hatch

Running tests

hatch run test                    # run all tests
hatch run test -k test_name       # run a single test by name
hatch run cov                     # tests + coverage report

Linting and formatting

hatch run lint:style     # check style (ruff + black)
hatch run lint:typing    # type checking (mypy)
hatch run lint:fmt       # auto-format (black + ruff --fix)
hatch run lint:all       # style + typing

License

tamago is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tamagoarc-1.0.1.tar.gz (199.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tamagoarc-1.0.1-py3-none-any.whl (184.3 kB view details)

Uploaded Python 3

File details

Details for the file tamagoarc-1.0.1.tar.gz.

File metadata

  • Download URL: tamagoarc-1.0.1.tar.gz
  • Upload date:
  • Size: 199.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tamagoarc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5356a9c978c9fb27ef6608b4ff6e6f604f259e08c492308221155f6ae15fc60a
MD5 9e591ac928344568c1d09516ee17833b
BLAKE2b-256 b5b7bae52f8c0fc4ed94b96937c9161ec2a78de51087f15a39968afc83137827

See more details on using hashes here.

Provenance

The following attestation bundles were made for tamagoarc-1.0.1.tar.gz:

Publisher: publish.yml on kenkyuuka/tamago

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tamagoarc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tamagoarc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 184.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tamagoarc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89c349bf29c279d4f74f343c2302e69cd87c4cc83c3e24b60f77720232089768
MD5 c15e4f60d20f366549dc79b380d44edf
BLAKE2b-256 642645395b7ac32e9b8c7ce934d0700ac16eacc681cb00c09cd65cfc656f6d19

See more details on using hashes here.

Provenance

The following attestation bundles were made for tamagoarc-1.0.1-py3-none-any.whl:

Publisher: publish.yml on kenkyuuka/tamago

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page