第一次提交

This commit is contained in:
dengtongyu committed 2018-12-03 17:31:53 +08:00
commit 8121362a03
4412 files changed
+1091845

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#! /usr/bin/python
#-- coding: GBK --
import sys,os,string
def is_embeded( html, code ):
return html.rfind( code ) >= 0
def embed_uml_to_html( ):
fhtml = "asdoc-output/package-summary.html"
embedcode = "<img src=\"yyuml.jpg\"/>"
htmlContent = ""
try:
fl = open( fhtml, "r" )
htmlContent = fl.read( );
fl.close()
except IOError as e:
print fhtml + e.strerror;
return
if not is_embeded( htmlContent, embedcode ):
if htmlContent.find( "<center" ) >= 0:
htmlContent = htmlContent.replace( "<center", embedcode + "<center" )
fl = open( fhtml, "w" )
fl.write(htmlContent);
print "success!"
fl.close()
if __name__ == "__main__":
embed_uml_to_html()