diff -r f66b0a5ebf40 -r 06a02dd3966f SEESenv/scripts/myrst2xml.py --- a/SEESenv/scripts/myrst2xml.py Thu Feb 25 18:53:51 2010 +0530 +++ b/SEESenv/scripts/myrst2xml.py Fri Feb 26 22:39:39 2010 +0530 @@ -27,14 +27,17 @@ def convert2xml(file_name): """ convert to xml using rst2xml internally """ global chapterno - file=file.split()[0] - name=file.split('/')[-1] + file_name=file_name.split()[0] + name=file_name.split('/')[-1] + + xml_file_temp='/'.join(file_name.split('/')[:-2]) + name='ch'+str(chapterno)+name.split('.')[0] - - print file - xml_file=name+'.xml' - a=open(xml_file,'w') - publish_file(source_path=file, destination_path=xml_file,parser_name='restructuredtext', writer_name='xml') + xml_file=xml_file_temp+'/'+name+'.xml' + print xml_file +# a=open(xml_file,'w') + publish_file(source_path=file_name, destination_path=xml_file,parser_name='restructuredtext', writer_name='xml') + def walk(repo): global chapterno # mainfolder='/home/hg/repos/sttp/' @@ -42,7 +45,7 @@ chapterno+=1 filename=repo+readline convert2xml(filename) - +