0

I want to generate the documents for my Python project.

I know that there are a lot of useful tools that I have read about, such as pdoc and Sphinx.

One of my biggest requirements is that I want to add a tag or classifier for some functions located in different modules.

Suppose I have three modules.

ModuleA with functions: a, b, c
ModuleB with functions: d, e, f
ModuleC with functions: x, y, z

Assume functions a, e, f, x are with same tag called: tag1

a.py
Class ModuleA:
    def a(self):
        '''
        This is docstring
        tag: tag1
        '''
        do_somthing...

b.py
Class ModuleB:
    def e(self):
        '''
        This is docstring
        tag: tag1
        '''
        do_somthing...

    def f(self):
        '''
        This is docstring
        tag: tag1
        '''
        do_somthing...

How do a create a custom filter or section for tag1 on the document?

I can use the tag1 filer to list a, e, f, x functions, document, and which module they located.

mzjn
  • 48,958
  • 13
  • 128
  • 248
codebrew
  • 329
  • 2
  • 13
  • Unclear. What do you mean by "custom filter or section"? – mzjn Apr 25 '23 at 10:05
  • It means a filter on the left panel. With one click, I can get the tagged functions. Like Tags on StackOverflow to filter specific categories. – codebrew Apr 25 '23 at 18:21
  • Sorry, but this is still vague IMHO. Are you using Sphinx or pdoc? What exactly do you need help with? Have you tried anything at all? – mzjn Apr 25 '23 at 19:18

0 Answers0