mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 32191791c6 | |||
| 1ff910e4d2 | |||
| 0e8a77f548 | |||
|
|
7058397f6f | ||
|
|
16d7befd9f | ||
|
|
2a3f4a7c18 | ||
| d7fff23e5e | |||
|
|
757c3171e7 | ||
| 48dd7de07e | |||
|
|
dc259d54aa | ||
|
|
09ed12fc8f | ||
| 2a69bf47c8 | |||
| 01d2374a9b | |||
| 68e7eb89a9 | |||
|
|
517fe3526a | ||
| 7789c0df4c | |||
| d97dcc3e08 | |||
| 615b2b5a2a | |||
| 4cd6ba1772 | |||
| 1942b323b3 | |||
| 7d297a7564 | |||
|
|
54fa8f04a7 | ||
|
|
dcc6113a63 | ||
|
|
04b9e35240 | ||
|
|
f460022160 | ||
| 5c5cd84811 | |||
|
|
ee90697be0 | ||
|
|
4a0d19ade1 | ||
|
|
df6c783c51 | ||
|
|
f0b232b2b6 | ||
|
|
519c6403ba | ||
|
|
d29c36eafa | ||
|
|
2095a1fb75 | ||
|
|
70defcc46c | ||
|
|
d156b6df89 | ||
|
|
3ba9d7933e | ||
|
|
b0c40ee0b6 | ||
|
|
921b0f07af | ||
|
|
57764bc859 | ||
|
|
779c93282c | ||
|
|
9684be6c7e | ||
|
|
484a70fc8e | ||
|
|
5aa005c317 | ||
|
|
454adea3d1 | ||
|
|
1e6546dab5 | ||
|
|
8b262d3bfb | ||
|
|
630e7960dc | ||
|
|
aa7b418121 | ||
|
|
a519a525b2 |
4
.flake8
4
.flake8
@@ -1,4 +0,0 @@
|
||||
[flake8]
|
||||
per-file-ignores =
|
||||
ptulsconv/__init__.py: F401
|
||||
ptulsconv/docparser/__init__.py: F401
|
||||
14
.github/workflows/python-package.yml
vendored
14
.github/workflows/python-package.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.5.0
|
||||
@@ -27,15 +27,11 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pytest
|
||||
pip install -e .
|
||||
- name: Lint with flake8
|
||||
pip install .
|
||||
pip install --group dev .
|
||||
- name: Lint with ruff
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 ptulsconv tests --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 ptulsconv tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
ruff check src
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
||||
flake8 ptulsconv
|
||||
|
||||
12
.github/workflows/pythonpublish.yml
vendored
12
.github/workflows/pythonpublish.yml
vendored
@@ -26,14 +26,4 @@ jobs:
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
- name: pypi-publish
|
||||
uses: pypa/gh-action-pypi-publish@v1.8.6
|
||||
# - name: Report to Mastodon
|
||||
# uses: cbrgm/mastodon-github-action@v1.0.1
|
||||
# with:
|
||||
# message: |
|
||||
# I just released a new version of ptulsconv, my ADR cue sheet generator!
|
||||
# #python #protools #pdf #filmmaking
|
||||
# ${{ github.server_url }}/${{ github.repository }}
|
||||
# env:
|
||||
# MASTODON_URL: ${{ secrets.MASTODON_URL }}
|
||||
# MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|
||||
uses: pypa/gh-action-pypi-publish@v1.13.0
|
||||
|
||||
@@ -10,10 +10,15 @@ build:
|
||||
os: ubuntu-20.04
|
||||
tools:
|
||||
python: "3.10"
|
||||
# You can also specify other tool versions:
|
||||
# nodejs: "16"
|
||||
# rust: "1.55"
|
||||
# golang: "1.17"
|
||||
jobs:
|
||||
pre_install:
|
||||
- pip install --upgrade --upgrade-strategy only-if-needed --group doc .
|
||||
build:
|
||||
html:
|
||||
python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html
|
||||
post_build:
|
||||
- echo "Command run at 'post_build' step"
|
||||
- echo `date`
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
@@ -23,10 +28,13 @@ sphinx:
|
||||
formats:
|
||||
- pdf
|
||||
|
||||
# FIXME: We should be installing the `doc` dependency group and not the `doc`
|
||||
# extra.
|
||||
|
||||
#Optionally declare the Python requirements required to build your docs
|
||||
python:
|
||||
install:
|
||||
- method: pip
|
||||
path: .
|
||||
extra_requirements:
|
||||
- doc
|
||||
# python:
|
||||
# install:
|
||||
# - method: pip
|
||||
# path: .
|
||||
# extra_requirements:
|
||||
# - doc
|
||||
|
||||
@@ -22,7 +22,11 @@ For a quick overview of how to cue ADR with `ptulsconv`, check out the [Quicksta
|
||||
The easiest way to install on your site is to use `pip`:
|
||||
|
||||
% pip3 install ptulsconv
|
||||
|
||||
|
||||
If you are using `uv` you can also do a tool install...
|
||||
|
||||
% uv tool install ptulsconv
|
||||
|
||||
This will install the necessary libraries on your host and gives you
|
||||
command-line access to the tool through an entry-point `ptulsconv`. In a
|
||||
terminal window type `ptulsconv -h` for a list of available options.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import importlib
|
||||
import sys
|
||||
import os
|
||||
|
||||
@@ -15,9 +16,9 @@ import ptulsconv
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'ptulsconv'
|
||||
copyright = '2019-2023 Jamie Hardt. All rights reserved'
|
||||
# author = ptulsconv.__author__
|
||||
release = ptulsconv.__version__
|
||||
copyright = '2019-2025 Jamie Hardt. All rights reserved'
|
||||
version = "Version 2"
|
||||
release = importlib.metadata.version("ptulsconv")
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
@@ -6,7 +6,12 @@ Usage Form
|
||||
|
||||
Invocations of ptulsconv take the following form:
|
||||
|
||||
ptulsconv [options] IN_FILE
|
||||
ptulsconv [options] [IN_FILE]
|
||||
|
||||
|
||||
`IN_FILE` is a Pro Tools text export in UTF-8 encoding. If `IN_FILE` is
|
||||
missing, `ptulsconv` will attempt to connect to Pro Tools and read cue data
|
||||
from the selected tracks of the currently-open session.
|
||||
|
||||
|
||||
Flags
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
"""
|
||||
Parse and convert Pro Tools text exports
|
||||
"""
|
||||
|
||||
__version__ = '2.2.0'
|
||||
__author__ = 'Jamie Hardt'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = "%s %s (c) 2025 %s. All rights reserved." \
|
||||
% (__name__, __version__, __author__)
|
||||
@@ -1,53 +1,60 @@
|
||||
[build-system]
|
||||
requires = ["flit_core >=3.2,<4"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
|
||||
[project]
|
||||
name = "ptulsconv"
|
||||
authors = [
|
||||
{name = "Jamie Hardt", email = "jamiehardt@me.com"},
|
||||
]
|
||||
version = "4.0.0"
|
||||
description = "Read Pro Tools Text exports and generate PDF ADR Reports, JSON"
|
||||
readme = "README.md"
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">=3.9"
|
||||
|
||||
license-files = ["LICENSE"]
|
||||
keywords = ["text-processing", "parsers", "film",
|
||||
"broadcast", "editing", "editorial"]
|
||||
classifiers = [
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Topic :: Multimedia',
|
||||
'Topic :: Multimedia :: Sound/Audio',
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Topic :: Text Processing :: Filters"
|
||||
]
|
||||
requires-python = ">=3.8"
|
||||
dynamic = ["version", "description"]
|
||||
keywords = ["text-processing", "parsers", "film",
|
||||
"broadcast", "editing", "editorial"]
|
||||
authors = [{name = "Jamie Hardt", email = "<jamiehardt@me.com>"}]
|
||||
dependencies = [
|
||||
'parsimonious',
|
||||
'tqdm',
|
||||
'reportlab',
|
||||
'py-ptsl >= 101.1.0'
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
doc = [
|
||||
"Sphinx ~= 5.3.0",
|
||||
"sphinx-rtd-theme >= 1.1.1"
|
||||
"parsimonious>=0.10.0",
|
||||
"py-ptsl>=600.0.0",
|
||||
"reportlab>=4.4.4",
|
||||
"tqdm>=4.67.1",
|
||||
]
|
||||
|
||||
[tool.flit.module]
|
||||
name = "ptulsconv"
|
||||
|
||||
[project.scripts]
|
||||
ptulsconv = "ptulsconv.__main__:main"
|
||||
|
||||
[project.entry_points.console_scripts]
|
||||
ptulsconv = 'ptulsconv.__main__:main'
|
||||
# [tool.uv.build-backend]
|
||||
# data = { headers = "include/headers", scripts = "bin" }
|
||||
|
||||
[project.urls]
|
||||
Source = 'https://github.com/iluvcapra/ptulsconv'
|
||||
Issues = 'https://github.com/iluvcapra/ptulsconv/issues'
|
||||
Documentation = 'https://ptulsconv.readthedocs.io/'
|
||||
|
||||
[project.optional-dependencies]
|
||||
doc = [
|
||||
"sphinx>=7.4.7",
|
||||
"sphinx-rtd-theme>=3.0.2",
|
||||
]
|
||||
|
||||
|
||||
[project.scripts]
|
||||
ptulsconv = "ptulsconv:__main__.main"
|
||||
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.8.18,<0.9.0"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"ruff>=0.13.1",
|
||||
]
|
||||
doc = [
|
||||
"sphinx>=7.4.7",
|
||||
"sphinx-rtd-theme>=3.0.2",
|
||||
]
|
||||
|
||||
5
src/ptulsconv/__init__.py
Normal file
5
src/ptulsconv/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
"""
|
||||
Parse and convert Pro Tools text exports
|
||||
"""
|
||||
|
||||
__copyright__ = "ptulsconv (c) 2025 Jamie Hardt. All rights reserved."
|
||||
@@ -2,7 +2,10 @@ from optparse import OptionParser, OptionGroup
|
||||
import datetime
|
||||
import sys
|
||||
|
||||
from ptulsconv import __name__, __copyright__
|
||||
import importlib.metadata
|
||||
|
||||
from ptulsconv import __name__
|
||||
import ptulsconv
|
||||
from ptulsconv.commands import convert
|
||||
from ptulsconv.reporting import print_status_style, \
|
||||
print_banner_style, print_section_header_style, \
|
||||
@@ -81,8 +84,10 @@ def main():
|
||||
'and exit.')
|
||||
|
||||
parser.add_option_group(informational_options)
|
||||
|
||||
print_banner_style(__copyright__)
|
||||
|
||||
version = importlib.metadata.version(ptulsconv.__name__)
|
||||
print_banner_style(f"{ptulsconv.__name__} - version {version}")
|
||||
print_banner_style(ptulsconv.__copyright__)
|
||||
|
||||
(options, args) = parser.parse_args(sys.argv)
|
||||
|
||||
@@ -55,8 +55,8 @@ def output_adr_csv(lines: List[ADRLine], time_format: TimecodeFormat):
|
||||
directories for each character number and name pair, and within that
|
||||
directory, creates a CSV file for each reel.
|
||||
"""
|
||||
reels = set([ln.reel for ln in lines])
|
||||
|
||||
reels: set[str | None] = set([ln.reel for ln in lines])
|
||||
for n, name in [(n.character_id, n.character_name) for n in lines]:
|
||||
dir_name = "%s_%s" % (n, name)
|
||||
os.makedirs(dir_name, exist_ok=True)
|
||||
@@ -2,4 +2,7 @@
|
||||
Docparser module
|
||||
"""
|
||||
|
||||
|
||||
from .pt_doc_parser import parse_document
|
||||
|
||||
__all__ = [parse_document]
|
||||
@@ -79,13 +79,13 @@ def make_doc_template(page_size, filename, document_title,
|
||||
header_box, page_box = page_box.split_y(0.75 * inch, direction='d')
|
||||
title_box, report_box = header_box.split_x(3.5 * inch, direction='r')
|
||||
|
||||
on_page_lambda = (lambda c, _:
|
||||
draw_header_footer(c, report_box, title_box,
|
||||
footer_box, title=title,
|
||||
supervisor=supervisor,
|
||||
document_subheader=document_subheader,
|
||||
client=client,
|
||||
doc_title=document_header))
|
||||
def on_page_lambda(c, _):
|
||||
draw_header_footer(c, report_box, title_box,
|
||||
footer_box, title=title,
|
||||
supervisor=supervisor,
|
||||
document_subheader=document_subheader,
|
||||
client=client,
|
||||
doc_title=document_header)
|
||||
|
||||
frames = [Frame(page_box.min_x, page_box.min_y,
|
||||
page_box.width, page_box.height)]
|
||||
Reference in New Issue
Block a user