Skip to main content

Cici: The Microsoft Comic Chat Toolkit

Project description

Haiii!! cici is a Microsoft Comic Chat file format library and toolkit.

This toolkit can be used to extract images from .AVB and .BGB files, and in some cases, repair corrupted avatars!

Right now, cici is still in an early alpha form, and only the “info” subcommand is available, with “extract”, “repair” and “scan” to come later. The library itself is still useful for extracting images, but write/repair support is temporarily unavailable.

Soon!

Installing

On Linux/Mac, if you already have Python, this package can be installed from PyPI with pip:

> pip install cici-toolkit

On Windows, you’ll need to install Python first. Go get Python3.11 from the Microsoft Store and install it: https://www.microsoft.com/store/productId/9NRWMJP3717K

Once installed, open up a command prompt and confirm Python and the Python package installer have been installed by typing “pip –version”. If that works, then you should be good to type:

> pip install cici-toolkit

Usage

More in-depth docs coming soon, sorry!

For now, you can use cici info <filename> to see information about any .AVB/.BGB file, and cici info -v <filename> to see in-depth information about a file.

See cici info --help for more details:

usage: cici info [-h] [-e] [-i] [-v] [-s] [--hide-warnings] [-d] filename

positional arguments:
  filename

options:
  -h, --help       show this help message and exit
  -e, --emotions   Show pose/emotion/gesture information
  -i, --images     Show image table information
  -v, --verbose    Verbose output: show emotion and image tables (implies -e, -i)
  -s, --strict     Show pedantic warnings.
  --hide-warnings  Don't show warnings for non-fatal problems with the file.
  -d, --debug      Show full debugging information and stack traces.

To use this as a library, try starting here for now:

>>> import cici

>>> with open("xeno.avb", "rb") as infile:
>>>     avb = cici.Binary(infile)

>>> avb.name
'Xeno'
>>> avb.ftype
<FileType.AVATAR_DYNAMIC: 2>
>>> avb.fvers
<FileVersion.CCHAT_25: 2>

>>> avb.icon
<PIL.BmpImagePlugin.BmpImageFile image mode=P size=40x40 at 0x7F950AC81D60>

>>> img = avb.emotions[0].render()
>>> img
<PIL.Image.Image image mode=RGBA size=120x156 at 0x7F950AC43980>
>>> img.show()
Output from img.show() above

This library uses Pillow to store images in-memory; some familiarity with that API will be helpful for retrieving, converting, and saving images.

Note: Although this library supports dynamic poses (heads and torsos stored separately, like xeno up above), the functionality to composite them is not present in v0.1.0. It’s coming, but needs some cleanup before I publish it; it’s not ready for primetime yet.

Contributing

Patches welcome! Please just send a Merge Request with a pretty good cover letter / commit message. This is still an early version and it is still in heavy development. Just check in with me first before you write a ton of stuff to make sure we aren’t stepping over each other’s toes, ‘kay?

Using the issue tracker would be a great way to coordinate efforts ^_^

Near-future versions will add “repair”, “extract” and “scan” subcommands which will be useful for repairing damage to certain files, extracting all poses/images from files, and scanning a collection of files for duplicates, identifying damaged files, etc.

Changelog

0.1.4 (2024-09-27)

  • OK, this is embarrassing. Fixed packaging for commands subpackage …

0.1.3 (2024-09-27)

  • Missed another spot in packaging ;_; this time for real …

0.1.2 (2024-09-27)

  • Missed a spot in packaging O:-)

0.1.1 (2024-09-27)

  • Change package name from “cici” to “cici-toolkit” for PyPI

  • Tiny packaging and linting fixes

  • Add Binary.write() function back :)

0.1.0 (2024-07-10)

  • First release of library and “cici info” command line utility O:-)

    This library may change before v1.0 release and should be considered unstable. I wouldn’t write too much code that relies on this library just yet without coordinating with me a lil’ bit. Each new minor version under major version 0 may break API; I promise no breakages only for micro releases.

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

cici_toolkit-0.1.4.tar.gz (59.8 kB view details)

Uploaded Source

Built Distribution

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

cici_toolkit-0.1.4-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file cici_toolkit-0.1.4.tar.gz.

File metadata

  • Download URL: cici_toolkit-0.1.4.tar.gz
  • Upload date:
  • Size: 59.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for cici_toolkit-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a5e77fb89a121f4058c526491fe5f86347ce3d00c078e7cfea16283fec7a96e6
MD5 025e2eb397853cdc772e62c57aa4a9dd
BLAKE2b-256 bd49a6c8fe3288afd1fa65b5ccdae1f9fe9610839113d930b090321951022138

See more details on using hashes here.

File details

Details for the file cici_toolkit-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: cici_toolkit-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 55.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for cici_toolkit-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f54e918afd27d19ad6df2ade50ff0c2add37e2b6b43d09a1a006efd9fcacd88
MD5 88a970e62ba6ffe01e6dd9aefdbd1341
BLAKE2b-256 09391a6025c75263ded0c5482bed58d24ca1125ecc063b82032443642351e489

See more details on using hashes here.

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