How to enable Sphinx documentation in Pycharm

Sphinx is a tool that makes it easy to create documentation. It was originally created for the new Python documentation, and enables to create it on html, LaTeX or linkcheck.
See this blog for more information about Shpinx

First, you need install Shpinx it on your system:

pip install Sphinx

Now, you need configurate the project folder from Pycharm on Tools/Sphinx Quickstart

You should get this error:

ReStructuredText Error 
No sdk specified

To solve it, use the same solution that in this previous post

Now, you can compile your code to generate a html or a LaTeX file. Go to your project folder on your terminal and write:

#if you want html
make html
#if you want LaTeX
make latex

If you want generate this from Pycharm, you need create an external tool.
Go to File/Settings.../Tools/External Tools/ and add the following configuration:

Go to Tools/External Tools/Generate HTML and you will see the following output:

Your html file will be in build/html folder, inside your project.
Examples of sphinx tags can be found here
Enjoy it!


Popular posts from this blog

How to fix Android when developer options are not available for this user

from: can't read /var/mail/ in Python scripts

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04