Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6f39c0b
Merge branch 'release/0.1'
shidarin Apr 17, 2014
1b11457
Merge branch 'release/0.2'
shidarin Apr 17, 2014
a48f98e
Merge branch 'release/0.3'
shidarin Apr 19, 2014
98d9462
Merge branch 'release/0.4'
shidarin Apr 23, 2014
e8c6de5
Merge branch 'release/0.4.1'
shidarin Apr 24, 2014
5365728
Merge branch 'release/0.4.2'
shidarin Apr 24, 2014
4b50e30
Merge branch 'release/0.5'
shidarin Apr 25, 2014
f459532
Merge branch 'release/0.6'
shidarin May 4, 2014
c8910d9
Merge branch 'release/v0.6.1'
shidarin May 5, 2014
134ddb9
Merge branch 'release/0.7'
shidarin Jun 17, 2014
ef08c28
Fixes bad rst formatting in README
shidarin Jun 17, 2014
38f29f5
Merge branch 'release/0.7.1'
shidarin Jan 29, 2015
8573130
Merge branch 'release/0.8'
shidarin Feb 17, 2015
52c91cd
Fixes Issue 42. cdl_convert script not exporting CCs from CDL
shidarin Jul 4, 2015
5321e09
Resolves #40 with root level stub file
shidarin Jul 4, 2015
9e35181
Merge branch 'feature/parse_cmx' into develop
shidarin Jul 4, 2015
11ca043
Updates docs/readmes/changelogs for cmx parsing
shidarin Jul 4, 2015
5fdb0df
Fixes Issue #47. Strips number strings before decimal conversion.
shidarin Jul 5, 2015
8050ddd
Tweak to the fix for #42. Does not export reference CCs.
shidarin Jul 5, 2015
7ac45e5
Resolves #46. Generates a CC ID if none found in XML.
shidarin Jul 5, 2015
f0f1155
Bring dev_requirements up to snuff.
shidarin Oct 10, 2015
9ccc649
Remove tests/__init__.py
shidarin Oct 10, 2015
b695d96
Replaced newline-dependent CMS parser with more robust regex parser
method-studios Oct 15, 2015
6e9bc1f
adjustments to regex parsing in response to addtl edl examples
method-studios Oct 15, 2015
e1b4913
edl-cdl regex parsing fix for out of order lines
method-studios Nov 2, 2015
032b920
Fix minor issue with asterisks in edl parsing
method-studios Nov 2, 2015
2a32ec9
Cleanup work to make landscape bot happier
method-studios Nov 3, 2015
77e6854
a few more landscape bot nitpicks
method-studios Nov 4, 2015
d39b2bc
Use python universal readline mode to account for different line endings
shidarin Feb 11, 2016
d51056f
Version bump and doc changes
shidarin Feb 11, 2016
3dadd04
Merge branch 'release/0.9'
shidarin Feb 11, 2016
d99d7fd
Merge branch 'release/0.9' into develop
shidarin Feb 11, 2016
f545326
Encountered EDL where 'LOC' is used in place of 'CLIP'
method-studios Apr 5, 2016
f076116
Allow blank lines in ALE
shidarin Apr 9, 2016
6cd1dad
Version bump and doc changes
shidarin Apr 9, 2016
9f9202d
Merge branch 'release/0.9.1'
shidarin Apr 9, 2016
aaa9720
Merge branch 'release/0.9.1' into develop
shidarin Apr 9, 2016
1141153
Fix travis.ci & coveralls unittests
shidarin Apr 9, 2016
5568002
Fix python 2.6 requirements
shidarin Apr 9, 2016
5cded9e
Remove 3.2 from travis-ci testing
shidarin Apr 10, 2016
8928487
Version bump and doc changes
shidarin Apr 10, 2016
1799ac2
Merge branch 'release/0.9.2'
shidarin Apr 10, 2016
a193896
fixing regression from adding LOC to augment FROM field in edl parsing
method-studios Apr 19, 2016
97c6469
Changed case of SAT element to Sat to support Nuke
method-studios May 4, 2016
5ad5147
Merged v0.9.2 from upstream shidarin github
method-studios May 16, 2016
8526328
Added fallback to use description for id if id not present rather tha…
method-studios May 16, 2016
9f7095e
Removed extra print, added uniqueness on desc strings when used as ids
method-studios May 16, 2016
a41e735
Removed unique suffixing for reasons of interference on file naming p…
method-studios May 16, 2016
64dfbae
Exception throw is clearer on collided namings
method-studios May 16, 2016
bb81f67
Reverted file opening line to use join to avoid EDL line ending problems
method-studios May 17, 2016
bdc712b
robustness improvements in edl parsing - particularly FROM/CLIP inequ…
method-studios Aug 11, 2017
a091e8b
implemented an edl block reorder to simplify terrible regex
method-studios Aug 14, 2017
05411d7
provide no-op ASC data when none is supplied for an EDL block
method-studios Aug 14, 2017
235b7a1
fix bug with edlcdl from/loc naming precedence
method-studios Aug 15, 2017
fad03a9
fix first edl-cc match ignoring and reduce regex complexity due to re…
method-studios Aug 18, 2017
cc2f958
Update test suite to use 'SatNode' instead of 'SATNode'
Oct 16, 2017
ce96c6e
Merge commit 'cc2f958' into feature/parse_cmx
method-studios Oct 19, 2017
bec3fb0
fix scientific notation values coming from nuke cdl exports
method-studios Oct 19, 2017
3690b2c
prevent empty sats and sops from making conversion take forever with …
method-studios Apr 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
- "pypy3"
# command to install dependencies
install:
- pip install argparse
- pip install mock
- pip install coveralls
- pip install setuptools
# command to run tests, e.g. python setup.py test
script: coverage run --source=cdl_convert tests/__init__.py
script: coverage run --source cdl_convert setup.py test
# command to run after tests have completed
after_success:
coveralls
coveralls
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include README.rst
include LICENSE
recursive-include docs_html *
include cdl_convert.py
recursive-include docs_html *
21 changes: 18 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CDL Convert
- **Docs:** http://cdl-convert.readthedocs.org/
- **GitHub:** https://github.com/shidarin/cdl_convert
- **PyPI:** https://pypi.python.org/pypi/cdl_convert
- **Python Versions:** 2.6-3.4, PyPy
- **Python Versions:** 2.6-3.5, PyPy & PyPy3

Introduction
------------
Expand Down Expand Up @@ -40,8 +40,8 @@ It is the purpose of ``cdl_convert`` to 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_convert`` supports parsing ALE, FLEx, CC, CCC, CDL and RCDL. We can write
out CC, CCC, CDL and RCDL.
``cdl_convert`` supports 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
Cinematographers**
Expand Down Expand Up @@ -71,6 +71,21 @@ the ``-o`` flag.::
Changelog
---------

*New in version 0.9.2:*

- Fixed a bug where ALE's with blank lines would not convert correctly.
- Fixed a bug that was preventing ``cdl_convert`` from being correctly installed in Python 2.6
- Fixed 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 EDLs
- Fixed 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 ``--single`` flag. When provided with an output collection format, each color correction in the input will be exported to it's own collection.
Expand Down
71 changes: 71 additions & 0 deletions cdl_convert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python
"""

CDL Convert
=======================

Stub file for script execution of cdl_convert without installing.

## License

The MIT License (MIT)

cdl_convert
Copyright (c) 2015 Sean Wallitsch
http://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.

"""

# ==============================================================================
# IMPORTS
# ==============================================================================

from __future__ import print_function

# Standard Imports

import sys

# cdl_convert imports

from cdl_convert.cdl_convert import main

# ==============================================================================
# PRIVATE FUNCTIONS
# ==============================================================================


def _print_error(*objs):
print(*objs, file=sys.stderr)

# ==============================================================================
# EXECUTION
# ==============================================================================

if __name__ == '__main__': # pragma: no cover
try:
main()
except Exception as err: # pylint: disable=W0703
import traceback
_print_error('Unexpected error encountered:')
_print_error(err)
_print_error(traceback.format_exc())
exit(1)
2 changes: 1 addition & 1 deletion cdl_convert/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
__copyright__ = "Copyright 2015, Sean Wallitsch"
__credits__ = ["Sean Wallitsch", ]
__license__ = "MIT"
__version__ = "0.8"
__version__ = "0.9.2"
__maintainer__ = "Sean Wallitsch"
__email__ = "shidarin@alphamatte.com"
__status__ = "Development"
Expand Down
16 changes: 6 additions & 10 deletions cdl_convert/cdl_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ def write_collection_file(col, ext):
if filetype_in in config.COLLECTION_FORMATS:
for color_correct in color_decisions.color_corrections:
sanity_check(color_correct)
for decision in color_decisions.color_decisions:
if not decision.is_ref:
sanity_check(decision.cc)
else:
sanity_check(color_decisions)

Expand All @@ -260,6 +263,9 @@ def write_collection_file(col, ext):
if filetype_in in config.COLLECTION_FORMATS:
for color_correct in color_decisions.color_corrections:
write_single_file(color_correct, ext)
for decision in color_decisions.color_decisions:
if not decision.is_ref:
write_single_file(decision.cc, ext)
else:
write_single_file(color_decisions, ext)
else:
Expand All @@ -279,13 +285,3 @@ def write_collection_file(col, ext):
collection = ColorCollection(input_file=filepath)
collection.append_child(color_decisions)
write_collection_file(collection, ext)

if __name__ == '__main__': # pragma: no cover
try:
main()
except Exception as err: # pylint: disable=W0703
import traceback
print('Unexpected error encountered:')
print(err)
print(traceback.format_exc())
raw_input('Press enter key to exit')
1 change: 1 addition & 0 deletions cdl_convert/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
# id doesn't exist. (Other than first creation)
# If a ColorCorrection is given a duplicate ID
HALT_ON_ERROR = False
MISSING_ID_FROM_DESC_IF_AVAILABLE = True

COLLECTION_FORMATS = ['ale', 'ccc', 'cdl', 'edl', 'flex']
SINGLE_FORMATS = ['cc', 'rcdl']
Expand Down
2 changes: 1 addition & 1 deletion cdl_convert/correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def sat(self, value):

def build_element(self):
"""Builds an ElementTree XML Element representing this SatNode"""
sat = ElementTree.Element('SATNode')
sat = ElementTree.Element('SatNode')
for description in self.desc:
desc = ElementTree.SubElement(sat, 'Description')
desc.text = description
Expand Down
Loading