documentation

This commit is contained in:
2025-12-16 19:04:22 -08:00
parent 09ccdb8c8d
commit 45228dcdf4

View File

@@ -1,11 +1,10 @@
import pycmx
.. pycmx documentation master file, created by .. pycmx documentation master file, created by
sphinx-quickstart on Wed Dec 26 21: 51: 43 2018. sphinx-quickstart on Wed Dec 26 21:51:43 2018.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
pycmx - A CMX EDL Parser in Python pycmx - A CMX EDL Parser in Python
== == == == == == == == == == == == == == == == == == ====================================
Features Features
--------- ---------
@@ -13,56 +12,57 @@ Features
The `pycmx` package parses a CMX 3600 EDL and its most most common variations. The `pycmx` package parses a CMX 3600 EDL and its most most common variations.
* The major variations of the CMX 3600: the standard, "File32", "File128" and * The major variations of the CMX 3600: the standard, "File32", "File128" and
long Adobe Premiere event numbers are automatically detected and properly long Adobe Premiere event numbers are automatically detected and properly
read. Event number field and source name field sizes are determined read. Event number field and source name field sizes are determined
dynamically for each statement for a high level of compliance at the expense dynamically for each statement for a high level of compliance at the expense
of strictness. of strictness.
* Preserves relationship between events and individual edits/clips. * Preserves relationship between events and individual edits/clips.
* Remark or comment fields with common recognized forms are read and * Remark or comment fields with common recognized forms are read and
available to the client, including clip name and source file data. available to the client, including clip name and source file data.
* `ASC CDL`_ and FRMC statements are parsed and decoded. * `ASC CDL`_ and FRMC statements are parsed and decoded.
* Symbolically decodes transitions and audio channels. * Symbolically decodes transitions and audio channels.
* Does not parse or validate timecodes, does not enforce framerates, does not * Does not parse or validate timecodes, does not enforce framerates, does not
parameterize timecode or framerates in any way. This makes the parser more parameterize timecode or framerates in any way. This makes the parser more
tolerant of EDLs with mixed rates. tolerant of EDLs with mixed rates.
* Unrecognized lines are accessible on the `EditList` and `Event` classes * Unrecognized lines are accessible on the `EditList` and `Event` classes
along with the line numbers, to help the client diagnose problems with a along with the line numbers, to help the client diagnose problems with a
list and give the client the ability to extend the package with their own list and give the client the ability to extend the package with their own
parsing code. parsing code.
.. _ASC CDL: https: // en.wikipedia.org/wiki/ASC_CDL .. _ASC CDL: https://en.wikipedia.org/wiki/ASC_CDL
Getting Started Getting Started
---------------- ----------------
Install `pycmx` with pip, or add it with `uv` or your favorite tool. Install `pycmx` with pip, or add it with `uv` or your favorite tool.
.. code-block: : sh .. code-block:: sh
pip install pycmx pip install pycmx
`pycmx` parses an EDL with the: func: `~pycmx.parse_cmx_events.parse_cmx3600` `pycmx` parses an EDL with the :func:`~pycmx.parse_cmx_events.parse_cmx3600`
function: function:
.. code-block: : python .. code-block:: python
import pycmx
with open("tests/edls/TEST.edl") as f:
with open("tests/edls/TEST.edl") as f:
edl = pycmx.parse_cmx3600(f) edl = pycmx.parse_cmx3600(f)
This returns a generator that will yield each: class: `~pycmx.event.Event`. This returns a generator that will yield each :class:`~pycmx.event.Event`.
Events can have multiple edits, if they are a part of a cross-dissolve or a Events can have multiple edits, if they are a part of a cross-dissolve or a
key. key.
.. toctree: : .. toctree::
: maxdepth: 5 :maxdepth: 5
: caption: API Reference :caption: API Reference
function function
classes classes
Indices and tables Indices and tables
== == == == == == == == == ==================
*: ref: `genindex` * :ref:`genindex`
*: ref: `search` * :ref:`search`