mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update docs-header.py
This commit is contained in:
parent
d707a4775c
commit
6ac452ff15
@ -1,6 +1,7 @@
|
|||||||
# import required module
|
# import required module
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
|
import codecs
|
||||||
|
|
||||||
# assign directory
|
# assign directory
|
||||||
directory = '.'
|
directory = '.'
|
||||||
@ -15,8 +16,9 @@ with open( os.path.dirname(__file__) + '/docs-header.html', 'r') as file:
|
|||||||
# that directory
|
# that directory
|
||||||
files = Path(directory).glob('*.html')
|
files = Path(directory).glob('*.html')
|
||||||
for file in files:
|
for file in files:
|
||||||
print(file)
|
#print(file)
|
||||||
with open(file, 'r') as fileread:
|
#with open(file, 'r') as fileread:
|
||||||
|
with codecs.open(file, 'r', encoding='utf-8', errors='ignore') as fileread:
|
||||||
filedata = fileread.read()
|
filedata = fileread.read()
|
||||||
# Replace the target string
|
# Replace the target string
|
||||||
filedata = filedata.replace( '<head>', newhead )
|
filedata = filedata.replace( '<head>', newhead )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user