Merged revisions 3264-3278 via svnmerge from

file:///home/developper/svn/phpcompta/branches/rel510

........
  r3268 | danydb | 2010-06-03 00:41:59 +0200 (Thu, 03 Jun 2010) | 1 line
  
  Add script for creating class based on a table
........
  r3269 | danydb | 2010-06-03 00:42:51 +0200 (Thu, 03 Jun 2010) | 1 line
  
  Add script for creating class based on a table
........
  r3271 | danydb | 2010-06-03 22:01:05 +0200 (Thu, 03 Jun 2010) | 10 lines
  
  remove obsolete comment
  =======================
  include/class_lettering.php 
  
  Improve generation of PHP Class for a table
  ===========================================
  dev/create_phpclass.py   
  dev/create_file_table.sql
........
  r3272 | danydb | 2010-06-03 22:30:59 +0200 (Thu, 03 Jun 2010) | 2 lines
  
  remove obsolete
........
  r3273 | danydb | 2010-06-03 22:38:28 +0200 (Thu, 03 Jun 2010) | 1 line
  
  create_phpclass.php improve it
........
  r3274 | danydb | 2010-06-04 01:06:20 +0200 (Fri, 04 Jun 2010) | 2 lines
  
  create_phpclass : add insert, new comment, fix load function
........
  r3275 | danydb | 2010-06-04 14:02:59 +0200 (Fri, 04 Jun 2010) | 1 line
  
  add doc
........
  r3276 | danydb | 2010-06-04 14:44:55 +0200 (Fri, 04 Jun 2010) | 1 line
  
  Generate child object
........
  r3277 | danydb | 2010-06-09 15:57:54 +0200 (Wed, 09 Jun 2010) | 1 line
  
  Remove useless transform.py
........
  r3278 | danydb | 2010-06-09 15:58:26 +0200 (Wed, 09 Jun 2010) | 1 line
  
  Housekeeping : create subfolders
........
This commit is contained in:
Dany De Bontridder 2010-06-09 13:58:58 +00:00
parent 6d140ff76d
commit 110335b08c
14 changed files with 848 additions and 19 deletions

View file

@ -0,0 +1,34 @@
#!/usr/bin/python
# brief : replace the all class widget
#
# This file is a part of PhpCompta under GPL
# Author D. DE BONTRIDDER ddebontridder@yahoo.fr
from transform import *
import sys
import os
import glob
if len(sys.argv) == 1:
print "you need one or more filename as argument"
sys.exit(3)
files=glob.glob(sys.argv[1])
total=len(files)
print "Total file to handle %d " % (len(files))
for file in files:
print "Working on file "+file
new_file=file
old_file=(file+'.old')
os.rename(new_file,old_file)
fnew=open(new_file,'a+')
fold=open(old_file)
lines=fold.readlines()
for line in lines:
buf=Transform(line)
fnew.write(buf.transform())
fnew.close()
fold.close()
total=total-1
print 'finished, remaining %d' % (total)