mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 17:00:46 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8720087bb2 | ||
|
|
f734aae227 | ||
|
|
17e9c77ed7 | ||
|
|
fc7dde8fd6 | ||
|
|
3021721299 | ||
|
|
cf9be9abf1 | ||
|
|
73936510cd | ||
|
|
d118554443 | ||
|
|
22c205d638 | ||
|
|
36ac320b44 |
29
.github/workflows/pythonpublish.yml
vendored
Normal file
29
.github/workflows/pythonpublish.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Install parsimonious
|
||||
run: |
|
||||
pip install parsimonious
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
||||
@@ -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.
|
||||
|
||||
@@ -2,6 +2,6 @@ from .ptuls_grammar import protools_text_export_grammar
|
||||
from .ptuls_parser_visitor import DictionaryParserVisitor
|
||||
from .transformations import TimecodeInterpreter
|
||||
|
||||
__version__ = '0.1.0'
|
||||
__version__ = '0.3.1'
|
||||
__author__ = 'Jamie Hardt'
|
||||
__license__ = 'MIT'
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/zsh
|
||||
python3 setup.py build
|
||||
python3 setup.py sdist bdist_wheel
|
||||
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
|
||||
@@ -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