Skip to main content

Utilities to handle .kbp files created with Karaoke Builder Studio.

Project description

kbputils

This is a module containing utilities to handle .kbp files created with Karaoke Builder Studio. It's still very early development, but if you want to try it out, see some notes below.

Current contents are:

kbputils module to parse a file into a data structure:

k = kbputils.KBPFile(filename)

converters module which currently contains a converter to the .ass format:

converter = kbputils.converters.AssConverter(k) # Several options are available to tweak processing
doc = converter.ass_document()  # generate an ass.Document from the ass module
with open("outputfile.ass", "w", encoding='utf_8_sig') as f:
    doc.dump_file(f)

There's also a CLI for it (command and syntax subject to change):

$ KBPUtils --help
usage: KBPUtils [-h] [--version] [--border | --no-border | -b] [--float-font | --no-float-font | -f] [--float-pos | --no-float-pos | -p]
            [--target-x TARGET_X] [--target-y TARGET_Y] [--fade-in FADE_IN] [--fade-out FADE_OUT] [--transparency | --no-transparency | -t]
            [--offset OFFSET] [--overflow {NO_WRAP,EVEN_SPLIT,TOP_SPLIT,BOTTOM_SPLIT}]
            source_file [dest_file]

Convert .kbp to .ass file

positional arguments:
  source_file
  dest_file

options:
  -h, --help            show this help message and exit
  --version, -V         show program's version number and exit
  --border, --no-border, -b
                        bool (default: True)
  --float-font, --no-float-font, -f
                        bool (default: True)
  --float-pos, --no-float-pos, -p
                        bool (default: False)
  --target-x TARGET_X, -x TARGET_X
                        int (default: 300)
  --target-y TARGET_Y, -y TARGET_Y
                        int (default: 216)
  --fade-in FADE_IN, -i FADE_IN
                        int (default: 300)
  --fade-out FADE_OUT, -o FADE_OUT
                        int (default: 200)
  --transparency, --no-transparency, -t
                        bool (default: True)
  --offset OFFSET, -s OFFSET
                        int | bool (default: True)
  --overflow {NO_WRAP,EVEN_SPLIT,TOP_SPLIT,BOTTOM_SPLIT}, -v {NO_WRAP,EVEN_SPLIT,TOP_SPLIT,BOTTOM_SPLIT}
                        AssOverflow (default: EVEN_SPLIT)

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

kbputils-0.0.8.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

kbputils-0.0.8-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file kbputils-0.0.8.tar.gz.

File metadata

  • Download URL: kbputils-0.0.8.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for kbputils-0.0.8.tar.gz
Algorithm Hash digest
SHA256 8fca44aa482b9a5ce1919d8efbf2d7af0b6d9a52b09ec19a860eaf55bdbbeb85
MD5 8bb320a0359fa6a1f29e5d6a225f6be5
BLAKE2b-256 5ac37a8cc27ac34e739cc777c2cc2a13e21daa22a39ef4ba2b29ca208faf2862

See more details on using hashes here.

File details

Details for the file kbputils-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: kbputils-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for kbputils-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5d655a8a331b94fc1dcd3a53d0c642df11d39dc0a0b3156a13d9d744fc0fed49
MD5 92188d23601850773002fd9f57b51645
BLAKE2b-256 a02ca588a38f78b8b3a87a9cb527ada8838b43727de6aa0d015bdf8014d54931

See more details on using hashes here.

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