Skip to main content

A parser for Lightshark show files (.lshw)

Project description

lightshark-parser

lightshark-parser is a Python library for parsing show files used in the Lightshark software (.lshw).

Features

Parsing .lshw files

Extracts details from .lshw files into a Lightshow object. Also supports :

  • Serialising the Lightshow object into a .json file
  • Summarising important show details into a .txt file

Currently, the following details are extracted:

  • Fixture models
  • Patched fixtures
  • Groups
  • Palettes
  • Cues
  • Cuelists
  • Playbacks
  • FXs
  • Some settings

Edit without a Lightboard!

Lightshark Parser comes with a set of functions that allow you to edit the show's attributes through code without needing to use the lightboard directly, serving as a sort of offline editor.

Can also be used to create your own custom "macros".

After editing, you can use the to_bytes() method to write it back into a .lshw file, following a similar format to the one used by Lightshark.

Disclaimers:

  • This is not official in any capacity. I reverse-engineered this based off a bunch of files I had, so it is nowhere near 100% accurate to how Lightshark formats their files.
  • Some details of the show are currently not supported. The current ones implemented are the most commonly used, so it should work for most purposes.

Installation

You can install lightshark-parser using pip:

pip install lightshark-parser

Usage

Lightshark Parser can be used both from the command line and using Python code.

Command line

lightshark-parser -p/s <input_file> -o <output_file>
  • -p : Parse file
  • -s : Summarise file

If no output file is provided, output_file will default to <input_path>.json or <input_path>_summarised.txt depending on the operation selected.

Code

from lightshark_parser import Lightshow, parse_file_bytes

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

lightshark_parser-1.0.0.tar.gz (66.4 kB view details)

Uploaded Source

Built Distribution

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

lightshark_parser-1.0.0-py3-none-any.whl (83.8 kB view details)

Uploaded Python 3

File details

Details for the file lightshark_parser-1.0.0.tar.gz.

File metadata

  • Download URL: lightshark_parser-1.0.0.tar.gz
  • Upload date:
  • Size: 66.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lightshark_parser-1.0.0.tar.gz
Algorithm Hash digest
SHA256 795a3a8007fe8f9a916f2d59aa5e12cd8b9aad50f8d94ebc9e85bee732dfa4df
MD5 e17651e6034687b3a86ebfb85e1d70bb
BLAKE2b-256 677e828d68822bf77519d16e6e7009accd9a337accb0a3b83e26b7f9d79b4e33

See more details on using hashes here.

File details

Details for the file lightshark_parser-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lightshark_parser-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ad2f0579ecae744435f0ee87685e69e2a3b703ad14f7ecacc1bf5c27d6f1730
MD5 a71dc474884f64b826e8eb711bd41d10
BLAKE2b-256 97b488c4e5077c3ebecb817e99c61b992257a8de3b00113df29d063a10f21352

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