import os, Image
def CopyPic (PicName, NewName):
print 'Copying ' + PicName + ' to ' + NewName
os.system ('cp ' + PicName + ' ' + NewName)
picdir = 'demo'
os.system ('rm -r render')
os.mkdir ('render')
files = os.listdir (picdir)
picdir = picdir + '/'
files.sort()
frame = 0
count = len (files)
files.append (files [0])
for idx in range (count):
for chunk in ['block', 'transition']:
ini = open ('temp.ini', 'w')
# ini.write ('Declare=test_mode=1\n')
ini.write ('Antialias=On\n')
ini.write ('Sampling_Method=1\n')
ini.write ('Antialias_Threshold=0.5\n')
ini.write ('Antialias_Depth=2\n')
ini.write ('Width=720\n')
ini.write ('Height=576\n')
ini.write ('Cyclic_Animation=on\n')
ini.write ('Pause_when_Done=off\n')
ini.write ('Input_File_Name=scope.pov\n')
ini.write ('Initial_Frame=' + str (frame) + '\n')
if chunk == 'block':
CopyPic (picdir + files [idx], '1.jpg')
CopyPic (picdir + files [idx], '2.jpg')
frame = frame + (25 * 4) # 4 seconds
else:
# pic 1 has already been copied during the prev step
CopyPic (picdir + files [idx + 1], '2.jpg')
ini.write ('Declare=transition_mode=1\n')
frame = frame + (25 * 11) # 11 seconds
ini.write ('Final_Frame=' + str (frame) + '\n')
l = len (str (frame))
prefix = ''
while (len (prefix) + l) < 6:
prefix = prefix + '0'
ini.write ('Output_File_name=render/p' + prefix + '.png\n')
ini.write ('Post_Frame_Command=./frame.py render/%o\n')
ini.write ('Post_Frame_Command=./clock.py render/%o %n\n')
ini.close ()
os.system ('povray temp.ini')
os.system ('find -type f | grep render/p | sort > list.txt')
os.system ('transcode -o scope.dv -i list.txt --use_rgb -x imlist,null -z -k -g 720x576 -H 0 -y dvraw="qno=0" -F d -Z 720x576 --export_fps 25 --export_asr 2')
os.system ('rm temp.ini 1.jpg 2.jpg list.txt')
I can provide all manner of scripting services:
- PHP
- Interactive elements for web sites or intranets
- Content management for web sites or intranets
- Interfaces between web sites/intranets and databases
- Python
- Custom "mini applications"
- Interactive elements for web sites or intranets
- Automated "background tasks" for systems administration
- Perl
- Interactive elements for web sites or intranets
- Automated "background tasks" for systems administration
- SQL
- Database connectivity for other scripting languages
- TCL
- Custom "mini applications"