From 9ab1012158416c895e5a0e8332951e6f98626cf9 Mon Sep 17 00:00:00 2001 From: Jonathan Guyer Date: Thu, 25 Sep 2014 22:04:01 -0400 Subject: [PATCH] change reST extension from .txt to .rst GitHub automatically renders reST in files ending in .rst, but not .txt Addresses #416 --- DISCLAIMER.txt => DISCLAIMER.rst | 0 INSTALLATION.txt => INSTALLATION.rst | 0 LICENSE.txt => LICENSE.rst | 0 MANIFEST-WINDOWS.in | 6 ++--- MANIFEST.in | 6 ++--- README.txt => README.rst | 0 .../{ADMINISTRATA.txt => ADMINISTRATA.rst} | 0 documentation/{API.txt => API.rst} | 0 documentation/{BUILDBOT.txt => BUILDBOT.rst} | 0 .../{CODESPEED.txt => CODESPEED.rst} | 0 documentation/{CREDITS.txt => CREDITS.rst} | 0 .../{EFFICIENCY.txt => EFFICIENCY.rst} | 0 documentation/{FAQ.txt => FAQ.rst} | 0 documentation/{GIT.txt => GIT.rst} | 0 .../{GUIDELINES.txt => GUIDELINES.rst} | 0 documentation/{MAIL.txt => MAIL.rst} | 0 .../{PUBLICATIONS.txt => PUBLICATIONS.rst} | 0 .../{RESOURCES.txt => RESOURCES.rst} | 0 documentation/{SOLVERS.txt => SOLVERS.rst} | 0 documentation/{USAGE.txt => USAGE.rst} | 0 documentation/{VIEWERS.txt => VIEWERS.rst} | 0 documentation/{VKML.txt => VKML.rst} | 0 documentation/conf.py | 26 +++++++++---------- documentation/{contents.txt => contents.rst} | 0 documentation/{design.txt => design.rst} | 0 documentation/{glossary.txt => glossary.rst} | 0 .../{introduction.txt => introduction.rst} | 0 documentation/{manual.txt => manual.rst} | 0 .../numerical/{discret.txt => discret.rst} | 0 .../numerical/{equation.txt => equation.rst} | 0 .../numerical/{index.txt => index.rst} | 0 .../numerical/{scheme.txt => scheme.rst} | 0 ...erences-latex.txt => references-latex.rst} | 0 .../{references.txt => references.rst} | 0 .../tutorial/{index.txt => index.rst} | 0 examples/{README.txt => README.rst} | 0 examples/cahnHilliard/generated/.gitignore | 2 +- .../cahnHilliard/{index.txt => index.rst} | 0 examples/convection/{index.txt => index.rst} | 0 examples/diffusion/generated/.gitignore | 2 +- examples/diffusion/{index.txt => index.rst} | 0 examples/flow/generated/.gitignore | 2 +- examples/flow/{index.txt => index.rst} | 0 .../electroChem/{README.txt => README.rst} | 0 examples/levelSet/generated/.gitignore | 2 +- examples/levelSet/{index.txt => index.rst} | 0 examples/phase/generated/.gitignore | 2 +- examples/phase/{index.txt => index.rst} | 0 .../reactiveWetting/{index.txt => index.rst} | 0 examples/updating/{index.txt => index.rst} | 0 fipy/generated/.gitignore | 2 +- setup.py | 10 +++---- 52 files changed, 30 insertions(+), 30 deletions(-) rename DISCLAIMER.txt => DISCLAIMER.rst (100%) rename INSTALLATION.txt => INSTALLATION.rst (100%) rename LICENSE.txt => LICENSE.rst (100%) rename README.txt => README.rst (100%) rename documentation/{ADMINISTRATA.txt => ADMINISTRATA.rst} (100%) rename documentation/{API.txt => API.rst} (100%) rename documentation/{BUILDBOT.txt => BUILDBOT.rst} (100%) rename documentation/{CODESPEED.txt => CODESPEED.rst} (100%) rename documentation/{CREDITS.txt => CREDITS.rst} (100%) rename documentation/{EFFICIENCY.txt => EFFICIENCY.rst} (100%) rename documentation/{FAQ.txt => FAQ.rst} (100%) rename documentation/{GIT.txt => GIT.rst} (100%) rename documentation/{GUIDELINES.txt => GUIDELINES.rst} (100%) rename documentation/{MAIL.txt => MAIL.rst} (100%) rename documentation/{PUBLICATIONS.txt => PUBLICATIONS.rst} (100%) rename documentation/{RESOURCES.txt => RESOURCES.rst} (100%) rename documentation/{SOLVERS.txt => SOLVERS.rst} (100%) rename documentation/{USAGE.txt => USAGE.rst} (100%) rename documentation/{VIEWERS.txt => VIEWERS.rst} (100%) rename documentation/{VKML.txt => VKML.rst} (100%) rename documentation/{contents.txt => contents.rst} (100%) rename documentation/{design.txt => design.rst} (100%) rename documentation/{glossary.txt => glossary.rst} (100%) rename documentation/{introduction.txt => introduction.rst} (100%) rename documentation/{manual.txt => manual.rst} (100%) rename documentation/numerical/{discret.txt => discret.rst} (100%) rename documentation/numerical/{equation.txt => equation.rst} (100%) rename documentation/numerical/{index.txt => index.rst} (100%) rename documentation/numerical/{scheme.txt => scheme.rst} (100%) rename documentation/{references-latex.txt => references-latex.rst} (100%) rename documentation/{references.txt => references.rst} (100%) rename documentation/tutorial/{index.txt => index.rst} (100%) rename examples/{README.txt => README.rst} (100%) rename examples/cahnHilliard/{index.txt => index.rst} (100%) rename examples/convection/{index.txt => index.rst} (100%) rename examples/diffusion/{index.txt => index.rst} (100%) rename examples/flow/{index.txt => index.rst} (100%) rename examples/levelSet/electroChem/{README.txt => README.rst} (100%) rename examples/levelSet/{index.txt => index.rst} (100%) rename examples/phase/{index.txt => index.rst} (100%) rename examples/reactiveWetting/{index.txt => index.rst} (100%) rename examples/updating/{index.txt => index.rst} (100%) diff --git a/DISCLAIMER.txt b/DISCLAIMER.rst similarity index 100% rename from DISCLAIMER.txt rename to DISCLAIMER.rst diff --git a/INSTALLATION.txt b/INSTALLATION.rst similarity index 100% rename from INSTALLATION.txt rename to INSTALLATION.rst diff --git a/LICENSE.txt b/LICENSE.rst similarity index 100% rename from LICENSE.txt rename to LICENSE.rst diff --git a/MANIFEST-WINDOWS.in b/MANIFEST-WINDOWS.in index 39597a6af9..ebfd371b3b 100644 --- a/MANIFEST-WINDOWS.in +++ b/MANIFEST-WINDOWS.in @@ -1,10 +1,10 @@ -include *.txt +include *.rst -recursive-include examples *.py *.msh *.gz *.txt +recursive-include examples *.py *.msh *.gz *.rst recursive-include fipy *.msh include FiPy-*.win32.exe -recursive-include documentation/ *.txt +recursive-include documentation/ *.rst recursive-exclude examples *.png *.pdf recursive-exclude fipy *.png *.pdf diff --git a/MANIFEST.in b/MANIFEST.in index 53def6c521..4a9fdc10f8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ -include *.txt -# include MANIFEST MANIFEST.in *.txt +include *.rst +# include MANIFEST MANIFEST.in *.rst -recursive-include documentation *.txt +recursive-include documentation *.rst recursive-exclude examples *.png *.pdf recursive-exclude fipy *.png *.pdf diff --git a/README.txt b/README.rst similarity index 100% rename from README.txt rename to README.rst diff --git a/documentation/ADMINISTRATA.txt b/documentation/ADMINISTRATA.rst similarity index 100% rename from documentation/ADMINISTRATA.txt rename to documentation/ADMINISTRATA.rst diff --git a/documentation/API.txt b/documentation/API.rst similarity index 100% rename from documentation/API.txt rename to documentation/API.rst diff --git a/documentation/BUILDBOT.txt b/documentation/BUILDBOT.rst similarity index 100% rename from documentation/BUILDBOT.txt rename to documentation/BUILDBOT.rst diff --git a/documentation/CODESPEED.txt b/documentation/CODESPEED.rst similarity index 100% rename from documentation/CODESPEED.txt rename to documentation/CODESPEED.rst diff --git a/documentation/CREDITS.txt b/documentation/CREDITS.rst similarity index 100% rename from documentation/CREDITS.txt rename to documentation/CREDITS.rst diff --git a/documentation/EFFICIENCY.txt b/documentation/EFFICIENCY.rst similarity index 100% rename from documentation/EFFICIENCY.txt rename to documentation/EFFICIENCY.rst diff --git a/documentation/FAQ.txt b/documentation/FAQ.rst similarity index 100% rename from documentation/FAQ.txt rename to documentation/FAQ.rst diff --git a/documentation/GIT.txt b/documentation/GIT.rst similarity index 100% rename from documentation/GIT.txt rename to documentation/GIT.rst diff --git a/documentation/GUIDELINES.txt b/documentation/GUIDELINES.rst similarity index 100% rename from documentation/GUIDELINES.txt rename to documentation/GUIDELINES.rst diff --git a/documentation/MAIL.txt b/documentation/MAIL.rst similarity index 100% rename from documentation/MAIL.txt rename to documentation/MAIL.rst diff --git a/documentation/PUBLICATIONS.txt b/documentation/PUBLICATIONS.rst similarity index 100% rename from documentation/PUBLICATIONS.txt rename to documentation/PUBLICATIONS.rst diff --git a/documentation/RESOURCES.txt b/documentation/RESOURCES.rst similarity index 100% rename from documentation/RESOURCES.txt rename to documentation/RESOURCES.rst diff --git a/documentation/SOLVERS.txt b/documentation/SOLVERS.rst similarity index 100% rename from documentation/SOLVERS.txt rename to documentation/SOLVERS.rst diff --git a/documentation/USAGE.txt b/documentation/USAGE.rst similarity index 100% rename from documentation/USAGE.txt rename to documentation/USAGE.rst diff --git a/documentation/VIEWERS.txt b/documentation/VIEWERS.rst similarity index 100% rename from documentation/VIEWERS.txt rename to documentation/VIEWERS.rst diff --git a/documentation/VKML.txt b/documentation/VKML.rst similarity index 100% rename from documentation/VKML.txt rename to documentation/VKML.rst diff --git a/documentation/conf.py b/documentation/conf.py index 3626729ab1..5d49cf9ed3 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -40,7 +40,7 @@ templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.txt' +source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8' @@ -81,15 +81,15 @@ # List of directories, relative to source directory, that shouldn't be searched # for source files. -exclude_patterns = ['fipy/generated/modules.txt', - 'fipy/generated/__init__.txt', +exclude_patterns = ['fipy/generated/modules.rst', + 'fipy/generated/__init__.rst', 'build', 'dist', 'FiPy.egg-info', 'documentation/_build', - 'documentation/tutorial/package/generated/modules.txt', + 'documentation/tutorial/package/generated/modules.rst', 'documentation/sphinxext', - 'documentation/sphinxext/bibtex/bibstuff/examples/*.txt', + 'documentation/sphinxext/bibtex/bibstuff/examples/*.rst', '**/.svn', '**/.git'] @@ -115,14 +115,14 @@ autoclass_content = "both" -autosummary_generate = ['examples/diffusion/index.txt', - 'examples/convection/index.txt', - 'examples/phase/index.txt', - 'examples/levelSet/index.txt', - 'examples/cahnHilliard/index.txt', - 'examples/flow/index.txt', - 'examples/reactiveWetting/index.txt', - 'examples/updating/index.txt'] +autosummary_generate = ['examples/diffusion/index.rst', + 'examples/convection/index.rst', + 'examples/phase/index.rst', + 'examples/levelSet/index.rst', + 'examples/cahnHilliard/index.rst', + 'examples/flow/index.rst', + 'examples/reactiveWetting/index.rst', + 'examples/updating/index.rst'] autodoc_member_order = 'alphabetical' diff --git a/documentation/contents.txt b/documentation/contents.rst similarity index 100% rename from documentation/contents.txt rename to documentation/contents.rst diff --git a/documentation/design.txt b/documentation/design.rst similarity index 100% rename from documentation/design.txt rename to documentation/design.rst diff --git a/documentation/glossary.txt b/documentation/glossary.rst similarity index 100% rename from documentation/glossary.txt rename to documentation/glossary.rst diff --git a/documentation/introduction.txt b/documentation/introduction.rst similarity index 100% rename from documentation/introduction.txt rename to documentation/introduction.rst diff --git a/documentation/manual.txt b/documentation/manual.rst similarity index 100% rename from documentation/manual.txt rename to documentation/manual.rst diff --git a/documentation/numerical/discret.txt b/documentation/numerical/discret.rst similarity index 100% rename from documentation/numerical/discret.txt rename to documentation/numerical/discret.rst diff --git a/documentation/numerical/equation.txt b/documentation/numerical/equation.rst similarity index 100% rename from documentation/numerical/equation.txt rename to documentation/numerical/equation.rst diff --git a/documentation/numerical/index.txt b/documentation/numerical/index.rst similarity index 100% rename from documentation/numerical/index.txt rename to documentation/numerical/index.rst diff --git a/documentation/numerical/scheme.txt b/documentation/numerical/scheme.rst similarity index 100% rename from documentation/numerical/scheme.txt rename to documentation/numerical/scheme.rst diff --git a/documentation/references-latex.txt b/documentation/references-latex.rst similarity index 100% rename from documentation/references-latex.txt rename to documentation/references-latex.rst diff --git a/documentation/references.txt b/documentation/references.rst similarity index 100% rename from documentation/references.txt rename to documentation/references.rst diff --git a/documentation/tutorial/index.txt b/documentation/tutorial/index.rst similarity index 100% rename from documentation/tutorial/index.txt rename to documentation/tutorial/index.rst diff --git a/examples/README.txt b/examples/README.rst similarity index 100% rename from examples/README.txt rename to examples/README.rst diff --git a/examples/cahnHilliard/generated/.gitignore b/examples/cahnHilliard/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/examples/cahnHilliard/generated/.gitignore +++ b/examples/cahnHilliard/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/examples/cahnHilliard/index.txt b/examples/cahnHilliard/index.rst similarity index 100% rename from examples/cahnHilliard/index.txt rename to examples/cahnHilliard/index.rst diff --git a/examples/convection/index.txt b/examples/convection/index.rst similarity index 100% rename from examples/convection/index.txt rename to examples/convection/index.rst diff --git a/examples/diffusion/generated/.gitignore b/examples/diffusion/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/examples/diffusion/generated/.gitignore +++ b/examples/diffusion/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/examples/diffusion/index.txt b/examples/diffusion/index.rst similarity index 100% rename from examples/diffusion/index.txt rename to examples/diffusion/index.rst diff --git a/examples/flow/generated/.gitignore b/examples/flow/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/examples/flow/generated/.gitignore +++ b/examples/flow/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/examples/flow/index.txt b/examples/flow/index.rst similarity index 100% rename from examples/flow/index.txt rename to examples/flow/index.rst diff --git a/examples/levelSet/electroChem/README.txt b/examples/levelSet/electroChem/README.rst similarity index 100% rename from examples/levelSet/electroChem/README.txt rename to examples/levelSet/electroChem/README.rst diff --git a/examples/levelSet/generated/.gitignore b/examples/levelSet/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/examples/levelSet/generated/.gitignore +++ b/examples/levelSet/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/examples/levelSet/index.txt b/examples/levelSet/index.rst similarity index 100% rename from examples/levelSet/index.txt rename to examples/levelSet/index.rst diff --git a/examples/phase/generated/.gitignore b/examples/phase/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/examples/phase/generated/.gitignore +++ b/examples/phase/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/examples/phase/index.txt b/examples/phase/index.rst similarity index 100% rename from examples/phase/index.txt rename to examples/phase/index.rst diff --git a/examples/reactiveWetting/index.txt b/examples/reactiveWetting/index.rst similarity index 100% rename from examples/reactiveWetting/index.txt rename to examples/reactiveWetting/index.rst diff --git a/examples/updating/index.txt b/examples/updating/index.rst similarity index 100% rename from examples/updating/index.txt rename to examples/updating/index.rst diff --git a/fipy/generated/.gitignore b/fipy/generated/.gitignore index 2211df63dd..30d85567b5 100644 --- a/fipy/generated/.gitignore +++ b/fipy/generated/.gitignore @@ -1 +1 @@ -*.txt +*.rst diff --git a/setup.py b/setup.py index 3ee7f89782..cfa2b17ee2 100644 --- a/setup.py +++ b/setup.py @@ -93,9 +93,9 @@ def run (self): sphinx_args = ['-a', '-E'] + sphinx_args apidoc_args = ['--force'] + apidoc_args - apidoc.main(['sphinx-apidoc', '--output-dir=fipy/generated', '--suffix=txt'] + apidoc.main(['sphinx-apidoc', '--output-dir=fipy/generated', '--suffix=rst'] + apidoc_args + ['fipy']) - apidoc.main(['sphinx-apidoc', '--output-dir=documentation/tutorial/package/generated', '--suffix=txt'] + apidoc.main(['sphinx-apidoc', '--output-dir=documentation/tutorial/package/generated', '--suffix=rst'] + apidoc_args + ['documentation/tutorial/package']) if self.html: @@ -109,7 +109,7 @@ def run (self): from docutils.core import publish_file for xtra in ("LICENSE", "DISCLAIMER"): - publish_file(source_path="%s.txt" % xtra, + publish_file(source_path="%s.rst" % xtra, destination_path=os.path.join(outdir, "%s.tex" % xtra), reader_name='standalone', parser_name='restructuredtext', @@ -193,14 +193,14 @@ def run(self): webbrowser.open("http://matforge.org/fipy/wiki/FiPyManual?action=edit", autoraise=False) try: - f = open('README.txt', 'r') + f = open('README.rst', 'r') long_description = '\n' + f.read() + '\n' f.close() except IOError, e: long_description = '' try: - f = open('LICENSE.txt', 'r') + f = open('LICENSE.rst', 'r') license = '\n' + ''.join([' '*8 + l for l in f]) f.close() except IOError, e: