import os
def insert_additional(folder):
f = []
for (dirpath, dirnames, filenames) in os.walk(folder):
f.extend(filenames)
for file in f:
fp = open(folder + "/" + file)
command = fp.read()
fp.close()
command = command.replace('
', '{$pipelinestall}{$examples}\n
')
command = command.replace('
\n {$pipelinestall}{$examples}\n
See Also
')
command = command.replace('
\n {$pipelinestall}{$examples}\n
See Also
')
fp = open(folder + "/" + file, "w")
fp.write(command)
fp.close()
insert_additional("es2")
insert_additional("es3")
insert_additional("gl2")
insert_additional("gl3")
insert_additional("gl4")