mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
139 lines
4.4 KiB
Diff
139 lines
4.4 KiB
Diff
diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt
|
|
index 32b12a3d..581159ca 100644
|
|
--- a/documentation/CMakeLists.txt
|
|
+++ b/documentation/CMakeLists.txt
|
|
@@ -54,7 +54,7 @@ else()
|
|
|
|
endif()
|
|
|
|
-find_package(PythonInterp 2.6)
|
|
+find_package(PythonInterp 3.8)
|
|
|
|
# ReST - HTML documentation
|
|
if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
|
|
diff --git a/documentation/processHtml.py b/documentation/processHtml.py
|
|
index 1a81df59..5e610ea8 100755
|
|
--- a/documentation/processHtml.py
|
|
+++ b/documentation/processHtml.py
|
|
@@ -25,9 +25,8 @@
|
|
|
|
import os
|
|
import sys
|
|
-import string
|
|
import re
|
|
-import HTMLParser
|
|
+import html.parser as HTMLParser
|
|
|
|
class HtmlToTextParser(HTMLParser.HTMLParser):
|
|
def __init__(self):
|
|
@@ -89,10 +88,10 @@ def ReadNavigationTemplate( filePath ):
|
|
try:
|
|
navFile = open( filePath, "r")
|
|
except IOError:
|
|
- print "Could not open file \'"+filePath+"\'"
|
|
+ print("Could not open file \'"+filePath+"\'")
|
|
|
|
with navFile:
|
|
- print "Navigation template: \'"+filePath+"\'"
|
|
+ print("Navigation template: \'"+filePath+"\'")
|
|
navHtml = navFile.read()
|
|
navHtml = StripHTMLComments(navHtml)
|
|
navFile.close()
|
|
@@ -109,7 +108,7 @@ def WriteIndexFile( outputFile, content ):
|
|
except:
|
|
pass
|
|
|
|
- print "Creating Search-Index File : \""+outputFile+"\""
|
|
+ print("Creating Search-Index File : \""+outputFile+"\"")
|
|
|
|
f = open(outputFile, "w")
|
|
f.write(content)
|
|
@@ -117,7 +116,7 @@ def WriteIndexFile( outputFile, content ):
|
|
|
|
#-------------------------------------------------------------------------------
|
|
def Usage():
|
|
- print str(sys.argv[0])+" <input directory> <output directory> <html template>"
|
|
+ print(str(sys.argv[0])+" <input directory> <output directory> <html template>")
|
|
exit(1);
|
|
|
|
|
|
@@ -132,7 +131,7 @@ navTemplate = str(sys.argv[2])
|
|
|
|
navHtml = ReadNavigationTemplate( navTemplate )
|
|
|
|
-print "Scanning : \'"+rootDir+"\'"
|
|
+print("Scanning : \'"+rootDir+"\'")
|
|
|
|
searchIndex = 'var tipuesearch = { "pages": [ '
|
|
|
|
@@ -172,22 +171,22 @@ for root, dirs, files in os.walk(rootDir):
|
|
|
|
# if necessary, insert navigation html
|
|
if (not parser.HasNavigationSection()):
|
|
- loc = string.find(html,"<body>")
|
|
+ loc = html.find("<body>")
|
|
html = html[:loc+6] + navHtml + html[loc+6:]
|
|
|
|
msg += "added navigation"
|
|
|
|
# replace the article title placeholder with the real title
|
|
if title:
|
|
- html = string.replace(html,"OSD_ARTICLE_TITLE", title)
|
|
+ html = html.replace("OSD_ARTICLE_TITLE", title)
|
|
else:
|
|
- html = string.replace(html,"OSD_ARTICLE_TITLE", "")
|
|
+ html = html.replace("OSD_ARTICLE_TITLE", "")
|
|
|
|
f.seek(0)
|
|
f.write(html)
|
|
f.close()
|
|
|
|
- print msg
|
|
+ print(msg)
|
|
|
|
searchIndex = searchIndex + "]};"
|
|
|
|
diff --git a/documentation/processTutorials.py b/documentation/processTutorials.py
|
|
index e6329152..30d3e714 100755
|
|
--- a/documentation/processTutorials.py
|
|
+++ b/documentation/processTutorials.py
|
|
@@ -33,7 +33,7 @@ def ReadFile(inputfile):
|
|
try:
|
|
f = open( inputfile, "r")
|
|
except IOError:
|
|
- print "Could not read file \'"+inputfile+"\'"
|
|
+ print("Could not read file \'"+inputfile+"\'")
|
|
content = f.read()
|
|
f.close()
|
|
return content
|
|
@@ -48,7 +48,7 @@ def WriteToFile(outputfile, content):
|
|
try:
|
|
f = open(outputfile, "w")
|
|
except IOError:
|
|
- print "Could not write file \'"+outputfile+"\'"
|
|
+ print("Could not write file \'"+outputfile+"\'")
|
|
f.write(content)
|
|
f.close()
|
|
|
|
@@ -85,7 +85,7 @@ def Process(srcfile, title):
|
|
|
|
#-------------------------------------------------------------------------------
|
|
def Usage():
|
|
- print str(sys.argv[0])+" <input file> <output file> <title>"
|
|
+ print(str(sys.argv[0])+" <input file> <output file> <title>")
|
|
exit(1);
|
|
|
|
|
|
diff --git a/regression/far_regression/example_createMesh.py b/regression/far_regression/example_createMesh.py
|
|
index 86bfcb37..ba1c6cf7 100644
|
|
--- a/regression/far_regression/example_createMesh.py
|
|
+++ b/regression/far_regression/example_createMesh.py
|
|
@@ -121,7 +121,7 @@ def readPolyFile(path):
|
|
for line in f.readlines():
|
|
polys += line.rstrip()
|
|
except:
|
|
- print 'Cannot read '+str(path)
|
|
+ print('Cannot read '+str(path))
|
|
|
|
polys = eval(polys)
|
|
|