This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
""" | |
Recently I tried showing tree data contained in `django-treebeard` in the backend as tree data in `react-sortable-tree` in the frontend. | |
https://github.com/frontend-collective/react-sortable-tree | |
https://github.com/django-treebeard/django-treebeard | |
The idea was to keep the backend updated when the tree nodes are manipulated visually by the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import os | |
import sys | |
import re | |
import tempfile | |
def getVideoDetails(filepath): | |
tmpf = tempfile.NamedTemporaryFile() | |
os.system("ffmpeg -i \"%s\" 2> %s" % (filepath, tmpf.name)) | |
lines = tmpf.readlines() |