Added VapourSynth script.

This commit is contained in:
Yuuki Chan 2023-02-26 20:36:43 +09:00
commit 4e5c76b639

View file

@ -0,0 +1,20 @@
"""bookmarks_to_avs_trimps.py: generates Avisynth trims from VapourSynth Bookmarks."""
__author__ = "Yuuki-chan"
__copyright__ = "Copyright 2022, Raiza.dev"
import sys
if sys.argv[1].endswith('.bookmarks'):
trimz = []
with open(sys.argv[1], mode='r') as ff:
trims = ff.read().split(', ')
for trim in range(0, len(trims), 2):
trimz.append(f'Trim({trims[trim]}, {trims[trim+1]})')
with open(f'{sys.argv[1]}.trims.txt', mode='w') as ff:
ff.write('++'.join(trimz))