Skip to main content

Parser for Ultrastar text files.

Project description

UltrastarParser

Contains methods to read or edit ultrastar files or directories.

Installation

Use the package manager of your choice: pypi.

Usage tips

  • Make a backup of the text files. The library currently does not touch any other files. Though I try very hard to fix bugs and use the library myself, I cannot guarantee your files won't go up in flames, particularly if you are using a non-standard file structure or encoding. If something does go wrong, please file an issue.
  • Certain formattings will be lost. For example, attributes (like #ARTIST) will always be converted to uppercase. Same goes for empty lines in the attributes section. The current goal is to be able to parse files that adhere to the Official Ultrastar Format Specification. For everything else, a best effort is made.

Features

  • get and set attributes using UltrastarFile::get_attribute and UltrastarFile::set_attribute. Also UltrastarFile::attribute_exists
  • check/validate a file for completeness, existing and correct attributes, duet parameters and karaoke possibility
usf = UltrastarFile('path_to_txt_file')
check = usf.check()
faulty_attributes = usf.validate_attributes()
faulty_duet = usf.validate_duet()
faulty_urls = usf.validate_urls()
karaoke = usf.validate_karaoke()
  • automatically reorder attributes in a file with UltrastarFile::reorder_auto
  • add, remove and search songs in a folder
lib = Library('path_to_library')
lib.add(UltrastarFile('path_to_new_file'))
lib.remove(lib[10])
results = lib.search('#ARTIST', 'Bon Jovi')
  • export a song list from a library in csv or json format with Library::export

Planned features

  • Ability to backup files, for example before overwriting
  • Logging
  • Better error handling (and documentation of error handling)
  • Metadata extraction not from txt file (e.g. song duration from audio file or video resolution from video file)

Unplanned features

  • Editing the songtext and notes

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

ultrastarparser-0.5.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

ultrastarparser-0.5.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ultrastarparser-0.5.0.tar.gz.

File metadata

  • Download URL: ultrastarparser-0.5.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for ultrastarparser-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3afc9f37c45f732b34459dcb326527ac265b32467cdf45823f33aa28991dbd2c
MD5 e4b05041d981d0d6cc9ef13ddfdd4621
BLAKE2b-256 970df6ad6f03efeca4b808f39b1713b2d0a18d21f78ce819856418a5fb2afaa4

See more details on using hashes here.

File details

Details for the file ultrastarparser-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ultrastarparser-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71ee33932172ae6ea54e16533be29b03e192fee616634ccb0e817f7cd3a701ab
MD5 6d37525a2b37202102293954a85dc416
BLAKE2b-256 8d567ea6a4fc1455171c0bd0be27c6b30df765f729a68937f4f215bc92d86d51

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