mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Merge branch 'master' of https://github.com/iluvcapra/ptulsconv
This commit is contained in:
@@ -110,8 +110,3 @@ A clip name beginning with "&" will have its parsed clip name appended to the pr
|
||||
cues will be applied (later clips having precedence). The clips need not be touching, and the clips will be combined
|
||||
into a single row of the output. The start time of the first clip will become the start time of the row, and the finish
|
||||
time of the last clip will become the finish time of the row.
|
||||
|
||||
## Other Projects
|
||||
|
||||
This project is under construction. Look at [Pro Tools Text](https://github.com/iluvcapra/ProToolsText)
|
||||
for a working solution at this time.
|
||||
|
||||
@@ -4,4 +4,4 @@ from .transformations import TimecodeInterpreter
|
||||
|
||||
__version__ = '0.3.1'
|
||||
__author__ = 'Jamie Hardt'
|
||||
__license__ = 'MIT'
|
||||
__license__ = 'MIT'
|
||||
|
||||
@@ -6,6 +6,31 @@ class TaggingIntegratedTests(unittest.TestCase):
|
||||
|
||||
path = os.path.dirname(__file__) + '/export_cases/Tag Tests/Tag Tests.txt'
|
||||
|
||||
def test_event_list(self):
|
||||
with open(self.path, 'r') as f:
|
||||
visitor = ptulsconv.DictionaryParserVisitor()
|
||||
result = ptulsconv.protools_text_export_grammar.parse(f.read())
|
||||
parsed: dict = visitor.visit(result)
|
||||
|
||||
tcxform = ptulsconv.transformations.TimecodeInterpreter()
|
||||
tagxform = ptulsconv.transformations.TagInterpreter(show_progress=False,
|
||||
ignore_muted=True,
|
||||
log_output=False)
|
||||
|
||||
parsed = tcxform.transform(parsed)
|
||||
parsed = tagxform.transform(parsed)
|
||||
|
||||
self.assertEqual(9, len(parsed['events']))
|
||||
self.assertEqual("Clip Name", parsed['events'][0]['PT.Clip.Name'])
|
||||
self.assertEqual("Lorem ipsum" , parsed['events'][1]['PT.Clip.Name'])
|
||||
self.assertEqual("Dolor sic amet the rain in spain" , parsed['events'][2]['PT.Clip.Name'])
|
||||
self.assertEqual("A B C" , parsed['events'][3]['PT.Clip.Name'])
|
||||
self.assertEqual("Silver Bridge" , parsed['events'][4]['PT.Clip.Name'])
|
||||
self.assertEqual("Region 02" , parsed['events'][5]['PT.Clip.Name'])
|
||||
self.assertEqual("Region 12" , parsed['events'][6]['PT.Clip.Name'])
|
||||
self.assertEqual("Region 22" , parsed['events'][7]['PT.Clip.Name'])
|
||||
self.assertEqual("Region 04" , parsed['events'][8]['PT.Clip.Name'])
|
||||
|
||||
def test_append(self):
|
||||
with open(self.path, 'r') as f:
|
||||
visitor = ptulsconv.DictionaryParserVisitor()
|
||||
|
||||
Reference in New Issue
Block a user