mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
reduce TOC level
This commit is contained in:
@ -6,7 +6,7 @@ Convert parser doc string to markdown
|
||||
import sys
|
||||
import importlib
|
||||
from inspect import isfunction, signature, cleandoc
|
||||
import yapf
|
||||
import yapf # type: ignore
|
||||
import os
|
||||
import sys
|
||||
|
||||
@ -29,7 +29,7 @@ header = f'''[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
# {mod_path}
|
||||
'''
|
||||
|
||||
summary = module.__doc__
|
||||
summary = module.__doc__ or ''
|
||||
|
||||
functions = []
|
||||
for attribute in dir(module):
|
||||
@ -45,7 +45,7 @@ for attribute in dir(module):
|
||||
functions.append(attribute)
|
||||
|
||||
######## TABLE OF CONTENTS ########
|
||||
toc = f'# Table of Contents\n\n*[{mod_path}](#{mod_path})\n'
|
||||
toc = f'## Table of Contents\n\n*[{mod_path}](#{mod_path})\n'
|
||||
for api in functions:
|
||||
toc = f'{toc} *[{api}](#{mod_path}.{api})\n'
|
||||
|
||||
@ -78,6 +78,7 @@ if 'jc.parsers.' in mod_path and not 'universal' in mod_path:
|
||||
footer = footer + 'This parser can be used with the `--slurp` command-line option.\n\n'
|
||||
footer = footer + f'Version {ver} by {author} ({author_email})\n'
|
||||
|
||||
final_doc = ''
|
||||
if 'jc.parsers.' in mod_path and not 'universal' in mod_path:
|
||||
final_doc = header + '\n' + summary + '\n\n' + api_docs + '\n' + footer
|
||||
elif mod_path == 'jc':
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# jc.lib
|
||||
|
||||
# Table of Contents
|
||||
## Table of Contents
|
||||
|
||||
*[jc.lib](#jc.lib)
|
||||
*[all_parser_info](#jc.lib.all_parser_info)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# jc.parsers.universal
|
||||
|
||||
# Table of Contents
|
||||
## Table of Contents
|
||||
|
||||
*[jc.parsers.universal](#jc.parsers.universal)
|
||||
*[simple_table_parse](#jc.parsers.universal.simple_table_parse)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# jc.streaming
|
||||
|
||||
# Table of Contents
|
||||
## Table of Contents
|
||||
|
||||
*[jc.streaming](#jc.streaming)
|
||||
*[add_jc_meta](#jc.streaming.add_jc_meta)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# jc.utils
|
||||
|
||||
# Table of Contents
|
||||
## Table of Contents
|
||||
|
||||
*[jc.utils](#jc.utils)
|
||||
*[compatibility](#jc.utils.compatibility)
|
||||
|
Reference in New Issue
Block a user