Skip to content

Commit 052b7bc

Browse files
committed
ffmpeg_editlist: Add --literal-editlist option (old commit, not tested now)
1 parent 57cb53c commit 052b7bc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ffmpeg_editlist.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ def main(argv=sys.argv[1:]):
247247
help="Print out template for a single video, don't do anything else.")
248248
parser.add_argument('--template-workshop', action='store_true',
249249
help="Print out template for a workshop, don't do anything else.")
250+
parser.add_argument('--literal-editlist', action='store_true',
251+
help="Instead of the editlist argument being a file, it is literal YAML to be parsed.")
250252
args = parser.parse_args(argv)
251253

252254
# Printing out templates
@@ -268,7 +270,10 @@ def main(argv=sys.argv[1:]):
268270
all_inputs = set()
269271

270272
# Open the input file. Parse out of markdown if it is markdown:
271-
data = open(args.editlist).read()
273+
if args.literal_editlist:
274+
data = args.editlist
275+
else:
276+
data = open(args.editlist).read()
272277
if '```' in data:
273278
matches = re.findall(r'`{3,}[^\n]*\n(.*?)\n`{3,}', data, re.MULTILINE|re.DOTALL)
274279
#print(matches)

0 commit comments

Comments
 (0)