Skip to main content

A simple module to extract files from the COH piggs file format

Project description

coh-piggs-extrator

A module that allows the extracting of files from a City Of Heroes. The pigg file is used to create "virtual drives" to load data from during the running of the game.

Basically it is similar to a zip file and therefore can be processed by parsing the files and extracting the information

Usage

The design of this library is simple in use. The library makes use of a simple implementation of the strategy pattern to process each of the entries of the pigg file.

With this in mind there are two objects of interest:

    coh_piggs_extractor.coh_piggs_extractor.PiggFile(pigg_file_path, strategy)

This is used to load the pigg file and process the contents to get the metadata and data for each of the contained files. The constructor takes two parameters (as shown above):

  • pigg_file_path: The path to the pigg file
  • The strategy implementation used to process each of the file
    coh_piggs_extractor.coh_piggs_extractor.PiggFileEntryProcessingStrategy

This is a simple no op class that implements the expected strategy interface. It has one function process_pigg_file_entry that is called for each of the files in the pigg file. The function takes two parameters as follows:

  • meta: This is the metadata of the file and is a simple value object DirEntry (defined in coh_piggs_extractor). The main entry of use is the name field.
  • data: This is the binary data that has been extracted for the file.

A simple file extracting strategy has been provided as well

    coh_piggs_extractor.coh_piggs_extractor.SimpleFileOutputEntryProcessingStrategy(out_dir)

This will output each of the contained files into the specified out_dir provided during construction.

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

coh_piggs_extractor-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

coh_piggs_extractor-1.0.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coh_piggs_extractor-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for coh_piggs_extractor-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4ed29710376b45783eec8a6271fa836f63d00f71b6021597d315fdf596bd4608
MD5 b3e6ba7c314f10195b7ad17f241e6510
BLAKE2b-256 d7a7433b0c07e3f4a764ba10b855b43e4b7e718aff60d27fabba9baefc29faeb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: coh_piggs_extractor-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for coh_piggs_extractor-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d97d04af128bcb13375d5ad78145fe1b900c64f095ac2499ae061df8b22c8278
MD5 b022e0481ecf8b3562d0abbd1e67355c
BLAKE2b-256 8899141c2fe793debd5579184151b21e8f15ee33615d1b427e8d542166d4e9ef

See more details on using hashes here.

Provenance

Supported by

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