tweaks
This commit is contained in:
parent
debe1837a7
commit
e84ea31147
4 changed files with 15 additions and 30 deletions
|
|
@ -23,7 +23,7 @@ class Command(BaseCommand):
|
|||
clip = {}
|
||||
durations = []
|
||||
for e in item.models.Item.objects.filter(data__title=i.data['title']):
|
||||
source = i.files.all()[0].data.path
|
||||
source = e.files.all()[0].data.path
|
||||
ext = os.path.splitext(source)[1]
|
||||
type_ = e.data['type'][0].lower()
|
||||
target = os.path.join(prefix, type_, i.data['title'] + ext)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from ...render import compose, render
|
|||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'generate symlinks to clips and clips.json'
|
||||
help = 'genrate kdenlive porject and render'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--prefix', action='store', dest='prefix', default="/srv/t_for_time", help='prefix to build clips in')
|
||||
|
|
@ -23,6 +23,7 @@ class Command(BaseCommand):
|
|||
with open(os.path.join(prefix, "clips.json")) as fd:
|
||||
clips = json.load(fd)
|
||||
scene = compose(clips, target=target, base=base)
|
||||
render(prefix, scene)
|
||||
render(prefix, scene, 'scene-%s-' % base)
|
||||
with open(os.path.join(prefix, 'scene-%s.json' % base), 'w') as fd:
|
||||
json.dump(scene, fd, indent=2, ensure_ascii=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue