commit ae181746aff7312f77790527a1acc82cfb3bf4a8
parent 498d77cbcaf9f47e6bd9b080831bb1850c5021b3
Author: rbckman <rbckman@localhost.localdomain>
Date: Thu, 16 Aug 2018 10:52:56 +0300
changed default overlay blob to rpi 3B
Diffstat:
3 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/random/organize.py b/random/organize.py
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+
+import web
+import os
+import time
+
+# Get path of the current dir, then use it as working directory:
+rundir = os.path.dirname(__file__)
+if rundir != '':
+ os.chdir(rundir)
+
+filmfolder = '/home/pi/Videos/'
+filmname = 'test'
+
+scenes = os.walk(filmfolder + filmname).next()[1]
+
+# Takes
+for i in sorted(scenes):
+ shots = os.walk(filmfolder + filmname + '/' + i).next()[1]
+ for p in sorted(shots):
+ takes = os.walk(filmfolder + filmname + '/' + i + '/' + p).next()[2]
+ if len(takes) == 0:
+ print 'no takes in this shot, removing shot..'
+ os.system('rm -r ' + filmfolder + filmname + '/' + i + '/' + p)
+ organized_nr = 1
+ for s in sorted(takes):
+ if '.mp4' in s:
+ print s
+ unorganized_nr = int(s[4:-4])
+ if organized_nr == unorganized_nr:
+ print 'correct'
+ if organized_nr != unorganized_nr:
+ print 'false, correcting from ' + str(unorganized_nr) + ' to ' + str(organized_nr)
+ os.system('mv ' + filmfolder + filmname + '/' + i + '/' + p + '/take' + str(unorganized_nr).zfill(3) + '.mp4 ' + filmfolder + filmname + '/' + i + '/' + p + '/take' + str(organized_nr).zfill(3) + '.mp4')
+ organized_nr = organized_nr + 1
+# Shots
+for i in sorted(scenes):
+ shots = os.walk(filmfolder + filmname + '/' + i).next()[1]
+ if len(shots) == 0:
+ print 'no shots in this scene, removing scene..'
+ os.system('rm -r ' + filmfolder + filmname + '/' + i)
+ organized_nr = 1
+ for p in sorted(shots):
+ if 'shot' in p:
+ print p
+ unorganized_nr = int(p[-3:])
+ if organized_nr == unorganized_nr:
+ print 'correct'
+ if organized_nr != unorganized_nr:
+ print 'false, correcting from ' + str(unorganized_nr) + ' to ' + str(organized_nr)
+ os.system('mv ' + filmfolder + filmname + '/' + i + '/shot' + str(unorganized_nr).zfill(3) + ' ' + filmfolder + filmname + '/' + i + '/shot' + str(organized_nr).zfill(3))
+ organized_nr = organized_nr + 1
+
+# Scenes
+organized_nr = 1
+for i in sorted(scenes):
+ if 'scene' in i:
+ print i
+ unorganized_nr = int(i[-3:])
+ if organized_nr == unorganized_nr:
+ print 'correct'
+ if organized_nr != unorganized_nr:
+ print 'false, correcting from ' + str(unorganized_nr) + ' to ' + str(organized_nr)
+ os.system('mv ' + filmfolder + filmname + '/scene' + str(unorganized_nr).zfill(3) + ' ' + filmfolder + filmname + '/scene' + str(organized_nr).zfill(3))
+ organized_nr = organized_nr + 1
+
+print 'Organizer done! Everything is tidy'
diff --git a/rpihdtft/dt-blob.bin b/rpihdtft/dt-blob-3bplus.bin
Binary files differ.
diff --git a/rpihdtft/dt-blob.bin b/rpihdtft/dt-blob.bin
Binary files differ.