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

Uploaded Source

Built Distribution

kbputils-0.0.7-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kbputils-0.0.7.tar.gz
  • Upload date:
  • Size: 17.2 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.7.tar.gz
Algorithm Hash digest
SHA256 23753c83f5071fb58a84e79226383460afeabb88227fa930d169abdeb9f7d806
MD5 46a27c6c476f666f7ac1df4f6d7e586c
BLAKE2b-256 378dce43c1843f1f2be552c9b31913166b0edae5e1c831f400e7fdcd6b7a9f34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kbputils-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5168c8a0a4149b0e9ed2f7e72267b67a94fd6d61f73136e1597d8f4c47be52a8
MD5 1cba07e740484c4c9e0e564491611dd2
BLAKE2b-256 c896a67f50b7e41bec1cc65ff0067e74cf576017f5159de373479b1f37ef6bf7

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