openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Make output and extraction flags callable from Python API #202

Closed bitsgalore closed 8 months ago

bitsgalore commented 9 months ago

Behavior of boxvalidator.py depends on config.OUTPUT_VERBOSE_FLAG, config.OUTPUT_PACKET_MARKERS_FLAG and config.EXTRACT_NULL_TERMINATED_XML_FLAG. Default values can only be overridden using the command line interface, but there's currently no way to change them through a Python API call!

Solution:

bitsgalore commented 9 months ago

Done (including docs):

https://github.com/openpreserve/jpylyzer/commit/2ff1358e4cac4b4848952bb9a9f7fc34fcefa801

bitsgalore commented 9 months ago

Possible improvement: wrap optional params in BoxValidator class in a dictionary, so they can be set once and then re-used throughout BoxValidator instantiations.

bitsgalore commented 8 months ago

Done:

https://github.com/openpreserve/jpylyzer/commit/203452ffd647077d56d902093bab7dba97443cc3