Skip to content

Commit

Permalink
Added documentation for builders
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jul 21, 2023
1 parent 2e64947 commit c2b2cc7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 6 deletions.
24 changes: 24 additions & 0 deletions docs/source/builders.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Builders
========

.. currentmodule:: ptsl

.. autoclass:: ptsl.builders.create_session_builder.CreateSessionBuilder
:members:
:undoc-members:

.. autoclass:: ptsl.builders.create_session_builder.CreateSessionFromTemplateBuilder
:members:
:undoc-members:

.. autoclass:: ptsl.builders.create_session_builder.CreateSessionFromAAFBuilder
:members:
:undoc-members:

.. autoclass:: ptsl.builders.export_text_builder.ExportSessionTextBuilder
:members:
:undoc-members:

.. autoclass:: ptsl.builders.import_builder.ImportSessionDataBuilder
:undoc-members:

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Welcome to py-ptsl's documentation!
:caption: Notes:

engine
builders
types
utils
implementation
Expand Down
8 changes: 3 additions & 5 deletions docs/source/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ Working With Sample Rates and Pull Rates

.. autofunction:: ptsl.util.sample_rate_info

.. autofunction:: ptsl.util.pull_rate_info
.. autofunction:: ptsl.util.sample_rate_enum

.. autofunction:: ptsl.util.pull_rate_info

Working with Paths
------------------

.. autofunction:: ptsl.util.macos_to_patform_path


13 changes: 12 additions & 1 deletion ptsl/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,18 @@ def create_session(self,
name: str,
path: str) -> CreateSessionBuilder:
"""
Create a new Pro Tools session.
Create a new Pro Tools session. Returns a
:class:`~ptsl.builders.create_session_builder.CreateSessionBuilder` object used to
customize the creation request.
.. sourcecode:: python
:caption: Creating a session with a builder
b = engine.create_session("My Session", "/Path/to/Session")
b.wave_format()
b.sample_rate(96000)
b.bit_depth(32)
b.create() # Session is created
:param str name: Session Name
:param str path: Path to the new session
Expand Down

0 comments on commit c2b2cc7

Please sign in to comment.