Sphinx for SQL?

339 views
Skip to first unread message

Wolfgang Keller

unread,
Aug 18, 2009, 8:52:45 AM8/18/09
to sphin...@googlegroups.com
Hello,

this might be heresy to ask, but...

...is there a way to use Sphinx for documenting code in other languages than Python, specifically SQL?

TIA,

Sincerely,

Wolfgang

--
NO "Courtesy Copies" PLEASE!

Max Battcher

unread,
Aug 23, 2009, 5:08:01 PM8/23/09
to sphin...@googlegroups.com
Wolfgang Keller wrote:
> Hello,
>
> this might be heresy to ask, but...
>
> ...is there a way to use Sphinx for documenting code in other languages than Python, specifically SQL?

Sphinx is designed for documentation in general and you shouldn't have
much problem documenting anything of interest to you. Sphinx is already
used in the documentation of non-Python projects. I've even seen
"blogging" via Sphinx.

In terms of specifics:

* The source code highlighter used by Sphinx is Pygments (pygments.org),
which is general-purpose and contains highlighters for a number of
common languages, including SQL.

* The semantic markup units/search tools are designed semantically for
Python documentation, but can be (ab)used for many other languages and
the formatting that they perform should work for many non-Python
languages as easily as for Python.

* The only real Python-specific documentation tools are the "autodoc"
tools to pull documentation that already exists in Python code into
Sphinx documents. These tools are just Sphinx extensions and you don't
lose much in not using them (in fact, many Python documentation projects
themselves ignore the autodoc extensions).

Hopefully that helps,

--
--Max Battcher--
http://worldmaker.net

Reply all
Reply to author
Forward
0 new messages