If suffix balise is not existent, add it event if not creating a skeleton.

This commit is contained in:
Maxime Gimeno 2017-10-24 17:42:50 +02:00
parent 56a378c739
commit f8d228a090
1 changed files with 8 additions and 1 deletions

View File

@ -195,7 +195,6 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;}
signature='<p id="suffix"> Generated with the command line</p><code> python {script_args}</p><p> by {user_name}@{host_name} at {date_time} </code></html>'.format(
user_name=getpass.getuser(), host_name=socket.gethostname(), date_time=time.ctime(), script_args=args_list)
f.write(signature)
print(signature)
with open(diff_file, 'r') as myfile:
diff=myfile.read()
if not diff:
@ -217,6 +216,14 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;}
else:
sys.stderr.write("Warning: the directory " + publish_dir + dir_to_remove + " does not exist or is not writable!\n")
revs.eq(k).remove()
script_info=d('#suffix')
if script_info.text()=='':
args_list=''
for arg in sys.argv[0:]:
args_list+=arg+' '
signature='<html><p id="suffix"> Generated with the command line</p><code> python {script_args}</p><p> by {user_name}@{host_name} at {date_time} </code></html>'.format(
user_name=getpass.getuser(), host_name=socket.gethostname(), date_time=time.ctime(), script_args=args_list)
d('table').after(signature)
write_out_html(d, publish_dir + 'index.html')
try:
#copy log files