pandora_t_for_time/management/commands/update_subtitles.py

21 lines
704 B
Python
Raw Permalink Normal View History

2023-11-16 08:08:03 +00:00
import json
import os
import subprocess
from django.core.management.base import BaseCommand
from django.conf import settings
from ...render import update_subtitles
class Command(BaseCommand):
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')
parser.add_argument('--offset', action='store', dest='offset', default="1024", help='inital offset in pi')
2024-03-22 09:56:50 +00:00
parser.add_argument('--lang', action='store', dest='lang', default=None, help='subtitle language')
2023-11-16 08:08:03 +00:00
def handle(self, **options):
update_subtitles(options)