我想要一个可以从.edl中提取特定文本的Applescipt的帮助
想要提取*FROM CLIP NAME: **SS0340_v102.MOV**
之后的文本,并将此文本列表复制到同一位置的新文本文档中,并命名为与源文档相同。
原始文件:
TITLE: MUP R1 EC V2.3 01-16 VFX 1-29
FCM: NON-DROP FRAME
000001 SS0340_V102.MOV V C 00:00:00:03 00:00:06:13 01:04:44:18 01:04:51:04
*FROM CLIP NAME: SS0340_V102.MOV
000002 US0020_V010.MOV V C 00:00:00:03 00:00:05:15 01:10:36:13 01:10:42:01
*FROM CLIP NAME: US0020_V010.MOV
新文件:
SS0340_V102.MOV,
US0020_V010.MOV,
答案 0 :(得分:1)
尝试:
set inputFile to (choose file) as text
set outputFile to (POSIX path of (inputFile & "::") & "output.txt")
do shell script "grep -Eo '[^[:blank:]]*MOV' " & quoted form of (inputFile's POSIX path) & " | sort -u > " & quoted form of outputFile