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.9.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: kbputils-0.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 fb1aa184b48309490448b2680e55d3aba4198091c22f46f03fd0dc1e9c0c3a36
MD5 6e9a26eb0aef119b297b04c430aa1d61
BLAKE2b-256 ec1f3ea15d1732a6a848c9d41917d124b3322fd7d5e69e31d8ba3aa265eaca48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kbputils-0.0.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 860721c8fca41c1cc4dd25fa2cccd67549f6cb3f9a1e7a98dcc02cb2b9c43165
MD5 f3157bcfc4f94ccdbb43010ca7d6c19b
BLAKE2b-256 6eac2f77f1bd3f3d24835f6eac845a72d0aa0d95928323bc296aaaadc737af7f

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