ptulsconv 2.1.1__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/PKG-INFO +32 -12
  2. ptulsconv-2.2.2/ptulsconv/__init__.py +3 -0
  3. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/doc_entity.py +9 -1
  4. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/pt_doc_parser.py +45 -13
  5. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/pyproject.toml +22 -26
  6. ptulsconv-2.1.1/ptulsconv/__init__.py +0 -9
  7. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/LICENSE +0 -0
  8. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/README.md +0 -0
  9. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/__main__.py +0 -0
  10. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/broadcast_timecode.py +0 -0
  11. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/commands.py +0 -0
  12. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/__init__.py +0 -0
  13. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/adr_entity.py +0 -0
  14. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/generic_entity.py +0 -0
  15. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/tag_compiler.py +0 -0
  16. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/tag_mapping.py +0 -0
  17. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/docparser/tagged_string_parser_visitor.py +0 -0
  18. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/footage.py +0 -0
  19. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/movie_export.py +0 -0
  20. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/__init__.py +0 -0
  21. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/continuity.py +0 -0
  22. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/line_count.py +0 -0
  23. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/recordist_log.py +0 -0
  24. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/summary_log.py +0 -0
  25. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/supervisor_1pg.py +0 -0
  26. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/pdf/talent_sides.py +0 -0
  27. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/reporting.py +0 -0
  28. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/validations.py +0 -0
  29. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/xml/common.py +0 -0
  30. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/xslt/AvidMarkers.xsl +0 -0
  31. {ptulsconv-2.1.1 → ptulsconv-2.2.2}/ptulsconv/xslt/SRT.xsl +0 -0
@@ -1,11 +1,32 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: ptulsconv
3
- Version: 2.1.1
4
- Summary: Parse and convert Pro Tools text exports
3
+ Version: 2.2.2
4
+ Summary: Read Pro Tools Text exports and generate PDF ADR Reports, JSON
5
+ License: MIT License
6
+
7
+ Copyright (c) 2022 Jamie Hardt
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
5
26
  Keywords: text-processing,parsers,film,broadcast,editing,editorial
6
- Author-email: Jamie Hardt <jamiehardt@me.com>
27
+ Author: Jamie Hardt
28
+ Author-email: jamiehardt@me.com
7
29
  Requires-Python: >=3.8
8
- Description-Content-Type: text/markdown
9
30
  Classifier: License :: OSI Approved :: MIT License
10
31
  Classifier: Topic :: Multimedia
11
32
  Classifier: Topic :: Multimedia :: Sound/Audio
@@ -16,16 +37,15 @@ Classifier: Programming Language :: Python :: 3.11
16
37
  Classifier: Programming Language :: Python :: 3.12
17
38
  Classifier: Development Status :: 5 - Production/Stable
18
39
  Classifier: Topic :: Text Processing :: Filters
19
- Requires-Dist: parsimonious
20
- Requires-Dist: tqdm
21
- Requires-Dist: reportlab
22
- Requires-Dist: py-ptsl >= 101.1.0
23
- Requires-Dist: Sphinx ~= 5.3.0 ; extra == "doc"
24
- Requires-Dist: sphinx-rtd-theme >= 1.1.1 ; extra == "doc"
40
+ Provides-Extra: doc
41
+ Requires-Dist: parsimonious (>=0.10.0,<0.11.0)
42
+ Requires-Dist: py-ptsl (>=101.1.0,<102.0.0)
43
+ Requires-Dist: reportlab (>=4.4.1,<5.0.0)
44
+ Requires-Dist: tqdm (>=4.67.1,<5.0.0)
25
45
  Project-URL: Documentation, https://ptulsconv.readthedocs.io/
26
46
  Project-URL: Issues, https://github.com/iluvcapra/ptulsconv/issues
27
47
  Project-URL: Source, https://github.com/iluvcapra/ptulsconv
28
- Provides-Extra: doc
48
+ Description-Content-Type: text/markdown
29
49
 
30
50
  [![Documentation Status](https://readthedocs.org/projects/ptulsconv/badge/?version=latest)](https://ptulsconv.readthedocs.io/en/latest/?badge=latest)
31
51
  ![](https://img.shields.io/github/license/iluvcapra/ptulsconv.svg)
@@ -0,0 +1,3 @@
1
+ """
2
+ Parse and convert Pro Tools text exports
3
+ """
@@ -19,11 +19,17 @@ class SessionDescriptor:
19
19
  self.tracks = kwargs['tracks']
20
20
  self.markers = kwargs['markers']
21
21
 
22
- def markers_timed(self) -> Iterator[Tuple['MarkerDescriptor', Fraction]]:
22
+ def markers_timed(self,
23
+ only_ruler_markers: bool = True) -> \
24
+ Iterator[Tuple['MarkerDescriptor', Fraction]]:
23
25
  """
24
26
  Iterate each marker in the session with its respective time reference.
25
27
  """
26
28
  for marker in self.markers:
29
+
30
+ if marker.track_marker and only_ruler_markers:
31
+ continue
32
+
27
33
  marker_time = Fraction(marker.time_reference,
28
34
  int(self.header.sample_rate))
29
35
  # marker_time = self.header.convert_timecode(marker.location)
@@ -182,6 +188,7 @@ class MarkerDescriptor:
182
188
  units: str
183
189
  name: str
184
190
  comments: str
191
+ track_marker: bool
185
192
 
186
193
  def __init__(self, **kwargs):
187
194
  self.number = kwargs['number']
@@ -190,3 +197,4 @@ class MarkerDescriptor:
190
197
  self.units = kwargs['units']
191
198
  self.name = kwargs['name']
192
199
  self.comments = kwargs['comments']
200
+ self.track_marker = kwargs['track_marker']
@@ -9,7 +9,8 @@ from .doc_entity import SessionDescriptor, HeaderDescriptor, TrackDescriptor, \
9
9
  protools_text_export_grammar = Grammar(
10
10
  r"""
11
11
  document = header files_section? clips_section? plugin_listing?
12
- track_listing? markers_listing?
12
+ track_listing? markers_block?
13
+
13
14
  header = "SESSION NAME:" fs string_value rs
14
15
  "SAMPLE RATE:" fs float_value rs
15
16
  "BIT DEPTH:" fs integer_value "-bit" rs
@@ -74,17 +75,33 @@ protools_text_export_grammar = Grammar(
74
75
 
75
76
  track_clip_state = ("Muted" / "Unmuted")
76
77
 
77
- markers_listing = markers_listing_header markers_column_header
78
- marker_record*
79
- markers_listing_header = "M A R K E R S L I S T I N G" rs
80
- markers_column_header = "# " fs "LOCATION " fs
81
- "TIME REFERENCE " fs
82
- "UNITS " fs
83
- "NAME " fs
84
- "COMMENTS" rs
78
+ markers_block = markers_block_header
79
+ (markers_list / markers_list_simple)
80
+
81
+ markers_list_simple = markers_column_header_simple marker_record_simple*
82
+
83
+ markers_list = markers_column_header marker_record*
84
+
85
+ markers_block_header = "M A R K E R S L I S T I N G" rs
86
+
87
+ markers_column_header_simple =
88
+ "# LOCATION TIME REFERENCE "
89
+ "UNITS NAME "
90
+ "COMMENTS" rs
91
+
92
+ markers_column_header =
93
+ "# LOCATION TIME REFERENCE "
94
+ "UNITS NAME "
95
+ "TRACK NAME "
96
+ "TRACK TYPE COMMENTS" rs
97
+
98
+ marker_record_simple = integer_value isp fs string_value fs
99
+ integer_value isp fs string_value fs string_value
100
+ fs string_value rs
85
101
 
86
102
  marker_record = integer_value isp fs string_value fs integer_value isp fs
87
- string_value fs string_value fs string_value rs
103
+ string_value fs string_value fs string_value fs
104
+ string_value fs string_value rs
88
105
 
89
106
  fs = "\t"
90
107
  rs = "\n"
@@ -231,22 +248,37 @@ class DocParserVisitor(NodeVisitor):
231
248
  return node.text
232
249
 
233
250
  @staticmethod
234
- def visit_markers_listing(_, visited_children):
251
+ def visit_markers_block(_, visited_children):
235
252
  markers = []
236
253
 
237
- for marker in visited_children[2]:
254
+ for marker in visited_children[1][0][1]:
238
255
  markers.append(marker)
239
256
 
240
257
  return markers
241
258
 
259
+ @staticmethod
260
+ def visit_marker_record_simple(_, visited_children):
261
+
262
+ return MarkerDescriptor(number=visited_children[0],
263
+ location=visited_children[3],
264
+ time_reference=visited_children[5],
265
+ units=visited_children[8],
266
+ name=visited_children[10],
267
+ comments=visited_children[12],
268
+ track_marker=False)
269
+
242
270
  @staticmethod
243
271
  def visit_marker_record(_, visited_children):
272
+ track_type = visited_children[15]
273
+ is_track_marker = (track_type == "Track")
274
+
244
275
  return MarkerDescriptor(number=visited_children[0],
245
276
  location=visited_children[3],
246
277
  time_reference=visited_children[5],
247
278
  units=visited_children[8],
248
279
  name=visited_children[10],
249
- comments=visited_children[12])
280
+ comments=visited_children[16],
281
+ track_marker=is_track_marker)
250
282
 
251
283
  @staticmethod
252
284
  def visit_formatted_clip_name(_, visited_children):
@@ -1,13 +1,5 @@
1
- [build-system]
2
- requires = ["flit_core >=3.2,<4"]
3
- build-backend = "flit_core.buildapi"
4
-
5
1
  [project]
6
2
  name = "ptulsconv"
7
- authors = [
8
- {name = "Jamie Hardt", email = "jamiehardt@me.com"},
9
- ]
10
- readme = "README.md"
11
3
  license = { file = "LICENSE" }
12
4
  classifiers = [
13
5
  'License :: OSI Approved :: MIT License',
@@ -22,32 +14,36 @@ classifiers = [
22
14
  "Topic :: Text Processing :: Filters"
23
15
  ]
24
16
  requires-python = ">=3.8"
25
- dynamic = ["version", "description"]
26
17
  keywords = ["text-processing", "parsers", "film",
27
18
  "broadcast", "editing", "editorial"]
28
- dependencies = [
29
- 'parsimonious',
30
- 'tqdm',
31
- 'reportlab',
32
- 'py-ptsl >= 101.1.0'
33
- ]
34
-
35
- [project.optional-dependencies]
36
- doc = [
37
- "Sphinx ~= 5.3.0",
38
- "sphinx-rtd-theme >= 1.1.1"
39
- ]
40
19
 
41
- [tool.flit.module]
20
+ [tool.poetry]
42
21
  name = "ptulsconv"
22
+ version = "2.2.2"
23
+ description = "Read Pro Tools Text exports and generate PDF ADR Reports, JSON"
24
+ authors = ["Jamie Hardt <jamiehardt@me.com>"]
25
+ license = "MIT"
26
+ readme = "README.md"
27
+
28
+ [tool.poetry.dependencies]
29
+ python = "^3.8"
30
+ parsimonious = "^0.10.0"
31
+ tqdm = "^4.67.1"
32
+ reportlab = "^4.4.1"
33
+ py-ptsl = "^101.1.0"
34
+
35
+ [tool.poetry.extras]
36
+ doc = ['sphinx', 'sphinx_rtd_theme']
43
37
 
44
- [project.scripts]
45
- ptulsconv = "ptulsconv.__main__:main"
38
+ [tool.poetry.scripts]
39
+ wavinfo = 'ptulsconv.__main__:main'
46
40
 
47
- [project.entry_points.console_scripts]
48
- ptulsconv = 'ptulsconv.__main__:main'
49
41
 
50
42
  [project.urls]
51
43
  Source = 'https://github.com/iluvcapra/ptulsconv'
52
44
  Issues = 'https://github.com/iluvcapra/ptulsconv/issues'
53
45
  Documentation = 'https://ptulsconv.readthedocs.io/'
46
+
47
+ [build-system]
48
+ requires = ["poetry-core"]
49
+ build-backend = "poetry.core.masonry.api"
@@ -1,9 +0,0 @@
1
- """
2
- Parse and convert Pro Tools text exports
3
- """
4
-
5
- __version__ = '2.1.1'
6
- __author__ = 'Jamie Hardt'
7
- __license__ = 'MIT'
8
- __copyright__ = "%s %s (c) 2023 %s. All rights reserved." \
9
- % (__name__, __version__, __author__)
File without changes
File without changes