Jump to content

Create Documentation for AutoIT scripts


witty
 Share

Recommended Posts

Hello

Can anyone suggest a way or any tools/libraries to create documentation file for user defined functions in any autoIT script?

to create something similar to a .chm file for any other kind of documentation for better readability?

Thanks!

Link to comment
Share on other sites

  • 10 years later...

AutoIt Documentation Generation using Sphinx and Pygments

Is it possible to use the python Sphinx documentation generator library (which uses Pygments for code-highlighting) to generate documentation from .au3 files? If this could be done, then people can easily share there code on GitHub/GitLab/BitBucket and the generated documentation as well. In addition to this, they will be able to share the generated docs on readthedocs.io for free. They can also use a CI pipeline for the documentation generation. I think the better the documentation the more will be the adoption.

  • Selecting default highligh_language in sphinx: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-highlight_language
  • Pygments supports AutoIt code-formatting: https://pygments.org/ 
  • Sphinx has support for code-documentation in languages other than python: https://www.sphinx-doc.org/en/master/
Quote

Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.

It was originally created for the Python documentation, and it has excellent facilities for the documentation of software projects in a range of languages. Of course, this site is also created from reStructuredText sources using Sphinx! The following features should be highlighted:

Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information

 

Sphinx uses reStructuredText as its markup language, and many of its strengths come from the power and straightforwardness of reStructuredText and its parsing and translating suite, the Docutils.

  • Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children
  • Automatic indices: general index as well as a language-specific module indices
  • Code handling: automatic highlighting using the Pygments highlighter
  • Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and more
  • Contributed extensions: dozens of extensions contributed by users; most of them installable from PyPI

 

 

Here is an example of documentation-generation for non-python code (C++). However they used "doxygen" to extract C++ API  documentation. According to this  article, "Sphinx doesn’t have the ability to extract API documentation from C++ headers" -- this I am not sure about.

  • https://devblogs.microsoft.com/cppblog/clear-functional-c-documentation-with-sphinx-breathe-doxygen-cmake/

Example of AutoIt code-formatting using Pygments (Can be used in LaTeX. Sphinx uses Pygments). See Demo here.

fM2wfA1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...