diff options
author | Sasank Chilamkurthy <sasankchilamkurthy@gmail.com> | 2020-09-12 19:11:00 +0530 |
---|---|---|
committer | Sasank Chilamkurthy <sasankchilamkurthy@gmail.com> | 2020-09-12 19:11:00 +0530 |
commit | 31f6973ab7c2adf9b74acc1fef45282b1bb8b217 (patch) | |
tree | 4b50c711a3d0ae0707db989804b2f38e4b462488 | |
parent | bdac8f8a858b375945ba42f45cd23b3790a52146 (diff) | |
download | swig-31f6973ab7c2adf9b74acc1fef45282b1bb8b217.tar.gz |
make makechap-no-numbering.py work with python3
-rw-r--r-- | Doc/Manual/makechap-no-numbering.py | 8 | ||||
-rw-r--r-- | SphinxDocs/README.md | 1 | ||||
-rwxr-xr-x | SphinxDocs/docdiffer.sh | 2 | ||||
-rw-r--r-- | SphinxDocs/source/Manual/Allegrocl.rst | 2 | ||||
-rw-r--r-- | SphinxDocs/source/Manual/SWIGPlus.rst | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/Doc/Manual/makechap-no-numbering.py b/Doc/Manual/makechap-no-numbering.py index 9c8959840..bb59f2c4c 100644 --- a/Doc/Manual/makechap-no-numbering.py +++ b/Doc/Manual/makechap-no-numbering.py @@ -58,11 +58,11 @@ def getheadingtext(m, s): ############################################################################### if len(sys.argv) != 3: - print "usage: makechap.py filename num" + print("usage: makechap.py filename num") sys.exit(1) filename = sys.argv[1] -filenamebase = string.split(filename,".")[0] +filenamebase = filename.split(".")[0] num = int(sys.argv[2]) section = 0 @@ -223,6 +223,6 @@ open(filename,"w").write(data) # Print the TOC data to stdout correcting the anchor links for external referencing index = index.replace("<li><a href=\"#","<li><a href=\"%s#" % filename) -print """<h3><a href="%s#%s">%s</a></h3>\n""" % (filename,filenamebase,name) -print index +print("""<h3><a href="%s#%s">%s</a></h3>\n""" % (filename,filenamebase,name)) +print(index) diff --git a/SphinxDocs/README.md b/SphinxDocs/README.md index 985b168b6..84d923921 100644 --- a/SphinxDocs/README.md +++ b/SphinxDocs/README.md @@ -24,3 +24,4 @@ with rst and sphinx: * reStructuredText Primer: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html * Sphinx Quickstart: https://www.sphinx-doc.org/en/master/usage/quickstart.html * Getting started with Sphinx: https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html +* How to link/reference b/w docs: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role diff --git a/SphinxDocs/docdiffer.sh b/SphinxDocs/docdiffer.sh index 37d287e32..ba36167b5 100755 --- a/SphinxDocs/docdiffer.sh +++ b/SphinxDocs/docdiffer.sh @@ -53,7 +53,7 @@ python ../Doc/Manual/makechap-no-numbering.py /tmp/$file-old.html 0 > /dev/null # Did not use html2text --body-width=0 as not available in Ubuntu's html2text # https://github.com/aaronsw/html2text probably should be used html2text /tmp/$file-old.html > /tmp/$file-old.txt -rst2html ../SphinxDocs/source/Manual/$file.rst > /tmp/$file-new.html +rst2html.py ../SphinxDocs/source/Manual/$file.rst > /tmp/$file-new.html # The sed below removes one * in headings. # Done because the original html headings are one more than in the original than the new html. diff --git a/SphinxDocs/source/Manual/Allegrocl.rst b/SphinxDocs/source/Manual/Allegrocl.rst index 43cdcdfb1..bd702f6a6 100644 --- a/SphinxDocs/source/Manual/Allegrocl.rst +++ b/SphinxDocs/source/Manual/Allegrocl.rst @@ -1012,7 +1012,7 @@ SWIG provides support for dealing with templates, but by default, it will not generate any member variable or function wrappers for templated classes. In order to create these wrappers, you need to explicitly tell SWIG to instantiate them. This is done via the -:doc:```%template``<SWIGPlus>` directive. +:ref:`%template<cpp_templates>` directive. Implicit Template instantiation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/SphinxDocs/source/Manual/SWIGPlus.rst b/SphinxDocs/source/Manual/SWIGPlus.rst index f950ef19c..d87942fc0 100644 --- a/SphinxDocs/source/Manual/SWIGPlus.rst +++ b/SphinxDocs/source/Manual/SWIGPlus.rst @@ -2515,6 +2515,8 @@ further details. used to extend a structure with more than just methods, a more suitable directive name has been chosen. +.. _cpp_templates: + Templates -------------- |