13 Commits

Author SHA1 Message Date
Jamie Hardt
22edecdbbf Update __init__.py
Ver 0.3.3
2020-01-04 23:15:51 -08:00
Jamie Hardt
7c8a74aed9 Merge branch 'master' of https://github.com/iluvcapra/ptulsconv 2020-01-04 23:13:18 -08:00
Jamie Hardt
96a4cdb612 Added py3.8 to tests 2020-01-04 23:10:55 -08:00
Jamie Hardt
8720087bb2 Update pythonpublish.yml
Fixed typos
2020-01-04 22:59:27 -08:00
Jamie Hardt
f734aae227 Update pythonpublish.yml
Added `parsimonious` install step
2020-01-04 22:57:31 -08:00
Jamie Hardt
17e9c77ed7 Create pythonpublish.yml 2020-01-04 22:47:25 -08:00
Jamie Hardt
fc7dde8fd6 Merge branch 'master' of https://github.com/iluvcapra/ptulsconv 2020-01-04 22:46:42 -08:00
Jamie Hardt
3021721299 Removed pypi_upload
Changing release workflow
2020-01-04 22:46:11 -08:00
Jamie Hardt
cf9be9abf1 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	ptulsconv/__init__.py
2019-11-12 17:35:37 -08:00
Jamie Hardt
73936510cd Changed appearance of error reports 2019-11-12 17:34:09 -08:00
Jamie Hardt
d118554443 Update README.md
Removed link to ProToolsText
2019-11-03 14:47:51 -08:00
Jamie Hardt
22c205d638 Update __init__.py
v0.3.0 nudge
2019-10-13 15:04:58 -07:00
Jamie Hardt
36ac320b44 Update __init__.py
v0.2.0
2019-10-13 13:10:10 -07:00
7 changed files with 59 additions and 12 deletions

29
.github/workflows/pythonpublish.yml vendored Normal file
View 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/*

View File

@@ -1,6 +1,7 @@
language: python
python:
- "3.7"
- "3.8
script:
- "python -m unittest discover tests"
install:

View File

@@ -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.

View File

@@ -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.3'
__author__ = 'Jamie Hardt'
__license__ = 'MIT'
__license__ = 'MIT'

View File

@@ -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/*

View File

@@ -24,12 +24,13 @@ setup(name='ptulsconv',
'Topic :: Multimedia',
'Topic :: Multimedia :: Sound/Audio',
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Development Status :: 4 - Beta",
"Topic :: Text Processing :: Filters",
"Topic :: Text Processing :: Markup :: XML"],
packages=['ptulsconv'],
keywords='text-processing parsers film tv editing editorial',
install_requires=['parsimonious','tqdm'],
install_requires=['parsimonious', 'tqdm'],
entry_points={
'console_scripts': [
'ptulsconv = ptulsconv.__main__:main'

View File

@@ -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()