Script that helps recording digital painting with recordmydesktop.
Starts recording - filename is time/date.ogv.
Loops and stops recording every hour.
Painting folder is hostname-paint
currently set to Desktop. Not unique enough.
In [37]:
import os
import arrow
import json
import walkdir
import json
import socket
import getpass
In [ ]:
In [34]:
prinfold = (socket.gethostname() + '-paint')
In [40]:
getusr = getpass.getuser()
In [41]:
getusr
Out[41]:
In [ ]:
In [36]:
prinfold
Out[36]:
In [ ]:
In [4]:
mytim = arrow.now()
In [5]:
mytim
Out[5]:
In [6]:
mytimdat = mytim.datetime
In [7]:
mytimdat.minute
Out[7]:
In [8]:
timtest = str(mytimdat.hour) + str(mytimdat.minute) + str(mytimdat.second)
In [9]:
timtest
Out[9]:
In [10]:
timdatez = str(mytimdat.year) + str(mytimdat.month) + str(mytimdat.day)
In [ ]:
In [11]:
timdatez
Out[11]:
In [12]:
fulldtiz = str(timtest) + str(timdatez)
In [13]:
fulldtiz
Out[13]:
In [50]:
getusr
Out[50]:
In [51]:
prinfold
Out[51]:
In [16]:
#files = file_paths(filtered_walk('/home/wcmckee/Desktop/', depth=100, included_files=['*.mp4']))
In [54]:
rcordcmd = ('recordmydesktop -o /home/' + getusr + '/' + prinfold + '/' + (fulldtiz) + '.ogv --no-sound --on-the-fly-encoding')
In [55]:
rcordcmd
Out[55]:
In [43]:
#Make a meta file that contains file info.
#
In [19]:
desklis = os.listdir('/home/wcmckee/Desktop')
In [ ]:
In [20]:
opmeta = open('/home/wcmckee/Desktop/' + fulldtiz + '.json', 'w')
In [21]:
recordict = dict()
In [22]:
recordict.update({'videofile': '/home/wcmckee/Desktop/' + fulldtiz + '.ogv', 'date': timdatez, 'time': timtest })
In [23]:
for dlis in desklis:
if '.xcf' in dlis:
print dlis
recordict.update({'xcffile' : dlis})
#print dlis
In [24]:
mpz = json.dumps(recordict)
In [25]:
mpz
Out[25]:
In [26]:
jsdrop = json.loads(mpz)
In [27]:
jsdrop
Out[27]:
In [ ]:
In [28]:
recordict
#I want to get the data on the image name/layer name currently open in GIMP. Export off GIMP filename/active layer name
#and open it up in this folder.
Out[28]:
In [29]:
rcordcmd
Out[29]:
Copyright is a barrier. What is your views on open source licences such as creative commons?
In [30]:
os.system(rcordcmd)
Out[30]:
In [ ]: