mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 08:50:48 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17f17d592a | ||
|
|
b41d92b842 | ||
|
|
dc11a40530 | ||
|
|
b80e593350 | ||
|
|
961d68df21 | ||
|
|
80729443d1 | ||
|
|
c1671f3656 | ||
|
|
6c76827f42 | ||
|
|
1228e2adbe | ||
|
|
ccf6e65210 |
2
.github/workflows/python-package.yml
vendored
2
.github/workflows/python-package.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.7, 3.8, 3.9]
|
||||
python-version: [3.7, 3.8, 3.9, "3.10"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
4
.idea/.gitignore
generated
vendored
4
.idea/.gitignore
generated
vendored
@@ -1,4 +0,0 @@
|
||||
|
||||
# Default ignored files
|
||||
/workspace.xml
|
||||
/tasks.xml
|
||||
19
.idea/dictionaries/jamie.xml
generated
19
.idea/dictionaries/jamie.xml
generated
@@ -1,19 +0,0 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="jamie">
|
||||
<words>
|
||||
<w>adlib</w>
|
||||
<w>bottompadding</w>
|
||||
<w>fmpxml</w>
|
||||
<w>futura</w>
|
||||
<w>leftpadding</w>
|
||||
<w>lineafter</w>
|
||||
<w>linebefore</w>
|
||||
<w>ptulsconv</w>
|
||||
<w>retval</w>
|
||||
<w>smpte</w>
|
||||
<w>subheader</w>
|
||||
<w>timecode</w>
|
||||
<w>timespan</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
9
.idea/dictionaries/jamiehardt.xml
generated
9
.idea/dictionaries/jamiehardt.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="jamiehardt">
|
||||
<words>
|
||||
<w>fmpxmlresult</w>
|
||||
<w>frac</w>
|
||||
<w>mins</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
6
.idea/inspectionProfiles/profiles_settings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (ptulsconv)" project-jdk-type="Python SDK" />
|
||||
<component name="PyPackaging">
|
||||
<option name="earlyReleasesAsUpgrades" value="true" />
|
||||
</component>
|
||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ptulsconv.iml" filepath="$PROJECT_DIR$/.idea/ptulsconv.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
10
.idea/ptulsconv.iml
generated
10
.idea/ptulsconv.iml
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.8 (ptulsconv)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Binary file not shown.
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
72
README.md
72
README.md
@@ -1,7 +1,6 @@
|
||||

|
||||

|
||||
[][pypi]
|
||||

|
||||

|
||||
|
||||
[pypi]: https://pypi.org/project/ptulsconv/
|
||||
@@ -44,77 +43,6 @@ workflows.
|
||||
[avp]: http://www.avid.com/pro-tools
|
||||
|
||||
|
||||
### Adding Detailed Info to Clip Names with Fields
|
||||
|
||||
Track names, track comments, and clip names can also contain meta-tags, or
|
||||
"fields," to add additional columns to the output. Thus, if a clip has the
|
||||
name:
|
||||
|
||||
`Fireworks explosion {note=Replace for final} $V=1 [FX] [DESIGN]`
|
||||
|
||||
The row output for this clip will contain columns for the values:
|
||||
|
||||
|...| PT.Clip.Name | note | V | FX | DESIGN | ... |
|
||||
|---|--------------------|-------------------|---|----|--------|-----|
|
||||
|...| Fireworks explosion| Replace for final | 1 | FX | DESIGN | ... |
|
||||
|
||||
These fields can be defined in the clip name in three ways:
|
||||
* `$NAME=VALUE` creates a field named `NAME` with a one-word value `VALUE`.
|
||||
* `{NAME=VALUE}` creates a field named `NAME` with the value `VALUE`. `VALUE`
|
||||
in this case may contain spaces or any character up to the closing bracket.
|
||||
* `[NAME]` creates a field named `NAME` with a value `NAME`. This can be used
|
||||
to create a boolean-valued field; in the output, clips with the field will
|
||||
have it, and clips without will have the column with an empty value.
|
||||
|
||||
For example, if two clips are named:
|
||||
|
||||
`"Squad fifty-one, what is your status?" [FUTZ] {Ch=Dispatcher} [ADR]`
|
||||
|
||||
`"We are ten-eight at Rampart Hospital." {Ch=Gage} [ADR]`
|
||||
|
||||
The output will contain the range:
|
||||
|
||||
|...| PT.Clip.Name| Ch | FUTZ | ADR | ...|
|
||||
|---|------------|------|---|----|-----|
|
||||
|...| "Squad fifty-one, what is your status?"| Dispatcher | FUTZ | ADR | ... |
|
||||
|...| "We are ten-eight at Rampart Hospital."| Gage | | ADR | ... |
|
||||
|
||||
|
||||
### Fields in Track Names and Markers
|
||||
|
||||
Fields set in track names, and in track comments, will be applied to each clip
|
||||
on that track. If a track comment contains the text `{Dept=Foley}` for
|
||||
example, every clip on that track will have a "Foley" value in a "Dept" column.
|
||||
|
||||
Likewise, fields set on the session name will apply to all clips in the session.
|
||||
|
||||
Fields set in markers, and in marker comments, will be applied to all clips
|
||||
whose finish is *after* that marker. Fields in markers are applied cumulatively
|
||||
from breakfast to dinner in the session. The latest marker applying to a clip
|
||||
has precedence, so if one marker comes after the other, but both define a
|
||||
field, the value in the later marker prevails.
|
||||
|
||||
An important note here is that, always, fields set on the clip name have the
|
||||
highest precedence. If a field is set in a clip name, the same field set on the
|
||||
track, the value set on the clip will prevail.
|
||||
|
||||
### Using `@` to Apply Fields to a Span of Clips
|
||||
|
||||
A clip name beginning with "@" will not be included in the CSV output, but its
|
||||
fields will be applied to clips within its time range on lower tracks.
|
||||
|
||||
If track 1 has a clip named `@ {Sc=1- The House}`, any clips beginning within
|
||||
that range on lower tracks will have a field `Sc` with that value.
|
||||
|
||||
### Using `&` to Combine Clips
|
||||
|
||||
A clip name beginning with "&" will have its parsed clip name appended to the
|
||||
preceding cue, and the fields of following 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.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
@@ -1,38 +1,18 @@
|
||||
.\" Manpage for ptulsconv
|
||||
.\" Contact https://github.com/iluvcapra/ptulsconv
|
||||
.TH ptulsconv 1 "15 May 2020" "0.4.0" "ptulsconv man page"
|
||||
.TH ptulsconv 1 "15 May 2020" "0.8.2" "ptulsconv man page"
|
||||
.SH NAME
|
||||
.BR "ptulsconv" " \- convert
|
||||
.IR "Avid Pro Tools" " text exports"
|
||||
.SH SYNOPSIS
|
||||
ptulsconv [OPTIONS] Export.txt
|
||||
.SH DESCRIPTION
|
||||
Convert a Pro Tools text export into a flat list of clip names with timecodes. A tagging
|
||||
language is interpreted to add columns and type the data. The default output format is
|
||||
an XML file for import into Filemaker Pro.
|
||||
Convert a Pro Tools text export into ADR reports.
|
||||
.SH OPTIONS
|
||||
.IP "-h, --help"
|
||||
show a help message and exit.
|
||||
.TP
|
||||
.RI "-i " "TC"
|
||||
Drop events before this timecode.
|
||||
.TP
|
||||
.RI "-o " "TC"
|
||||
Drop events after this timecode.
|
||||
.TP
|
||||
.RI "-m "
|
||||
Include muted clips.
|
||||
.TP
|
||||
.RI "--json "
|
||||
Output a JSON document instead of XML. (--xform will have no effect.)
|
||||
.TP
|
||||
.RI "--xform " "NAME"
|
||||
Convert the output with a built-in output transform.
|
||||
.TP
|
||||
.RI "--show-available-tags"
|
||||
Print a list of tags that are interpreted and exit.
|
||||
.TP
|
||||
.RI "--show-available-transforms"
|
||||
Print a list of built-in output transforms and exit.
|
||||
.SH AUTHOR
|
||||
Jamie Hardt (contact at https://github.com/iluvcapra/ptulsconv)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from ptulsconv.docparser.ptuls_grammar import protools_text_export_grammar
|
||||
|
||||
__version__ = '0.8.1'
|
||||
__version__ = '0.8.3'
|
||||
__author__ = 'Jamie Hardt'
|
||||
__license__ = 'MIT'
|
||||
|
||||
@@ -71,14 +71,19 @@ def make_doc_template(page_size, filename, document_title,
|
||||
footer_box, page_box = page_box.split_y(0.25 * inch, direction='u')
|
||||
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))
|
||||
|
||||
frames = [Frame(page_box.min_x, page_box.min_y, page_box.width, page_box.height)]
|
||||
|
||||
page_template = PageTemplate(id="Main",
|
||||
frames=[Frame(page_box.min_x, page_box.min_y, page_box.width, page_box.height)],
|
||||
onPage=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=frames,
|
||||
onPage=on_page_lambda)
|
||||
|
||||
pdfmetrics.registerFont(TTFont('Futura', 'Futura.ttc'))
|
||||
doc = ADRDocTemplate(filename,
|
||||
|
||||
3
setup.py
3
setup.py
@@ -25,7 +25,8 @@ setup(name='ptulsconv',
|
||||
'Topic :: Multimedia :: Sound/Audio',
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Development Status :: 4 - Beta",
|
||||
"Topic :: Text Processing :: Filters"],
|
||||
packages=['ptulsconv'],
|
||||
|
||||
Reference in New Issue
Block a user