Added VapourSynth script.
This commit is contained in:
commit
4e5c76b639
1 changed files with 20 additions and 0 deletions
20
VapourSynth/bookmarks_to_avs_trims.py
Normal file
20
VapourSynth/bookmarks_to_avs_trims.py
Normal 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))
|
Loading…
Add table
Reference in a new issue