module helpgen._my_doxypy

Inheritance diagram of pyquickhelper.helpgen._my_doxypy

Short summary

module pyquickhelper.helpgen._my_doxypy

doxypy is an input filter for Doxygen. It preprocesses python files so that docstrings of classes and functions are reformatted into Doxygen-conform documentation blocks.

In order to make Doxygen preprocess files through doxypy, simply add the following lines to your Doxyfile:

  • FILTER_SOURCE_FILES = YES

  • INPUT_FILTER = "python /path/to/doxypy.py"

source on GitHub

Classes

class

truncated documentation

Doxypy

FSM

Implements a finite state machine. Transitions are given as 4-tuples, consisting of an origin state, a target state, …

Opt

Functions

function

truncated documentation

is_file_string

Says if the string s could be a filename.

main

Starts the parser on the file given by the filename as the first argument on the commandline.

optParse

Parses commandline options.

process_string

Applies the doxypy like process to a string.

Methods

method

truncated documentation

__closeComment

Appends any open comment block and triggering block to the output.

__docstringSummaryToBrief

Adds brief to the docstrings summary line. A brief is prepended, provided no other doxygen command is at the …

__flushBuffer

Flushes the current outputbuffer to the outstream.

__init__

Constructor for Doxypy.

__init__

__init__

addTransition

appendCommentLine

Appends a comment line. The comment delimiter is removed from multiline start and ends as well as singleline …

appendDefclassLine

Appends a line to the triggering block.

appendFileheadLine

Appends a line in the FILEHEAD state. Closes the open comment block, resets it and appends the current line.

appendNormalLine

Appends a line to the output.

catchall

The catchall-condition, always returns true.

makeCommentBlock

Indents the current comment block with respect to the current indentation level.

makeTransition

Makes a transition based on the given input.

parse

Parses a python file given as input string and returns the doxygen- compatible representation.

parseFile

Parses a python file given as input string and returns` the doxygen compatible representation.

parseLine

Parses one line of python and flush the resulting output to the outstream.

resetCommentSearch

Restarts a new comment search for a different triggering line. Closes the current commentblock and starts a new …

setStartState

startCommentSearch

Starts a new comment search. Saves the triggering line, resets the current comment and saves the current …

stopCommentSearch

Stops a comment search. Closes the current commentblock, resets the triggering line and appends the current …

Documentation

doxypy is an input filter for Doxygen. It preprocesses python files so that docstrings of classes and functions are reformatted into Doxygen-conform documentation blocks.

In order to make Doxygen preprocess files through doxypy, simply add the following lines to your Doxyfile:

  • FILTER_SOURCE_FILES = YES

  • INPUT_FILTER = "python /path/to/doxypy.py"

class pyquickhelper.helpgen._my_doxypy.FSM(start_state=None, transitions=None)[source][source]

Bases: object

Implements a finite state machine.

Transitions are given as 4-tuples, consisting of an origin state, a target state, a condition for the transition (given as a reference to a function which gets called with a given piece of input) and a pointer to a function to be called upon the execution of the given transition.

attribute

meaning

transitions

holds the transitions

current_state

holds the current state

current_input

holds the current input

current_transition

hold the currently active transition

source on GitHub

__init__(start_state=None, transitions=None)[source][source]

Initialize self. See help(type(self)) for accurate signature.

makeTransition(input)[source][source]

Makes a transition based on the given input.

Parameters

input – input to parse by the FSM

source on GitHub

pyquickhelper.helpgen._my_doxypy.is_file_string(s)[source][source]

Says if the string s could be a filename.

Parameters

s – string

Returns

boolean

source on GitHub

pyquickhelper.helpgen._my_doxypy.main(file=None, print_output=None)[source][source]

Starts the parser on the file given by the filename as the first argument on the commandline.

Parameters
  • file – if equal to None, take this one on the command line

  • print_output – every string is sent to that funtion

source on GitHub

pyquickhelper.helpgen._my_doxypy.optParse()[source][source]

Parses commandline options.

source on GitHub

pyquickhelper.helpgen._my_doxypy.process_string(content, print_output, process_comment, filename, first_row, debug=False)[source][source]

Applies the doxypy like process to a string.

Parameters
  • content – string

  • print_output – every string is sent to that funtion

  • process_comment – function applied to the help to modifies it

  • filename – or None if there is no file

  • first_row – True: to display error messages

  • debug – if True, display more information

source on GitHub