]> git.parisson.com Git - teleforma.git/commitdiff
Added command to just parse kdenlive markers (test)
authorGael Le Mignot <gael@pilotsystems.net>
Fri, 13 Dec 2019 13:38:21 +0000 (14:38 +0100)
committerGael Le Mignot <gael@pilotsystems.net>
Fri, 13 Dec 2019 13:38:21 +0000 (14:38 +0100)
teleforma/management/commands/teleforma-extract-kdenlive-markers.py [new file with mode: 0644]

diff --git a/teleforma/management/commands/teleforma-extract-kdenlive-markers.py b/teleforma/management/commands/teleforma-extract-kdenlive-markers.py
new file mode 100644 (file)
index 0000000..c2a931d
--- /dev/null
@@ -0,0 +1,16 @@
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+
+from telemeta.util.kdenlive.session import KDEnLiveSession
+
+class Command(BaseCommand):
+    help = "Extract markers from a KDEnlive file"
+    admin_email = 'webmaster@parisson.com'
+    args = 'media_file'
+
+    def handle(self, *args, **options):
+        media_file = args[0]
+        session = KDEnLiveSession(media_file)
+        for mark in session.markers():
+            print mark['session_timecode'], mark['time'], mark['comment']
+