Package: cdl_convert
Author/Maintainer:Sean WallitschEmail:shidarin@alphamatte.comLicense:MITStatus:DevelopmentDocs:http://cdl-convert.readthedocs.org/GitHub:https://github.com/shidarin/cdl_convertPyPI:https://pypi.python.org/pypi/cdl_convertPython Versions:2.6-3.5, PyPy & PyPy3Introductioncdl_convertconverts between commonASC CDLformats. TheAmerican Society of
CinematographersColor Decision List (ASC CDL, or CDL for short) is a
schema to simplify the process of interchanging color data between
various programs and facilities.The ASC has defined schemas for including the 10 basic numbers in 5
different formats:Avid Log Exchange (ALE)Film Log EDL Exchange (FLEx)CMX EDLXML Color Correction (cc)XML Color Correction Collection (ccc)XML Color Decision List (cdl)Unofficial Formats:OCIOCDLTransform, aFoundry NukenodeSpace separated CDL, a Rhythm & Hues internal cdl formatIt is the purpose ofcdl_convertto convert ASC CDL information between
these basic formats to further facilitate the ease of exchange of color
data within the Film and TV industries.cdl_convertsupports parsing ALE, FLEx, CC, CCC, CDL CMX EDL and RCDL.
We can write out CC, CCC, CDL and RCDL.cdl_convert is not associated with the American Society of
CinematographersUsageMost likely you’ll usecdl_convertas a script, instead of a python package
itself (indeed, even the name is formatted more like a script (with an
underscore) than the more common all lowercase of python modules.For usage as a python module, see the module documentation.Script UsageIf you just want to convert to a.ccXML file, the only required argument
is an input file, like so::$ cdl_convert ./di_v001.flexYou can override the default.ccoutput, or provide multiple outputs with
the-oflag.:$ cdl_convert ./di_v001.flex -o cc,cdlChangelogNew in version 0.9.2:Fixed a bug where ALE’s with blank lines would not convert correctly.Fixed a bug that was preventingcdl_convertfrom being correctly installed in Python 2.6Fixed continuous integration testing.No longer officially supporting Python 3.2, as I’ve had to remove it from our CI builds. It should still work just fine though, but we won’t be running CI against it.New in version 0.9:Added ability to parse CMX EDLsFixed a script bug where a collection format containing color decisions will not have those color decisions exported as individual color corrections.Fixed a bug where we weren’t reading line endings correctly in certain situations.Added a cdl_convert.py stub file to the package root level, which will allow running of the cdl_convert script without installation. Due to relative imports in the python code, it was no longer possible to call cdl_convert/cdl_convert.py directly.The script, when run directly from cdl_convert.py, will now write errors to stderror correctly, and exit with a status of 1.New in version 0.8:Added--singleflag. When provided with an output collection format, each color correction in the input will be exported to it’s own collection.Giving a ColorCorrection a non-duplicate ID now works unless the--haltflag is given. This means that incoming collections that contain duplicate IDs will not fail out.New in version 0.7.1:Fixed bug where ALE’s without ‘Scan Filename’ fields could not parse correctly.New in version 0.7:The biggest change in 0.7 is the addition of collection format support..ccc, Color Correction Collections, can now be parsed and written..cdl,
Color Decision Lists, can now be parsed and written..aleand.flexfiles now return a collection.New script flags:Adds--checkflag to script, which checks all parsedColorCorrectsfor sane values, and prints warnings to shellAdds-d,--destinationflag to the script, which allows user to specify the output directory converted files will be written to.Adds--no-ouputflag to the script, which goes through the entire conversion process but doesn’t actually write anything to disk. Useful for troubleshooting, especially when combined with--checkAdds--haltflag to the script, which halts on errors that can be resolved safely (such as negative slope or power values)RenamesColorCollectionBasetoColorCollection, since it will be used directly by bothcccandcdl.Addsparse_cccwhich returns aColorCollection.Addswrite_cccwhich writes aColorCollectionas acccfile.Addsparse_cdlwhich returns aColorCollection.Addswrite_cdlwhich returns aColorCollectionas acdlfile.ColorCollectionis now a fully functional container class, with many attributes and methods.AddedColorDecision, which stores either aColorCorrectionorColorCorrectionRef, and an optionalMediaRefAddedColorCorrectionRef, which stores a reference to aColorCorrectionAddedparentattribute toColorCorrection.Callingsop_nodeorsat_nodeon aColorCorrectionbefore attempting to set a SOP or Sat power now works.ColorCorrectioncdl_fileinit argument renamed toinput_file, which is now optional and able to be set after init.parse_ccandparse_rnh_cdlnow only yield a singleColorCorrection, not a single member list.Added dev-requirements.txt (containsmock)Alldetermine_destmethods now take a seconddirectoryargument, which determines the output directory.Addssanity_checkfunction which prints values which might be unusual to stdout.parse_cdlandwrite_cdlrenamed toparse_rnh_cdlandwrite_rnh_cdlrespectively.member_resetmethods:ColorCorrectionnow has areset_membersmethod, which resets the class level member’s dictionary.MediaRefalso has areset_membersmethod, as doesColorCollectionreset_allfunction calls all of the abovereset_membersmethods at once.Renamedcdl_fileargument:parse_cccdl_filearg renamed toinput_fileand now accepts a either a raw string or anElementTreeElementasinput_file.parse_rnh_cdlcdl_filearg renamed toinput_file.parse_aleedl_filearg renamed toinput_file.parse_flexedl_filearg renamed toinput_file.Python Structure RefactoringMovedHALT_ON_ERRORinto theconfigmodule, which should now be referenced and set by importing the entireconfigmodule, and referencing or settingconfig.HALT_ON_ERRORScript functionality remains incdl_convert.cdl_convert, but everything else has been moved out.AscColorSpaceBase,AscDescBase,AscXMLBaseandColorNodeBasenow live undercdl_convert.baseColorCollectionnow lives incdl_convert.collectionColorCorrection,SatNodeandSopNodenow live undercdl_convert.correctionColorDecision,ColorCorrectionRefandMediaRefnow live undercdl_convert.decisionAll parse functions now live undercdl_convert.parseAll write functions now live undercdl_convert.writesanity_checknow live undercdl_convert.utilsreset_allnow lives under the main moduleInstallationInstalling is as simple as using pip::$ pip install cdl_convertIf you don’t want to bother with a pip style install, you can alternatively
grab the entirecdl_convertdirectory, then set up a shortcut to callcdl_convert/cdl_convert.pyGitHub, Bug Reporting and SupportAtcdl_convert’sGitHubpage you can browse the code and the history of
the project.Builds can be downloaded from the GitHub page or thePyPIrepository entry.Theissuespage on GitHub is the best place to report bugs or request support,
and whilecdl_convertis distributed with no warranty of any kind, issues
will be read and helped if able.Frequently Asked QuestionsWhat versions of Python doescdl_convertsupport?cdl_convertworks in Python 2.6 through 3.4 and PyPy. A full test suite
runs continuous integration throughTravis-ci.org, coverage throughcoveralls.io, and code quality checked withlandscape.io.Code ispep 8compliant, with docstrings followinggoogle codedocstring
standards.Why don’t you support formatX?I either haven’t had time to build a parser for the format yet, or I might
even be unaware it exists. Perhaps you should drop by theissuespage
and create a request for the format? If creating a request for a format it
helps immensely to have a sample of that format.Why the underscore?cdl_convertstarted as a simple script to convert from one format to
another. As such, it wasn’t named with the standards that one would usually
use for a python module. By the time the project became big enough, was on
PyPI, etc, it was too spread out on the web, in too many places to make
changing easy. In the end, I opted to keep it. At some point,cdl_convertmight migrate into a larger, more generic film & tv
python module, which will be named properly.ContributingSamplesPlease,please,pleasesubmit samples of the following formats:FLExALECMXCCCThese are complex formats, and seeing real world samples helps write tests
that ensure correct parsing of real world EDLs and CDLs. If you don’t even see
a format of CDL listed that you know exists, open an issue at the githubissuespage asking for parse/write support for the format, and include a
sample.Squashing BugsTake a look at theissuespage and if you see something that you think you
can bang out, leave a comment saying you’re going to take it on. While many
issues are already assigned to the principal authors, just because it’s assigned
doesn’t mean any work has begun.Submitting CodeBefore generating a pull request, make sure to run the test suite::$ python setup.py testIf the tests fail, note which tests are failing, how they would have been
affected by your code. Always assume you broke something rather than that the
tests are ‘wrong.’ If you know you didn’t break something, and the tests are
simply reporting out of date results based on your changes,change the tests.If your code fails the tests (Travis-ci.orgchecks all pull requests when
you create them) it will berejected. If the code style doesn’t follow
PEP-8, it’s not going to be a high priority for integration.When submitting, you’ll be asked to waive copyright to your submitted code to
the listed authors. This is so we can keep a tight handle on the code and change
the license for future releases if needed.LicenseThe MIT License (MIT)cdl_convertCopyright (c) 2015 Sean Wallitschhttp://github.com/shidarin/cdl_convert/Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.